LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   avi to mpeg (https://www.linuxquestions.org/questions/linux-software-2/avi-to-mpeg-339831/)

emokid 07-04-2005 06:22 AM

avi to mpeg
 
is there a program i can use to convert avi to mpeg???

Marius2 07-04-2005 06:35 AM

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

AuldLochinvar 03-24-2008 03:20 PM

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.

pwalden 03-27-2008 11:03 AM

Quote:

Originally Posted by AuldLochinvar (Post 3099094)
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

H_TeXMeX_H 03-27-2008 11:17 AM

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

AuldLochinvar 04-01-2008 10:56 PM

Avi to mpeg
 
Quote:

Originally Posted by H_TeXMeX_H (Post 3102087)
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

H_TeXMeX_H 04-02-2008 11:42 AM

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.

webaware 04-03-2008 12:42 AM

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.


All times are GMT -5. The time now is 01:43 PM.