[mythtv-users] How to locate the correct audio track when transcoding?

Neil Milne neil.milne at gmail.com
Mon Dec 11 20:26:07 UTC 2006


On 11/12/06, Robin Neatherway <robthebob at gmail.com> wrote:
> On 12/11/06, David Watkins <watkinshome at gmail.com> wrote:
> > Bearing in mind that mythtv always selects the right audio track when
> > playing back the original recording, how do I extract this information
> > and supply it to the transcoding process so that I get just the audio
> > track that I need into the transcoded file?
>
> In my experience, it is always the lower of the two PIDs associated
> with the two audio tracks. The following perl subroutine is what I use
> in an encoding script to get the PIDs of the video, audio and subtitle
> tracks:
>

I don't believe it's always the lower PID - it seems to switch around
a bit, although I might be mistaken. I suffer from this transcoding TV
for viewing on my PDA. What I've ended up doing is a manual step at
the moment but I'm planning on automating it. You can run ffmpeg -i on
the mpg file and the audio track you want to pick is the stereo high
bitrate one, not the mono lower bitrate one. This rule works for all
the UK DVB channels I regularly transcode from. Once you've identified
the audio track id you can specify it with -aid on the mencoder
command line.

HTH,
Neil

-- 
Neil Milne


More information about the mythtv-users mailing list