• Aman Gupta's avatar
    avformat/mpegts: add skip_unknown_pmt option · e24d768a
    Aman Gupta authored
    Some filtered mpegts streams may erroneously include PMTs for
    programs that are not advertised in the PAT. This confuses ffmpeg
    and most players because multiple audio/video streams are created
    and it is unclear which ones actually contain data.
    
    See for example https://tmm1.s3.amazonaws.com/unknown-pmts.ts
    
    In this sample, the PAT advertises exactly one program. But the
    pid it points to for the program's PMT contains PMTs for other
    programs as well. This is because the broadcaster decided to
    re-use the same pid for multiple program PMTs.
    
    The hardware that filtered the original multi-program stream
    into a single-program stream did so by rewriting the PAT to
    contain only the program that was requested. But since it just
    passed through the PMT pid referenced in the PAT, multiple PMTs
    are still present for the other programs.
    
    Before:
    
        Input #0, mpegts, from 'unknown-pmts.ts':
          Duration: 00:00:10.11, start: 80741.189700, bitrate: 9655 kb/s
          Program 4
            Stream #0:2[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 11063 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
            Stream #0:3[0x44](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
            Stream #0:4[0x45](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
          No Program
            Stream #0:0[0x31]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv), 90k tbr, 90k tbn, 90k tbc
            Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp
            Stream #0:5[0x51]: Video: mpeg2video ([2][0][0][0] / 0x0002), none, 90k tbr, 90k tbn
            Stream #0:6[0x54](eng): Audio: ac3 (AC-3 / 0x332D4341), 0 channels
    
    With skip_unknown_pmt=1:
    
        Input #0, mpegts, from 'unknown-pmts.ts':
          Duration: 00:00:10.11, start: 80741.189700, bitrate: 9655 kb/s
          Program 4
            Stream #0:0[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 11063 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
            Stream #0:1[0x44](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
            Stream #0:2[0x45](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
    Signed-off-by: 's avatarAman Gupta <aman@tmm1.net>
    e24d768a
Name
Last commit
Last update
..
doxy Loading commit data...
examples Loading commit data...
.gitignore Loading commit data...
APIchanges Loading commit data...
Doxyfile Loading commit data...
Makefile Loading commit data...
authors.texi Loading commit data...
bitstream_filters.texi Loading commit data...
bootstrap.min.css Loading commit data...
build_system.txt Loading commit data...
codecs.texi Loading commit data...
decoders.texi Loading commit data...
default.css Loading commit data...
demuxers.texi Loading commit data...
developer.texi Loading commit data...
devices.texi Loading commit data...
doxy-wrapper.sh Loading commit data...
encoders.texi Loading commit data...
errno.txt Loading commit data...
faq.texi Loading commit data...
fate.texi Loading commit data...
fate_config.sh.template Loading commit data...
ffmpeg-bitstream-filters.texi Loading commit data...
ffmpeg-codecs.texi Loading commit data...
ffmpeg-devices.texi Loading commit data...
ffmpeg-filters.texi Loading commit data...
ffmpeg-formats.texi Loading commit data...
ffmpeg-protocols.texi Loading commit data...
ffmpeg-resampler.texi Loading commit data...
ffmpeg-scaler.texi Loading commit data...
ffmpeg-utils.texi Loading commit data...
ffmpeg.texi Loading commit data...
ffmpeg.txt Loading commit data...
ffplay.texi Loading commit data...
ffprobe.texi Loading commit data...
ffprobe.xsd Loading commit data...
fftools-common-opts.texi Loading commit data...
filter_design.txt Loading commit data...
filters.texi Loading commit data...
formats.texi Loading commit data...
general.texi Loading commit data...
git-howto.texi Loading commit data...
indevs.texi Loading commit data...
issue_tracker.txt Loading commit data...
lexicon Loading commit data...
libav-merge.txt Loading commit data...
libavcodec.texi Loading commit data...
libavdevice.texi Loading commit data...
libavfilter.texi Loading commit data...
libavformat.texi Loading commit data...
libavutil.texi Loading commit data...
libswresample.texi Loading commit data...
libswscale.texi Loading commit data...
mailing-list-faq.texi Loading commit data...
metadata.texi Loading commit data...
mips.txt Loading commit data...
multithreading.txt Loading commit data...
muxers.texi Loading commit data...
nut.texi Loading commit data...
optimization.txt Loading commit data...
outdevs.texi Loading commit data...
patchwork Loading commit data...
platform.texi Loading commit data...
print_options.c Loading commit data...
protocols.texi Loading commit data...
rate_distortion.txt Loading commit data...
resampler.texi Loading commit data...
scaler.texi Loading commit data...
snow.txt Loading commit data...
style.min.css Loading commit data...
swresample.txt Loading commit data...
swscale.txt Loading commit data...
t2h.init Loading commit data...
t2h.pm Loading commit data...
tablegen.txt Loading commit data...
texi2pod.pl Loading commit data...
texidep.pl Loading commit data...
undefined.txt Loading commit data...
utils.texi Loading commit data...
writing_filters.txt Loading commit data...