LinuxQuestions.org
Visit Jeremy's Blog.
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 07-04-2005, 06:22 AM   #1
emokid
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Rep: Reputation: 0
avi to mpeg


is there a program i can use to convert avi to mpeg???
 
Old 07-04-2005, 06:35 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Take a look at mencoder, which is part of the mplayer package. You can find it here: www.mplayerhq.hu. avidemux may also be worth a shot, see http://avidemux.sourceforge.net/.

HTH
 
Old 03-24-2008, 03:20 PM   #3
AuldLochinvar
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Rep: Reputation: 0
Smile Try qdvdauthor

Hi, Emokid,
I mucked about with mencoder, ffmpeg, and quite a few other things with what I would gently refer to as less than unqualified success. I did succeed in burning a few DVDs from DV-camera output, using dvdauthor, its associate spumux, and good old gimp.
Then I got a FLIPVIDEO camera, which outputs AVIs, and I used Adept (apt-get, or aptitude, would no doubt be fine) to acquire qdvdauthor, which is sufficiently willing to take charge of me that I now can steal some of its scripts and do stuff that I should perhaps have been able to figure out.
But I have now burned DVDs with cascading menus, image buttons, text buttons, and I'm ambitious to try movie-clip-buttons.
 
Old 03-27-2008, 11:03 AM   #4
pwalden
Member
 
Registered: Jun 2003
Location: Washington
Distribution: Raspbian, Ubuntu, Chrome/Crouton
Posts: 374

Rep: Reputation: 50
Quote:
Originally Posted by AuldLochinvar View Post
Hi, Emokid,
I mucked about with mencoder, ffmpeg, and quite a few other things with what I would gently refer to as less than unqualified success.
Yes mencoder has a lot of features and you need to know what you are doing to get good results. However, I do use mencoder all the time for avi to mpeg. Here is a sample command:

mpeg2 DVD compatible 4:3 aspect ratio

Code:
mencoder -oac lavc -af lavcresample=48000 -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,expand=:::::4/3,harddup -srate 48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=6000:vbitrate=3000:keyint=18:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:vqmin=1:lmin=1:dc=10:acodec=ac3:abitrate=192:aspect=4/3 -ofps 30000/1001 -o output.mpg input.avi
mpeg1 raw conversion

Code:
mencoder -vf harddup -ofps 24000/1001 -of mpeg -mpegopts format=mpeg1 -ovc lavc -oac lavc -lavcopts acodec=mp2:vcodec=mpeg1video:keyint=18:vrc_buf_size=1835:vrc_maxrate=6000 -o output.mpg input.avi
 
Old 03-27-2008, 11:17 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
ffmpeg is much easier to use than mencoder, and because of this, you will likely get better results. However, if you want a GUI, use avidemux.

Just as an example here's the ffmpeg command for the conversion:
Code:
ffmpeg -i input.avi output.mpeg
 
Old 04-01-2008, 10:56 PM   #6
AuldLochinvar
LQ Newbie
 
Registered: Aug 2007
Posts: 10

Rep: Reputation: 0
Avi to mpeg

Quote:
Originally Posted by H_TeXMeX_H View Post
ffmpeg is much easier to use than mencoder, and because of this, you will likely get better results. However, if you want a GUI, use avidemux.

Just as an example here's the ffmpeg command for the conversion:
Code:
ffmpeg -i input.avi output.mpeg
Thanks, TeXMeX; I appreciate the simplicity.

It's worth noting, that a command this simple loses me some definition in 640x480 images.

I added the parameter -target ntsc-dvd and got much higher quality results. It also took longer and meant bigger output files, no surprise!

ffmpeg -i input.avi -target ntsc-dvd output.mpeg
 
Old 04-02-2008, 11:42 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, there are many more options that will allow you to tailor the output, check the man page. My simple example was just to illustrate that it doesn't have to be as complicated as the commands posted above for mencoder (which I find rather ridiculous). avidemux will output the same quality results as ffmpeg with the same options, so if you prefer that would be easiest.
 
Old 04-03-2008, 12:42 AM   #8
webaware
Member
 
Registered: Nov 2007
Location: Australia
Distribution: Fedora FC-9 x86-64+i686,CentOS 5.2 i686
Posts: 58

Rep: Reputation: 16
Note that you can also improve compression (i.e. reduce final size a little) by telling ffmpeg to make two passes, first one to get stats on the file and second one to actually process the file.

Code:
ffmpeg -y -pass 1 -i input.avi -target ntsc-dvd /dev/null
ffmpeg -y -pass 2 -i input.avi -target ntsc-dvd output.mpeg
NB: make sure that any parameters you give the first pass, you also give the second pass.

You can also easily vary the output size by varying the quality of either video or audio, e.g. to reduce the audio channel size by forcing (max of) 128k bits, use the following:

Code:
-ab 128k
See the ffmpeg man page for more information.
 
  


Reply



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
AVI MPEG Programs RySk8er30 Linux - Software 1 04-15-2005 08:06 PM
convert avi to mpeg xgreen Linux - Software 7 11-30-2003 09:45 AM
AVI vs MPEG inTUXicated Linux - Software 2 09-05-2003 11:03 AM
avi to mpeg sbadelt Linux - Software 2 06-07-2003 02:42 PM
Avi -> MPEG Ztyx Linux - Software 5 09-04-2002 05:10 AM

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

All times are GMT -5. The time now is 11:10 AM.

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