LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 09-14-2012, 05:01 PM   #1
linux_BSD
Member
 
Registered: Sep 2012
Posts: 47

Rep: Reputation: 4
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?
 
Old 09-14-2012, 08:34 PM   #2
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Posts: 1,658

Rep: Reputation: 138Reputation: 138
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...
 
Old 09-14-2012, 08:50 PM   #3
linux_BSD
Member
 
Registered: Sep 2012
Posts: 47

Original Poster
Rep: Reputation: 4
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.
 
Old 09-15-2012, 04:45 AM   #4
suttiwit
Member
 
Registered: Aug 2012
Location: Chiang Mai, Thailand
Distribution: Kubuntu 12.10 x86_64
Posts: 192
Blog Entries: 2

Rep: Reputation: 22
I heard ffmpeg is discontinued.
 
Old 09-15-2012, 01:31 PM   #5
linux_BSD
Member
 
Registered: Sep 2012
Posts: 47

Original Poster
Rep: Reputation: 4
It is still around. It's in my repos. I know that adobe flash has discontinue for linux and android.
 
Old 09-16-2012, 09:07 AM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
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.

Last edited by David the H.; 09-16-2012 at 09:08 AM.
 
Old 09-16-2012, 09:20 AM   #7
clifford227
Member
 
Registered: Dec 2009
Distribution: Slackware 14
Posts: 282

Rep: Reputation: 64
Quote:
Originally Posted by David the H. View Post
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...

Last edited by clifford227; 09-16-2012 at 09:24 AM.
 
Old 09-16-2012, 09:55 AM   #8
linux_BSD
Member
 
Registered: Sep 2012
Posts: 47

Original Poster
Rep: Reputation: 4
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.

Last edited by linux_BSD; 09-16-2012 at 11:31 AM.
 
2 members found this post helpful.
Old 09-21-2012, 04:33 PM   #9
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 651

Rep: Reputation: 92
Quote:
Originally Posted by suttiwit View Post
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...
 
Old 11-26-2012, 07:51 PM   #10
Luke_R
LQ Newbie
 
Registered: Nov 2012
Location: Germany/Poland
Distribution: Fedora
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by linux_BSD View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mencoder / ffmpeg / mplayer available together ? stu7 Linux - Software 3 11-14-2009 09:02 AM
Help me in installing ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encod mitesh.ever Red Hat 5 05-16-2009 01:14 PM
ffmpeg mencoder and lavc keratos Ubuntu 2 05-17-2007 02:48 PM
ffmpeg mencoder transcode Lobais Linux - Software 3 01-09-2006 01:28 PM


All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration