[FFmpeg-user] How to map specific audio channels in MPTS stream

Qianliang Zhang zhangqianliang at gmail.com
Tue Sep 16 03:37:56 CEST 2014


Maybe you can try -map index, like:

    Stream #0:6[0x1fcc]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt470bg), 704x576 [SAR 12:11 DAR 4:3], 25 fps, 50 tbr, 90k tbn,
50 tbc
    Stream #0:7[0x100](mkd): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 189 kb/s
    Stream #0:8[0x1fcd]: Audio: mp3 ([6][0][0][0] / 0x0006), 0 channels,
s16p

-map 0:6 -vcodec copy -map 0:7 -acodec libfaac

On Sun, Sep 14, 2014 at 6:12 AM, Ilir Pruthi <ipruthi at gmail.com> wrote:

> On Sat, Sep 13, 2014 at 3:28 PM, Carl Eugen Hoyos <cehoyos at ag.or.at>
> wrote:
>
> > Ilir Pruthi <ipruthi <at> gmail.com> writes:
> >
> > > $ ffmpeg -i "udp:// <at> MY_IP_ADDRESS:XXXX?overrun_nonfatal=1&reuse=1"
> > > -map 0:p:11 -map 0:28  -vcodec libx264 -acodec copy
> > > -t 30 -f mpegts -y program11.ts
> >
> > Please provide your command line together with the
> > complete, uncut console output (sensible information
> > cut if necessary).
> >
> > Allow me to add what I often write here:
> > I believe FFmpeg may not be the right tool for this
> > task. If all you want to do is save a transport stream
> > use mplayer -dumpstream or even better just pipe the
> > stream into a file. FFmpeg may fail on a reception
> > error and damage your recording.
> > Once you made the recording, you can use FFmpeg to
> > change resolution etc. if needed.
> >
>
> Hello Carl and thank you for replying.
>
> The MPTS stream was "fixed" after I requested from sending party to modify
> the MPTS so it does not contain dead tracks. Unfortunately, I have not
> saved the full output and cannot reproduce it now. But the last message was
> that FFmpeg could not continue decoding because of the multiple broken
> audio tracks in each program. That's why I thought it's possible to select
> tracks via FFmpeg's -map parameter.
>
> Theoretically, however, do you know if/how to achieve the following in
> FFmpeg:
> * For each program, select specific video and audio track and copy them to
> a UDP port
>
> Would you happen to know the correct -map notation to achieve this?
>
> Thank you for your time and help.
>
> -Ilir
>
>
>
> >
> > Carl Eugen
> >
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list