[FFmpeg-user] Shrinking video files

Cecil Westerhof Cecil at decebal.nl
Mon Apr 3 14:48:18 EEST 2017


On Monday  3 Apr 2017 12:22 CEST, chronek at interia.eu wrote:

> use more cpu consuming preset (like slow, slower, you can try use
> graphic encode like nvenc for speed up), increase crf to 22-26, use
> noise reduction (like hqdn3d), try better codec (like libx265)

I used libx265. It was a lot slower: it took about 45 minutes. But it
was also a lot smaller: 222 MB.
Smaller and with less time as my try without preset. And I do not
really see a difference.


> W dniu 2017-04-03 o 09:01, Cecil Westerhof pisze:
>> I made Saturday some videos of a contest, but they are a ‘little’
>> to big to be published. For example a video of not seven minutes is
>> 1.2 GB.
>>
>> I first worked with statements like (the audio needed to be
>> increased also): ffmpeg -y -i ${file}.MP4 -vcodec libx264 -crf 20
>> -af volume=3 ${file}AudioInc.MP4
>>
>> This brought back the size back to 377 MB, but took almost 2 hours
>> to process.
>>
>> So I tried: ffmpeg -y -i ${file}.MP4 -vcodec libx264 -crf 20 -af
>> volume=3 -preset ultrafast ${file}AudioInc.MP4
>>
>> That only took ten minutes, but increased the size to 956 MB.
>>
>> Is there a way to decrease the size significantly, that does not
>> take to much time and still keeps a good quality? (By accident I
>> went from -crf 18 to -crf 120 instead of -crf 20. That was a very
>> small file, but very blocky.) They would like me to bring the size
>> back to about 150 MB.
>>
>> Info from the input file: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
>> 'MVI_0980.MP4': Metadata: major_brand : mp42 minor_version : 1
>> compatible_brands: mp42avc1CAEP copyright : copyright-eng :
>> creation_time : 2017-04-01 15:11:55 Duration: 00:06:54.95, start:
>> 0.000000, bitrate: 24054 kb/s Stream #0:0(eng): Video: h264 (High)
>> (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 23919 kb/s,
>> 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc (default) Metadata:
>> creation_time : 2017-04-01 15:11:55 Stream #0:1(eng): Audio: aac
>> (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s
>> (default)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list