[MEncoder-users] MPEG2 Transcoding problem

James Hastings-Trew jimht at shaw.ca
Sat May 17 23:06:05 CEST 2008


James Thomas Snell wrote:
> Hello group,
>    I've been trying to use mencoder to transcode mpeg2 files I'm getting
> from an audio capture card. So far I've had no success in figuring out a way
> to successfully keep the audio and video in sync when I put it through
> mencoder. Here's a copy of the latest version of the script I've been using
> unsuccessfully.
>
>
>
> #!/bin/bash
>
> /usr/bin/mencoder $1 -o $2 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=7600
> -oac pcm -of avi -vf crop=700:465:20:0,scale=720:480 -mc 0 -noskip
>
>   
Things to try, in no particular order:

Is the sound out of sync by the same amount all the way through? Try 
playing the original in mplayer, and tap the + or - keys until the sound 
gets in sync. Then plug the value that mplayer reports into -audio-delay 
x. If mplayer reports the delay is -300 ms, then put -audio-delay 300 
into your command line

Ditch -mc 0, as this defeats mencoder's method of maintaining sync. Not 
sure what -noskip is getting you either.

Stuff a ,harddup at the end of your video filter chain.

Directly declare the output framerate -ofps 25 for PAL, -ofps 30000/1001 
for NTSC.




More information about the MEncoder-users mailing list