2

I'm doing a full page background video and I'm trying to convert the original mp4 to an webm. The background will not have any audio.

I'm currently using ffmpeg.

ffmpeg -i INPUT.mp4 -b 614400 -s 960x540 -aspect 16:9 OUTPUT.webm

My question is what are the optimal settings to convert an mp4 to an webm file that will be used as a background video on a website?

  • 1
    related: video.stackexchange.com/questions/14728/… – p2or Mar 17 '15 at 19:51
  • If you have the original source the mp4 was made from, then use that as the source for the webm. Feeding it the artifacts in the mp4 will hurt compression, and the extra generation of lossy compression will hurt, too. (I'm assuming the mp4 is what you produced for HTML5 video for browsers that support that format, and now you're making a fallback with VP8 or VP9). – Peter Cordes Apr 12 '15 at 2:38
1

There shouldn't be anything special about making a video for HTML5 video, so just look for any video encoding guide to learn about choosing how to trade off CPU time vs. bitrate vs. quality.

Hint: encode once, display many is a use case where it makes sense to spend as much CPU time as possible on the encode, to get the quality you want in as small a download as possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.