Centos – Encode with ffmpeg using avi to mp4

centoscommand lineconversionffmpegterminal

What command lines to use to convert from avi to mp4, but without destroying the framesize and making the file small as the original size or a little bit bigger, and same thing with mp4 to avi? Whenever I tried converting it became like 2 gb

Best Answer

Depending on how your original file was encoded, it may not be possible to keep the file size.

This command should keep frame sizes and rates intact while making an mp4 file:

ffmpeg -i infile.avi youroutput.mp4

And this command will give you information about your input file - the frame size, codecs used, bitrate, etc.:

ffmpeg -i infile.avi

You can also play with the acodec and vcodec options when you generate your output. Remember also that mp4 and avi files can use various codecs and your mileage may vary according to which codec you pick.

Related Question