ffmpeg - very slow conversion
Use the -speed
number (e.g. 8), not the -preset
setting (e.g. ultrafast
). The latter is for x264/x265
encoding.
A Higher number means faster encoding, so ultrafast
would map to 8 or so. Very slow/placebo
maps to 0, and values in between map accordingly. 1-2 still gives reasonably good results and settings like 4-5 tend to be relatively fast but not entirely crap quality.
karoluch
Updated on January 04, 2020Comments
-
karoluch over 4 years
I create web app in JavaEE which displays many video formats. I use ffmpeg solution to convert videos to formats which is supported natively by main browsers.
According to : http://www.jwplayer.com/html5/formats/ I convert to WEBM container (VP8/VORBIS or VP9/OPUS). But conversion is very slow, bit rate equals to ~ 200kbits/s. To convert I execute following command
ffmpeg -i file.mov -c:v libvpx -preset ultrafast result.webm
How to speed up conversion to natively supported formats by main browsers? -
karoluch almost 9 yearsI set
speed
argument to16
but it is still to slow for me, ffmpeg 13MBmov
file converts to 7bwebm
file within 30 seconds. Are there any other arguments to speed up conversion? Probably ffmpeg server can help me with stream file 'Live'? -
Ronald S. Bultje almost 9 yearsTry -deadline realtime -cpu-used -16 (-cpu-used is the same as -speed), that's a realtime setting, the quality will definitely suffer but it'll be significantly faster. Also make sure you're running a recent libvpx+ffmpeg version.
-
karoluch almost 9 yearsOk, I used it before. Thank you ;)
-
Eric about 4 yearsI didn't see
-speed
or-cpu-used
in man manual of ffmpeg ... , and wondering what's the default cpu count to use, if not specified. -
Eric about 4 yearsIn my test,
-preset ultrafast
makes it faster, and-speed 8
doesn't make any change.