{"id":267,"date":"2022-11-30T09:25:46","date_gmt":"2022-11-30T09:25:46","guid":{"rendered":"https:\/\/www.simons.tools\/en\/?p=267"},"modified":"2024-03-14T17:24:50","modified_gmt":"2024-03-14T17:24:50","slug":"","status":"publish","type":"post","link":"https:\/\/www.simons.tools\/de\/optimize-video-for-the-web\/","title":{"rendered":"Unbenannt","raw":""},"content":{"rendered":"","protected":false,"raw":""},"excerpt":{"rendered":"","protected":false,"raw":""},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_en_post_content":"<!-- wp:heading {\"level\":4} -->\n<h4 class=\"wp-block-heading\">VP8<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p><code>libvpx<\/code> is the VP8 video encoder for \u200bWebM. <a href=\"https:\/\/trac.ffmpeg.org\/wiki\/Encode\/VP8\">FFmpeg and WebM Encoding Guide<\/a> will walk you through webm specifics.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>In this example, <code>input.mov<\/code> is converted to <code>output.webm<\/code> with a constant rate factor of <code>10<\/code> (lower is higher quality) at a bitrate of <code>1M<\/code>. Changing the bitrate to something lower (e.g. <code>700K<\/code>) will result in lower file sizes and lower quality. If your video does not have audio, you may leave off the <code>-acodec libvorbis<\/code> part.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">ffmpeg -i input.mov -vcodec libvpx -qmin 0 -qmax 50 -crf 10 -b:v 1M -acodec libvorbis output.webm<\/pre>\n<!-- \/wp:preformatted -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4 class=\"wp-block-heading\"><a href=\"https:\/\/gist.github.com\/Vestride\/278e13915894821e1d6f#vp9\"><\/a><\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4 class=\"wp-block-heading\">VP9<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>VP9 can encode videos at half the file size \ud83d\ude04\ud83d\udc4f You can check out Google's <a href=\"https:\/\/sites.google.com\/a\/webmproject.org\/wiki\/ffmpeg\/vp9-encoding-guide\">VP9 encoding guide<\/a> for their recommend settings or the <a href=\"https:\/\/trac.ffmpeg.org\/wiki\/Encode\/VP9\">FFmpeg VP9 guide<\/a>.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Here's an example from the FFmpeg guide:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">ffmpeg -i input.mov -vcodec libvpx-vp9 -b:v 1M -acodec libvorbis output.webm<\/pre>\n<!-- \/wp:preformatted -->\n\n<!-- wp:paragraph -->\n<p>And here's Google's \"Best Quality (Slowest) Recommended Settings\". You need to run the first line(s). It will create a log file (and warn you the out.webm is empty). On the second pass, the video will be output.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">ffmpeg -i &lt;source&gt; -c:v libvpx-vp9 -pass 1 -b:v 1000K -threads 1 -speed 4 \\\n  -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 \\\n  -g 9999 -aq-mode 0 -an -f webm \/dev\/null\n\n\nffmpeg -i &lt;source&gt; -c:v libvpx-vp9 -pass 2 -b:v 1000K -threads 1 -speed 0 \\\n  -tile-columns 0 -frame-parallel 0 -auto-alt-ref 1 -lag-in-frames 25 \\\n  -g 9999 -aq-mode 0 -c:a libopus -b:a 64k -f webm out.webm\n<\/pre>\n<!-- \/wp:preformatted -->\n\n<!-- wp:paragraph -->\n<p><a href=\"https:\/\/gist.github.com\/Vestride\/278e13915894821e1d6f\">https:\/\/gist.github.com\/Vestride\/278e13915894821e1d6f<\/a><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Maybe needed for iOS Safari?? -c:v libx265 -crf 28 -movflags faststart<\/p>\n<!-- \/wp:paragraph -->","_en_post_name":"optimize-video-for-the-web","_en_post_excerpt":"","_en_post_title":"FFmpeg optimize video for the web in filesize","_de_post_content":"","_de_post_name":"","_de_post_excerpt":"","_de_post_title":"","edit_language":"de","footnotes":""},"categories":[12],"tags":[],"class_list":["post-267","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":4,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"predecessor-version":[{"id":308,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/posts\/267\/revisions\/308"}],"wp:attachment":[{"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simons.tools\/de\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}