title: How do I configure ffmpeg & openh264 so that the video file can be opened in Windows Media Player 12
body: <p>I have successfully created h264/mp4 movie files with ffmpeg and the x264 library.</p>
  
  <p>Now I would like to change the h264 library from x264 to openH264. I could replace the x264 library with openH264, recompile ffmpeg and produce movie files, without changing my sources that produce the movie. The resulting movie opens fine in Quicktime on Mac, but on Windows, Windows Media Player 12 cannot play it.</p>
  
  <p>The documentation about Windows Media Player support for h264 is unclear.  <a href="https://support.microsoft.com/en-us/help/316992/file-types-supported-by-windows-media-player" rel="nofollow noreferrer">File types supported by Windows Media Player</a> states in the table that Windows Media Player 12 supports mp4, but the text below says:</p>
  
  <blockquote>
    <p>Windows Media Player does not support the playback of the .mp4 file format.</p>
  </blockquote>
  
  <p>From what I have observed, Windows Media Player 12 <strong>IS</strong> capable of playing h264/mp4 files, but only when created with x264.</p>
  
  <p>Does anyone know how I need to adjust the configuration of the codec/context so that the movie plays in Windows Media Player? Does Windows Media Player only support certain h264 profiles?</p>
  
  <p>I noticed the warning:</p>
  
  <p>[libopenh264 @ 0x...] [OpenH264] this = 0x..., Warning:bEnableFrameSkip = 0,bitrate can't be controlled for RC_QUALITY_MODE,RC_BITRATE_MODE and RC_TIMESTAMP_MODE without enabling skip frame</p>
  
  <p>With the configuration:</p>
  
  <pre><code>av_dict_set(&amp;options, "allow_skip_frames", "1", 0);
  </code></pre>
  
  <p>I could get rid of this warning, but the movie still does not play. Are there other options that need to be set so that the movie plays in Windows Media Player?</p>
  
  <p>Thank you for your help</p>
  
  <p>ffprobe output of the file that does play fine in Windows Media Player:</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_x264.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      title           : retina
      encoder         : Lavf57.56.100
      comment         : Creation Date: 2017-03-10 07:47:39.601
    Duration: 00:00:04.17, start: 0.000000, bitrate: 17497 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
        yuv420p, 852x754, 17495 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)
      Metadata:
        handler_name    : VideoHandler
  </code></pre>
  
  <p>ffprobe output of the file that does not play in Windows Media Player:</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_openh264.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      title           : retina
      encoder         : Lavf57.56.100
      comment         : Creation Date: 2017-03-10 07:49:27.024
    Duration: 00:00:04.17, start: 0.000000, bitrate: 17781 kb/s
      Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661),
        yuv420p, 852x754, 17779 kb/s, 24 fps, 24 tbr, 24k tbn, 48k tbc (default)
      Metadata:
        handler_name    : VideoHandler
  </code></pre>