title: Displaying mjpeg/h264 live streaming (with additional information) on a web page?
body: <p>Right now my goal is to grab a streaming video from an IP surveillance camera and display it on a web page.</p>
  
  <p>The camera allows to encode the streaming either in h264 or mjpeg, and transmits it by the RTSP protocol.</p>
  
  <p>The streaming has to be available for several kinds of devices (mainly computers, android smartphones and iphones).</p>
  
  <p>According to my findings it seems like the best option for doing that (in terms of latency) is to transmit the frames of the video through a websocket:
  <a href="http://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets" rel="nofollow">http://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets</a>.</p>
  
  <p>Almost all the implementations of this mechanism I've found are based on mjpeg since it's easier to get the video frames. 
  There's also a h264 player: <a href="https://github.com/131/h264-live-player" rel="nofollow">https://github.com/131/h264-live-player</a>, based on <a href="https://github.com/mbebenita/Broadway" rel="nofollow">https://github.com/mbebenita/Broadway</a>, which I didn't manage to run ( I would appreciate any help in that respect).</p>
  
  <p>Now the first question is: it is worth trying to work with h264 (since it saves a lot of bandwidth). Or would the h264 decode process probably introduce too much latency? </p>
  
  <p>I would also like to ask if anyone knows a better solution that the one I'm trying to implement.</p>
  
  <p>Finally, where I say "additional information" I mean that I might want to include some additional data associated with some video frames. (something like subtitles or telemetry data).</p>