[MEncoder-users] MPEG2 Transcoding problem

James Thomas Snell james at dawning.ca
Tue May 20 21:35:49 CEST 2008


Thanks for the input James. I've spent a fait bit of time re-encoding and
have yet to have more success. Here's some additional information on my
problem.

The audio and video are produced by a hardware MPEG2 encoder. The video and
audio are in sync in the MPEG2 file produced by the encoder.

I haven't noticed an offset of the audio and the video when using mencoder
the same as I'm trying here on shorter videos. My videos are approximately 2
to 3 hours long and approximately 5-7 GB in size.

There must be some flag I can give mencoder to keep the two synced up? It
just seems like such core functionality. I suppose something I can try as a
"patch" on the problem is to get mencoder to break my videos in to smaller
clips and try transcoding those? That's definitely a not so exciting
solution as it doesn't really address the problem.

Any suggestions please?? Help! :)



On Sat, May 17, 2008 at 3:06 PM, James Hastings-Trew <jimht at shaw.ca> wrote:

> 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.
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>



More information about the MEncoder-users mailing list