LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mencoder vs ffmpeg (http://www.linuxquestions.org/questions/linux-newbie-8/mencoder-vs-ffmpeg-4175427306/)

linux_BSD 09-14-2012 05:01 PM

mencoder vs ffmpeg
 
hello,

I use both of these programs and they are great, however mencoder seems to make audio out of sync with the video. Sometimes it is very minor and other times it is annoying. Has anyone experience this with mencoder?

Ffmpeg seems to do a better job of keeping things in sync. What is your experience with these two programs?

JaseP 09-14-2012 08:34 PM

Are you using them from the command line or using a front end? I almost never use a command line with them,... for me it's acidrip, handbrake, or some other front end utility. They usually set the timings automagically.

I am pretty sure that both have command line switches to offset audio/video sync... Not to give you a RTFM response, but maybe check out the manpages for both...

linux_BSD 09-14-2012 08:50 PM

I use the command line for both programs including handbrake. I never tried acidrip though. I use handbrake with dealing with mp4/mkv files. The commandline version of handbrake doesn't support avi format anymore.

I did improve the sync issues with mencoder by doing research on the net with their examples. Right now ffmpeg and handbrake are my widely used programs for video encoding.

suttiwit 09-15-2012 04:45 AM

I heard ffmpeg is discontinued.

linux_BSD 09-15-2012 01:31 PM

It is still around. It's in my repos. I know that adobe flash has discontinue for linux and android.

David the H. 09-16-2012 09:07 AM

I agree with the above that you're probably thinking about flash or another project. It seems highly unlikely that ffmpeg would be discontinued, considering it's one of the premier editing tools out there. And their homepage mentions nothing.

http://ffmpeg.org/

I do believe they have done a bit of revamping of their option syntax recently though, so you may find that old posts need to be translated.


In any case, I've always found that video/audio syncing is one of the most common problems encountered, whatever the program you use. There are obviously just too many variables involved for any one tool to work all the time.

The advice I give is usually to demux the streams, process the audio and video separately, then recombine them.

clifford227 09-16-2012 09:20 AM

Quote:

Originally Posted by David the H. (Post 4781578)
In any case, I've always found that video/audio syncing is one of the most common problems encountered, whatever the program you use.

I tried some dvd ripping a few years ago with Xvidenc (excellent commandline ripper), and getting the audio to sync with the video was a nightmare.

Nudging the audio forward and back by 10ms, it gets confusing. When you get close you dont know wether you're going in the right direction.

Then there's getting the aspect ratio absolutely right too...

linux_BSD 09-16-2012 09:55 AM

I believe acidrip uses mencoder. I use HandBrake.

HandBrake does a good job of ripping dvds or VOB files and it keeps the audio in sync with the video. To preserve the aspect I use the --keep-display-aspect option from the command line.


If you want to convert a video or VOB file using ffmpeg and want to keep the audio in sync, this has work for me

Note: ffmpeg does a good job in keeping the audio in sync with the video without using the -async switch. In case your audio is out of sync then you can try the -async switch. Here is how it is done.

First find out the audio frequency of the video file


ffmpeg -i video.mp4

Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 159 kb/s

There are more lines from the output, but I am only including this line as an example. As you can see, the audio frequency is 48000 Hz.

Add the -async option to your ffmpeg command like so

-async 48000

This has worked quite well for me.

andrew.46 09-21-2012 04:33 PM

Quote:

Originally Posted by suttiwit (Post 4780847)
I heard ffmpeg is discontinued.

There have been some confusing messages to this effect in some libav packages, FFmpeg development still moves on at an alarming rate however...

Luke_R 11-26-2012 07:51 PM

Quote:

Originally Posted by linux_BSD (Post 4780603)
hello,

I use both of these programs and they are great, however mencoder seems to make audio out of sync with the video. Sometimes it is very minor and other times it is annoying. Has anyone experience this with mencoder?

Ffmpeg seems to do a better job of keeping things in sync. What is your experience with these two programs?

I've had A/V sync problems with mencoder, e.g.
Code:

mencoder -oac mp3lame -lameopts cbr:br=64 -ovc lavc -lavcopts vbitrate=800 -o out.avi in.flv
and solved it using
Code:

mencoder -mc 0 -noskip -oac mp3lame -lameopts cbr:br=64 -ovc lavc -lavcopts vbitrate=800 -o -o out.avi in.flv
Summing up, try adding the following options to your mencoder run:
Code:

-mc 0 -noskip


All times are GMT -5. The time now is 11:27 PM.