[mythtv-users] How to locate the correct audio track whentranscoding?
watkinshome at gmail.com
Mon Dec 11 16:29:50 UTC 2006
On 11/12/06, David Fishburn <fishburn at ianywhere.com> wrote:
> > My problem is, when transcoding recordings to MP4, to watch
> > them on my PSP, I often end up with one of these additional
> > tracks instead of the main programme audio.
> I just received my PSP and I am trying to figure out how to get videos on
> this device.
> Could you provide some additional information:
> 1. Can you show me the mencoder command line you are using.
This is what I used. It produced a very nice video on the PSP (approx
150MByte for 25 minutes)
mencoder -delay 0.3 -aid 0 -oac lavc -ovc lavc -of lavf -lavcopts
aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac -af lavcresample=24000 -vf
scale=320:240 -o Rock+300.mp4
( and according to the source I used substitute scale=368:206 for 16:9)
I only just got my PSP myself, and did a bit of quick and dirty
hacking around last night, blindly copying stuff I found on the net.
I added the [-delay 0.3] to get the audio sync correct (not sure it
that's going to be consistent across all files) and the [-aid 0] to
get the correct audio track (without it there was a silent audio track
in the mp4 output). The input file was an MPEG 2 file from my
Hauppauge Nova-T DVB card. Quite an old recording as you can tell
from the filename. Repeating the command on a more recent copy of
Torchwood gave me a file with the commentary for the blind as the
audio track (so I can't tell if the audio sync is correct or not).
And that's as far as I got last night.
> 2. The location on the memory stick where you copy the files.
I'm pretty sure that it was /VIDEO. The directory didn't exist
initially. I downloaded a sample video from the example RSS feed,
which created it. I can look tonight to confirm.
> > 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?
> > (At the moment I'm running the mencoder task by hand, but
> > once it's working I intend to set up a user job for it)
> Given the response you just had from Robin with Perl code on how to select
> the right track have you looked at this page:
Yeah, that was where I started from. Of the three options in the script
ffmpeg produced a very blocky output
mencoder produced a file that my PSP didn't recognise (but I didn't
I didn't try the transcode example
> Peter created a Perl script to handle the transcoding (which I am testing
> this morning). I am sure he would be interested in extending this script to
> have it better handle audio tracks.
If I get to the point where I understand what I'm doing, then I'll
definately post the results.
More information about the mythtv-users