title: FFMPEG H.264 encoding for HTML5 (and ultimately MPEG-DASH)
body: <p>I want to convert an MP4 file to an MPEG-DASH video capable of being played through the <a href="https://github.com/Dash-Industry-Forum/dash.js" rel="nofollow">DASH-IF HTML5 player</a> on Chrome. I use FFMPEG and MP4Box (from GPAC) to transcode the video and then split it, and keep getting a MEDIA_ERR_SRC_NOT_SUPPORTED error on the JavaScript console.</p>
  
  <p>From the (very sparse) information available online (see <a href="https://code.google.com/p/chromium/issues/detail?id=408552" rel="nofollow">this Chromium thread</a>), it would appear as though Chrome natively only supports MP4 files with the Constrained Baseline encoding profile, and is very strict on only supporting the "avc1.42E01E,mp4a.40.2" codecs.</p>
  
  <p>I have tried pretty much everything I can to encode the video from the command line, prior to splitting with MP4Box, with FFMPEG to get an H.264 video encoding with codec profile "avc1.42E01E", but it just keeps giving me "avc1.42C01E". Here's one of the (many) FFMPEG commands I've tried:</p>
  
  <pre><code>ffmpeg -y -i Sintel_-_Third_Open_Movie_by_Blender_Foundation.mp4 -profile:v baseline -level:v 30 -acodec libvo_aacenc -vcodec libx264 sintel-recoded.mp4
  </code></pre>
  
  <p>According to the ITU-T standard, sections 7.4.2.1.1 and A2.1-A2.3, a video encoding of "avc1.42E01E" implies constraint flags of 0xE0 (constraint_set flags 0, 1 and 2 are set), whereas "avc1.42C01E" implies constraint flags of 0xC0 (constraint_set flags 0 and 1 are set). The former (0xE0) implies conformance to the Baseline, Main and Extended profiles, whereas the latter (0xC0) implies conformance to only the Baseline and Main profiles.</p>
  
  <p>Apparently, FFMPEG doesn't support the Extended profile for H.264.</p>
  
  <p>Does anyone perhaps have any advice as to how to encode an MP4 file as "avc1.42E01E"? Ideally with FFMPEG, but I am open to using other encoders?</p>