[FFmpeg-user] Which settings to convert videos with a lot of static content?
Leo Izen
leo.izen at gmail.com
Thu Mar 17 22:12:23 CET 2011
On Thu, Mar 17, 2011 at 8:42 AM, John Reid <j.reid at mail.cryst.bbk.ac.uk>wrote:
> On 17/03/11 10:40, John Reid wrote:
>
>> Hi,
>>
>> I would like to convert many videos from flv and wmv to mp4. They
>> content a lot of static images, i.e. there is no motion on screen for
>> seconds at a time. Even when there is motion, it is only a part of the
>> image that moves. The audio is spoken word. Are there any settings that
>> are suited for this sort of video good to use? Obviously I would like a
>> good reproduction and a small file size.
>>
>> Thanks,
>> John.
>>
>
> I should add that at the moment I'm using these arguments:
>
> -i flv/ronen-2011_03_07.flv
> -acodec libfaac
> -ab 32k
> -ar 22050
> -s 320x204
> -padtop 18
> -padbottom 18
> -padleft 0
> -padright 0
> -vcodec mpeg4
> -b 32k
> -map_meta_data flv/ronen-2011_03_07.flv:mp4/ronen-2011_03_07.mp4
> mp4/ronen-2011_03_07.mp4
>
>
> Thanks,
> John.
>
>
1. The -pad* options have been deprecated, and even removed in the new
versions of ffmpeg. Use an ffmpeg from the latest git://
git.videolan.org/ffmpeg.git and switch to -vf pad.
2. For codecs, I recommend using libx264's H.264 whenever possible. There is
nothing in the video world that can compare to the quality to file size
ratio that libx264 gives. No other codec format or implementation is as
good. So you pretty much have my opinion for video: use -vcodec libx264
-vpre veryslow -crf 15. a CRF of 15 is visually lossless, but isn't 100%
bit-by-bit lossless, but that's fine. AND, H.264 is supported more in the
MP4 container than MPEG-4 ASP (which you were using). For still images, the
bitrate should be fine though.
3. For audio, it is sort of a choice. libfaac is a moderately good
implementation of the AAC audio codec. Using this will provide better
compatibility if inside the mp4 file format that the other option,
libmp3lame. MP3 is still supported inside the mp4 container. The encoder for
MP3, LAME, is significantly better than the encoder libfaac, but the codec
isn't universally accepted inside mp4, although it is accepted most of the
time. So the decision is yours: Use a worse encoder for more compatibility,
or a better encoder for less compatibility.
So you have two choices:
ffmpeg -i flv/ronen-2011_03_07.flv -f mp4 -acodec libfaac -ab 32k -ar 22050
-vf pad=320:240:0:18 -vcodec libx264 -vpre veryslow -crf 15 -map_meta_data
flv/ronen-2011_03_07.flv:mp4/ronen-2011_03_07.mp4 mp4/ronen-2011_03_07.mp4
for slightly worse AAC audio, for more compatibility OR
ffmpeg -i flv/ronen-2011_03_07.flv -f mp4 -acodec libmp3lame -ab 32k -ar
22050 -vf pad=320:240:0:18 -vcodec libx264 -vpre veryslow -crf 15
-map_meta_data flv/ronen-2011_03_07.flv:mp4/ronen-2011_03_07.mp4
mp4/ronen-2011_03_07.mp4
for slightly better MP3 audio, but less compatibility
So there you have it IMHO. Reply if you get any errors.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
More information about the ffmpeg-user
mailing list