I am trying to encode a video to webm for playing through a HTML5 video tag. I have these settings...
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:a 128k -b:v 1M -c:a libopus output.webm
The results aren't great, video has lost lot's of it's sharpness. Looking at the original file I can see the bitrate is 1694kb/s.
Are there any settings I can add or change to improve the output? Would maybe a 2 pass encode improve things?
Use WinX Video Converter WinX Video Converter is the optimal choice for you to convert WebM video files because it will not damage video quality after converting it to MP4. You don't have to worry about image quality loss. Besides, 47X real-time faster processing speed is one of its advantages as well.
Instead of -sameq (removed by FFMpeg), use -qscale 0 : the file size will increase but it will preserve the quality.
Go to Add Media > Add Video and select one or more MP4 files for conversion. Open the Video tab in the lower part of the app window, click WebM as your desired format. Click the Save to button and choose the destination folder for your output videos. When you're done, click Convert.
Because WebM is a well-defined format, FFmpeg automatically knows what video and audio it can support and will convert the streams to be a valid WebM file. may result in a file with the same codecs as input.
Try with
ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 -b:a 128k -c:a libopus output.webm
Adjust the CRF value till the quality/size tradeoff is ok. Lower values produce bigger but better files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With