[FFmpeg-devel] mpegts.c

JULIAN GARDNER joolzg at btinternet.com
Wed Oct 17 09:40:02 CEST 2012








>________________________________
> From: Michael Niedermayer <michaelni at gmx.at>
>To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
>Sent: Wednesday, 17 October 2012, 3:23
>Subject: Re: [FFmpeg-devel] mpegts.c
> 
>On Wed, Oct 10, 2012 at 06:35:29PM +0100, JULIAN GARDNER wrote:
>> 
>> 
>> ----- Original Message -----
>> 
>> > From: Michael Niedermayer <michaelni at gmx.at>
>> > To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
>> > Cc: 
>> > Sent: Wednesday, 10 October 2012, 2:07
>> > Subject: Re: [FFmpeg-devel] mpegts.c
>> > 
>> > On Wed, Oct 10, 2012 at 12:05:10AM +0100, JULIAN GARDNER wrote:
>> >>  ________________________________
>> >> 
>> >>  > From: Michael Niedermayer <michaelni at gmx.at>
>> >>  >To: FFmpeg development discussions and patches 
>> > <ffmpeg-devel at ffmpeg.org> 
>> >>  >Sent: Wednesday, 10 October 2012, 0:24
>> >>  >Subject: Re: [FFmpeg-devel] mpegts.c
>> >>  > 
>> >>  >On Tue, Oct 09, 2012 at 08:46:03PM +0100, JULIAN GARDNER wrote:
>> >>  >> Im fixing a few problems in mpegts decoding and i need a little 
>> > help.
>> >>  >> 
>> >>  >> I want to add an auto MAP function so you can say that you want 
>> > audio in gre, for greek, and the mpegts system will scan the pmt and find this 
>> > and set the mapping up correctly to use greek, but i have 2 options.
>> >>  >> 
>> >>  >> 1. remap the pids so the correct one is at the start of the stream 
>> > list
>> >>  >> 
>> >>  >> 2. same idea as -map, but will need a little hand here
>> >>  >
>> >>  >i think this is best done outside mpegts similarly to -map
>> >>  >
>> >> 
>> >> 
>> >>  So where would be the best place to add this?
>> > 
>> > look at avformat_match_stream_specifier()
>> > if i understood you correctly it can be implemented in that quite
>> > easily
>> 
>> Thanks again, code in and working for this with one caveat, if i do a like like this, ive used ! as the language marker, dont know if this is ok, if you would like something different just let me know
>> 
>> ffmpeg -i xx.ts -b v:1000k -map "!a:eng" -f mpegts -t a.ts
>> 
>> I lose the video stream, and then need to add a -map 0:0 which causes problems when the video is not the 1st stream, can you think of a way around this?
>
>the code just has to select a matching stream bundle not just a audio
>stream. This can be made depedant on "a" being specified so if we
>assume "!" is used then -map !a:eng would just select a audio stream
>while -map !:eng would select a full stream bundle of audio+video.
>
Thats the problem, most video streams dont come with a language per se, as i have only come accross 1 channel in 15 years that has more than 1 video pid in the pmt.

joolz


More information about the ffmpeg-devel mailing list