ffmpeg - very slow conversion

33,966

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.

Share:
33,966
karoluch
Author by

karoluch

Updated on January 04, 2020

Comments

  • karoluch
    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
    karoluch almost 9 years
    I set speed argument to 16 but it is still to slow for me, ffmpeg 13MB mov file converts to 7b webm 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
    Ronald S. Bultje almost 9 years
    Try -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
    karoluch almost 9 years
    Ok, I used it before. Thank you ;)
  • Eric
    Eric about 4 years
    I 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
    Eric about 4 years
    In my test, -preset ultrafast makes it faster, and -speed 8 doesn't make any change.