LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2006, 12:18 AM   #1
AngusM
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
FFMPEG vs MPLAYER vs MENCODER and batch conversions to MP4 ?


Probably a dumb question but I cant work out what the differences are with FFMPEG, MPLAYER, and MENCODER or which one I should use.

They all seem to be from the same company, but Im not quite sure why the different software. Some sites say use FFMPEG for conversions and other say use MPLAYER, but then there is also MENCODER

What I would like to do is I have a directory on my server with around 100 videos of all different formats. I would like something where I can batch convert all these videos for use on my video ipod. I can of course download them and do it that way locally, but would prefer to do it server side so other people can access them as well.

I have played around with ffmpeg having read various posts and this is what I have come up with.

I am a linux dummie - so this could possibly be much better - let me know if it could be please

find . -exec ffmpeg -i {} -f mp4 -vcodec mpeg4 -maxrate 2000 -b 1500 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ar 44100 -ab 128 -s 320×240 -aspect 4:3 converted/{}.mp4 \;

The problem with the above is that it only say converts about 1/3 of the videos successfully, and wont change the file extension - eg angus.mov becomes angus.mov.mp4

Any constructive feedback would be GREATLY appreciated. Its doing my head in
 
Old 11-08-2006, 03:53 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by AngusM
Probably a dumb question but I cant work out what the differences are with FFMPEG, MPLAYER, and MENCODER or which one I should use.
As far as I know, FFMPEG is used as a library that is called by both MPlayer and Mencoder (which are programs) to play or encode audio and video. It seems to me that Mplayer and Mencoder mainly act as "wrapping" around FFMPEG functionality. So you might be better off using mencoder for video / audio encoding, as this has much more simpler options (though still a LOT of them!) to choose from when doing encoding. Mencoder then uses FFMPEG (and other stuff of course) to do the encode. You can of course use FFMPEG directly, but I think that might be why you are having problems - I'm guessing that mencoder will work better since it can also use other codecs and libraries not supported by FFMPEG.

Quote:
They all seem to be from the same company, but Im not quite sure why the different software. Some sites say use FFMPEG for conversions and other say use MPLAYER, but then there is also MENCODER
Well, mplayer is just that - a player. It cannot encode. It plays. Mencoder is an encoder - it cannot play. It encodes. FFMPEG is a standalone application and library used by both mplayer and mencoder, but can also be used by itself.

Quote:
What I would like to do is I have a directory on my server with around 100 videos of all different formats. I would like something where I can batch convert all these videos for use on my video ipod. I can of course download them and do it that way locally, but would prefer to do it server side so other people can access them as well.

I have played around with ffmpeg having read various posts and this is what I have come up with.

I am a linux dummie - so this could possibly be much better - let me know if it could be please

find . -exec ffmpeg -i {} -f mp4 -vcodec mpeg4 -maxrate 2000 -b 1500 -qmin 3 -qmax 5 -bufsize 4096 -g 300 -acodec aac -ar 44100 -ab 128 -s 320×240 -aspect 4:3 converted/{}.mp4 \;
Can't help you there (never used FFMPEG directly) but here is what I use (for example) to convert a directory full of .JPG's to a DivX5 AVI:

Code:
mencoder "mf://*.jpg" -mf fps=25:type=jpg -o out.mpg -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=900:vrc_eq=tex:naq:ilme:trell:cbp:preme=1:keyint=132:mbd=0:qns=1:vme=4:dia=2 -noskip
I'm not sure if this uses FFMPEG at all (erm... think it uses lavc - is that FFMPEG?) but the beauty is it doesn't matter. I think you might be able to use "mf://*" and then do fps=25 (i. e. leave out the type option) and mencoder should then auto-detect the source type of video, converting into your target format. Not sure how your target format will be specified under mencoder though, since you seem to want MP4, and I wanted DivX5 .AVI

Quote:
The problem with the above is that it only say converts about 1/3 of the videos successfully, and wont change the file extension - eg angus.mov becomes angus.mov.mp4
That's probably because FFMPEG runs into codecs or files it can't open. That might be better with mencoder since it seems to be able to auto-detect most source filetypes I've encountered. I've even used it to "fix" video files that a Windows machine here wouldn't play, converting them into DivX5 compatibile videos that the Windows machine WOULD play - and I had no idea what codec the source file was using. Mencoder figured it out by itself...
 
Old 11-08-2006, 08:20 AM   #3
AngusM
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks heaps for such a detailed reply.

Basically kind of what I thought as well - re ffmpeg being the underlying codec base / app used by the mplayer products. Will keep investigating.
 
  


Reply

Tags
conversion, ffmpeg, ipod, mplayer, video



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
Batch script for Mencoder??? JungMin Linux - Software 11 11-21-2011 03:34 AM
mplayer .mp4 playback Cyber Maid Linux - Software 4 10-11-2007 10:14 AM
mencoder/ffmpeg convert video(wmv) for Windows Mobile? paulx Linux - Software 2 06-26-2006 11:24 AM
ffmpeg mencoder transcode Lobais Linux - Software 3 01-09-2006 12:28 PM
Ask : ffmpeg and MPlayer imamwib Linux - Software 0 10-21-2005 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 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
Open Source Consulting | Domain Registration