<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2015-04-12T02:41:10.127Z
2015-04-12T02:41:10.127Z
Peter Cordes
<p>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. </p>

<p>I'm currently using ffmpeg.</p>

<pre><code>ffmpeg -i INPUT.mp4 -b 614400 -s 960x540 -aspect 16:9 OUTPUT.webm
</code></pre>

<p>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?</p>

CC BY-SA 3.0
2015-03-17T19:51:31.660Z
related: http://video.stackexchange.com/questions/14728/encode-settings-for-html5-background-video/14730#14730
p2or
CC BY-SA 3.0
2015-04-12T02:38:50.143Z
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
<ffmpeg><webvideos>
HTML5 background video encoding settings
cusejuice
# HTML5 background video encoding settings

(Asked by: username_0 on 2015-03-17)

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?

**Tags:** ffmpeg, webvideos

> **Comments:**
> **username_1**: related: http://video.stackexchange.com/questions/14728/encode-settings-for-html5-background-video/14730#14730  
> **username_2**: 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).  

---

## 1 answers

### Answer by username_2 on 2015-04-12. Score: 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.


---

