I am working at a raw to timelapse program, and I am using ffmpeg to generate a video out of a sequence of JPGs that my program outputs.
The user can select from different codecs, such as libx264, mjpeg, vp8, vp9.
I am having good results with h264 and mjpeg, but vp8 gives me some very bad quality videos, even though I set the quality pretty high, and the file size is comparable to h264 videos.
I am using the following settings:
ffmpeg.exe -framerate 12 -i "./output/img_%05d.jpg" -dst_range 1 -color_range 2 -c:v libvpx -b:v 0 -threads 8 -speed 2 -crf 8 "./output/video.webm"
You can see a sample video here: https://www.youtube.com/watch?v=eG2jxzR3Uxs (the encoding problems are mostly visible after 9 seconds).
Someone at Stack Overflow said that VP8 needs two passes, but this is unpractical. Is it any way to get good results in a single pass? Something comparable to h264 in terms of size/quality?
-b:v 0
? Seems you have set the bitrate to 0 for some reason...-quality
variable. Here is a great guide.