[FFmpeg-user] [EXTERNAL] Re: Parse a transport stream and get just 1 program

Moritz Barsnick barsnick at gmx.net
Tue Oct 12 17:02:03 EEST 2021


Hi Jim,

On Tue, Oct 12, 2021 at 12:27:15 +0000, FFmpeg user discussions wrote:
> I wonder what do you see that tells that the mapping is map 0:2 -map 0:4

This part:
> >   Program 1
> >     Stream #0:2[0x51]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
> >     Side data:
> >       cpb: bitrate max/min/avg: 17598000/0/0 buffer size: 7995392 vbv_delay: N/A
> >     Stream #0:4[0x54](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
> >     Stream #0:10[0x56](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s

It's the "#0:2", "#0:4", and so on, in the quoted text. You should also
be able to map by program ID:

$ ffmpeg ... -map 0:p:1 ...
or by the the PIDs - they are the "0x51", "0x54" and "0x56" seen above.

Cheers,
Moritz


More information about the ffmpeg-user mailing list