title: RTMP stream on IE dies after ~1 second
body: <p>Follow-up from: <a href="https://stackoverflow.com/questions/23543517/rtmp-stream-plays-sound-for-1-second-then-stops-no-video-at-all">RTMP stream plays sound for 1 second, then stops - no video at all</a></p>
  <p>The behavior here is really strange.</p>
  <p>My config:</p>
  <pre><code>jwplayer('canvas').setup({
      file : &quot;stream.smil&quot;,
      width : 1024,
      height : 768,
      stagevideo : false,
      autostart : true
  });
  </code></pre>
  <p><code>stream.smil</code>:</p>
  <pre><code>&lt;smil&gt;
    &lt;head&gt;
      &lt;meta base=&quot;rtmp://192.168.1.160:1340/live/&quot; /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;switch&gt;
        &lt;video src=&quot;large&quot; width=&quot;1024&quot; height=&quot;768&quot; system-bitrate=&quot;2000000&quot; /&gt;
        &lt;video src=&quot;small&quot; width=&quot;640&quot; height=&quot;480&quot; system-bitrate=&quot;800000&quot; /&gt;
      &lt;/switch&gt;
    &lt;/body&gt;
  &lt;/smil&gt;
  </code></pre>
  <p>So, okay, turning off <code>stagevideo</code> (GPU rendering) helped with the white video, but the audio problem remains, though, I have some new information.</p>
  <p>My RTMP server is <a href="https://github.com/arut/nginx-rtmp-module" rel="nofollow noreferrer">nginx with rtmp module</a>, listening on <code>1340</code> (as smil suggests).<br />
  I have a Mobotix IP Camera which output I use as an input for my ffmpeg, that then feeds the RTMP server:</p>
  <pre><code>ffmpeg -f mxg -i &quot;http://admin:meinsm@192.168.1.161:80/control/faststream.jpg?stream=MxPEG&amp;needlength&quot; -f flv -ar 44100 -s 1024x768 &quot;rtmp://localhost:1340/live/large&quot;
  </code></pre>
  <p>Chrome, Firefox, Opera, Safari works as expected, IE though, that's a totally different miraculous world:</p>
  <ol>
  <li>Once I open the page, I can almost immediately hear audio, then it takes some time to load video, once it loads, it plays for about 1s, then the audio stops and video freezes.</li>
  <li>If I switch to a lower quality stream, same happens - I can almost immediately hear audio, takes time to load video, once loads - ~1s and dead.</li>
  <li>If I restart the ffmpeg feeder without pausing/closing the player/stream itself, then,  after a short amount of time the player starts to play both, the audio and the video with no interruptions. If at some point I change streams again or reload the page - we're back to #1. I can then again restart ffmpeg feeder and the video will continue as if nothing had happened.</li>
  </ol>
  <p>I feel that it might be an issue with the MxPEG live stream, because it uses it's own codec and has some differences from default codecs, one of them being <sup>(<a href="http://developer.mobotix.com/docs/params.html" rel="nofollow noreferrer">http://developer.mobotix.com/docs/params.html</a>)</sup>:</p>
  <blockquote>
  <p><strong>Instead of I-frames...</strong></p>
  <p>With the current MxPEG implementation, there is no way to tell the codec to include a full JPEG frame, say, every second or every 20 frames. Therefore, there's no I-Frame concept known from other codecs. But the way sketched above, jumping back one second and start decoding, may serve as a practical workaround.</p>
  </blockquote>
  <p>There is extra information about the codec itself available <a href="http://developer.mobotix.com/docs/how.html" rel="nofollow noreferrer">here</a>.</p>
  <p>Though, even if there is such a difference, that doesn't explain why it's only IE that doesn't work (though, it has no problems if I restart the feed while the player is reading from RTMP).</p>
  <p>I'm out of clues here, I have tried changing FLV codec to x264 with AAC - Chrome, Opera, Firefox, Safari works, IE doesn't (different problem though).</p>
  <p>I also tried feeding ffmpeg a static video file as input (Blenders' Sintel video, mp4) using the same options for RTMP output - there I had consistent problems, the video stuttered on all browsers, but it did play.</p>
  <p>But yes, somebody maybe have got a clue what is wrong here?</p>