Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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

ffmpeg -i infile.avi youroutput.mp4

should keep frame sizes and rates intact while making an mp4 file.

ffmpeg -i infile.avi

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

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.

share|improve this answer
3  
I think it's better to use ffprobe -i infile.avi instead of ffmpeg -i infile.avi for getting informations, as the latter results in the "At least one output file must be specified" error. –  Francesco Turco Sep 23 '12 at 10:41
    
Thanks, Francesco. Your approach is more elegant than mine ;-) –  rbanffy Sep 24 '12 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.