What is the best way to convert a
mp4 file to
webm without quality loss (using
vp9) with ffmpeg?
If I do
ffmpeg -i in.mp4 out.webm the quality is very bad. I can specify a target bitrate via
-b:v and constant quality mode via
ffmpeg -i in.mp4 -crf 10 -b:v 1M out.webm
This gives better quality. However for this I have to lookup the bitrate of the input video (here 1M).
I also noticed that if you specify a much larger value for the target bitrate than the bitrate of the input (here for example
-b:v 100M), ffmpeg just seems to use approximately the bitrate from the input video with vp9 or slightly higher bitrate with vp8. However this solution doesn't seem to be the intended way to do this.
How would you choose the crf value and why?
Is there a parameter which automatically chooses the bitrate of the input file and a suitable crf value to get the same quality as the input file?