<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code &#8211; Actino</title>
	<atom:link href="/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 17 May 2017 22:21:52 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>Encoding Video For The Web</title>
		<link>/other/encoding-video-for-the-web/</link>
					<comments>/other/encoding-video-for-the-web/#respond</comments>
		
		<dc:creator><![CDATA[Mr Administrator]]></dc:creator>
		<pubDate>Fri, 13 Sep 2013 13:39:56 +0000</pubDate>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Code]]></category>
		<guid isPermaLink="false">http://paulo72.com/?p=1021</guid>

					<description><![CDATA[<p>How to encode mp4 video files that work with HTML5 and Flash in Android, iOS, IE9 and the rest.</p>
<p>The post <a rel="nofollow" href="/other/encoding-video-for-the-web/">Encoding Video For The Web</a> appeared first on <a rel="nofollow" href="/">Actino</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2 id="the-problem"><a href="#the-problem" class="heading-link"><i class="glyphicon glyphicon-link">#</i></a>The Problem</h2>
<p>To try and encode video that plays in all of the following:</p>
<ul>
<li>iPhone (Safari, Chrome)</li>
<li>iPad (Safari, Chrome)</li>
<li>Android (Browser and Dolphin)</li>
<li>Windows (IE7 and up, Chrome, Firefox, Opera etc.)</li>
<li>OS X (All current browsers)</li>
</ul>
<p>Sounds easy? Just encode an MP4 in <a href="http://handbrake.fr/">HandBrake</a>, and <a href="http://www.longtailvideo.com/">JWPlayer</a> will do the rest? Nearly.</p>
<p>JWPlayer will work just fine however the various different devices can be pretty picky about the exact encoding format. Android and IE9 in particular get all distressed and soil themselves if it isn&#8217;t just-so.</p>
<h2 id="the-solution"><a href="#the-solution" class="heading-link"><i class="glyphicon glyphicon-link">#</i></a>The Solution</h2>
<p>After hours of Googling and experimentation with encoding formats and details these are the Handbrake settings that worked for me.</p>
<p>The significant option selections are highlighted with red circles.</p>
<img loading="lazy" class="alignnone size-large wp-image-1292" src="/wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-1024x720.png" alt="" width="1024" height="720" srcset="/wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-1024x720.png 1024w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-300x211.png 300w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-768x540.png 768w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-1400x985.png 1400w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-1344x945.png 1344w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06-672x473.png 672w, /wp-content/uploads/2013/09/Screen-Shot-2017-04-16-at-17.48.06.png 1848w" sizes="(max-width: 1024px) 100vw, 1024px" />
<p>The key here is to choose MP4, encoded in x264.</p>
<p>The ‘Level: 3’ and ‘Profile: Baseline’ bit is for support on older Android devices. Checking ‘Web Optimised’ moves the MOOV Atom to the front of the video, which means that it streams properly (otherwise your browser has to download the entire video before it can start to play).</p>
<p>I don&#8217;t think I changed any audio settings. These see to be the default settings for x264 and they work just fine.</p>
<a href="/wp-content/uploads/2013/09/audio.png"><img loading="lazy" class="alignnone size-full wp-image-1023" src="/wp-content/uploads/2013/09/audio.png" alt="audio" width="1072" height="750" srcset="/wp-content/uploads/2013/09/audio.png 1072w, /wp-content/uploads/2013/09/audio-300x210.png 300w, /wp-content/uploads/2013/09/audio-768x537.png 768w, /wp-content/uploads/2013/09/audio-1024x716.png 1024w, /wp-content/uploads/2013/09/audio-672x470.png 672w" sizes="(max-width: 1072px) 100vw, 1072px" /></a>If you started off by using a preset you might find that Handbrake has re-sized your videos to a more standard aspect ratio. Click ‘Picture settings’ at the top of the main interface to see the size at which your video will be output.</p>
<p>If they are not as you wish then change them here. Uncheck the ‘Keep Aspect Ratio’ option if it will not allow you to select your preferred dimensions, and  switch ‘Anamorphic’ to none (unless you want the black letterboxing effect). Also check the ‘Cropping’ is set to zero.</p>
<p><a href="/wp-content/uploads/2013/09/picture.png"><img loading="lazy" class="alignnone size-full wp-image-1024" src="/wp-content/uploads/2013/09/picture.png" alt="picture" width="573" height="276" srcset="/wp-content/uploads/2013/09/picture.png 573w, /wp-content/uploads/2013/09/picture-300x145.png 300w" sizes="(max-width: 573px) 100vw, 573px" /></a>
<h2 id="the-code"><a href="#the-code" class="heading-link"><i class="glyphicon glyphicon-link">#</i></a>The Code</h2>
<p>If you are using html5 &lt;video&gt; tags you won&#8217;t need the below. We needed to provide a Flash fallback as our browser support went back to pre-html5 browsers.</p>
<pre><code class="language-markup">&lt;div id="myVideo"&gt;&lt;/div&gt;
&lt;script type="text/javascript" src="jwplayer.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
  jwplayer.key="thisisthejwplayerauthorisationkey=="
  jwplayer("myVideo").setup({
    file:     "vip9.mp4"
    width:    720
    height:   400
    primary:  "flash"
    analytics: {
      enabled: false
      cookies: 
    }
  });
&lt;/script&gt;</code></pre>
<p>The post <a rel="nofollow" href="/other/encoding-video-for-the-web/">Encoding Video For The Web</a> appeared first on <a rel="nofollow" href="/">Actino</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/other/encoding-video-for-the-web/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
