[mythtv-users] MythArchive selecting wrong audio track

Preston Crow pc-mythtv07a at crowcastle.net
Wed Jun 6 22:26:34 UTC 2007

On Wed, 2007-06-06 at 07:27 +0100, John Pilkington wrote:
> Preston Crow wrote:
> > Is there any way to override the audio track selection in MythArchive?
> > I have a bunch of shows where you have to manually select a different
> > audio track when playing them, and if I export them, they end up with
> > the wrong one.  (I'm running today's subversion code.)
> > 
> > An alternate solution would be if there is a way to use the lossless
> > mpeg-2 transcoder to switch audio tracks, or even just dump the first
> > one, then I could do that first.
> > 
> ffmpeg -i  2515_20070515220000.mpg
> will identify the tracks present.
> mplayer -vo null -ao null -aid 1 -frames 0 -v  2515_20070515220000.mpg
> will give details of what it sees as audio track 1
> mencoder -oac copy -aid 1 -ovc copy  -of mpeg -mpegopts format=dvd \
> -o 2566_20070422125900.mpg  2566_20070422125900.mpg1
> will create a file containing audio track 1 from the (renamed) original 
> file, leaving it in position for a lossless mythtranscode, after which 
> it can be edited.
> No guarantees, and it's messy, but it can often be made to work.

My source file was an ATSC HDTV recording, and mplayer didn't like it,
at least with the options above.  I was able to get the same idea to
work with ffmepg, though:

ffmpeg -v 1 -i x.mpg -copyts -sameq -acodec copy -vcodec copy -aspect 16:9 -map 0:0 -map 0:2 -f mpegts x.copy.mpg

In the above, x.mpg is the source, and x.copy.mpg is the new copy.
After that, I replaced the original with the copy, did a lossless
trancoding, and then I was back to a file that Myth was happy with with
only the correct audio track.  Then I set a cut list and transcoded it
again, and then I used MythArchive to export it as a DVD.

The other alternative was to use a script instead of ffmpeg that munged
the parameters to change "0:1" to "0:2" for the '-map' parameter when
doing MythArchive, but that doesn't allow for transcoding, and I wanted
to strip a commercial.

More information about the mythtv-users mailing list