[vlc-devel] Patch to filter audio PIDs by --audio-language in TS streams

Mark Paulus mark.paulus at verizonbusiness.com
Fri Sep 21 21:38:41 CEST 2007



Laurent Aimar wrote:
> On Fri, Sep 21, 2007, Laurent Aimar wrote:
>> Or you can filter by PID using
>>  vlc file.ts --ts-es-id-pid --sout '#duplicate{es=pid1,pid2,pid3}:transcode{}:...'
> Sorry, the right syntax is
>  vlc file.ts --ts-es-id-pid --sout '#duplicate{dst="transcode{}:...",select="es=pid1,es=pid2"}
> 
> If you have
>  video pid: 100
>  audio 1 pid: 101
>  audio 2 pid: 102
> vlc file.ts --ts-es-id-pid --sout '#duplicate{dst="transcode{}:...",select="es=100,es=101", \
>                                               dst="transcode{}:...",select="es=100,es=102"}
> will create 2 outputs, one with first audio, and the second with the other audio.
> 
> You could of course run duplicate after the transcode part.
> vlc file.ts --ts-es-id-pid --sout 'transcode{}:#duplicate{dst="...", select="..",
>                                                           dst="...", select=".."}'

I think this solution would enable to extract specific PIDs.  However, for my use, 
extracting by PID id isn't quite practical, because this is being
done in a Myth user job, that is run whenever I select it, after
a recording.  So, I'm much more interested in being able to select
the audio stream by the language identifier, if it exists.  In my 
one test case, I have 
2496 - spanish audio track (lang=spa)
2497 - MPEG2 Video 
2498 - english audio track (lang=eng)
2499 - Private unknown track

So, in my case I want 2497 & 2498.  But, I don't want to have to 
select them by id, because I think that would take a fair amount
of scripting using dvbsnoop or something to look inside the stream,
to figure out which audio pid I want.  Especially when VLC already
has that info right at its fingertips.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mark.paulus.vcf
Type: text/x-vcard
Size: 296 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070921/fe1bf2be/attachment.vcf>


More information about the vlc-devel mailing list