title: How to play video on iOS that's loaded manually from a socket?
body: <p>Rather tricky one this...</p>
  
  <p>I'm trying to stream a video (H264) across a network on iOS. However, I'm getting the video data into a buffer through an open socket to the remote server (using CocoaAsyncSocket), so I don't have a URL to the video that I can use to create an AVAsset or an MPMoviePlayer. The video is a live stream, so the data will just keep coming (i.e. No set duration) if that makes any difference.</p>
  
  <p>I'm having to do it this way as the server is an RTSP server. I've written my own RTSP client for the sending of commands and receiving of responses, and now I'm trying to do something useful with the video data that comes over the connection.</p>
  
  <p>Any ideas on how I can play back this video?  The only things I can think of currently are somehow saving to a file and loading that (but I don't see how that'll work, as I'll be continually loading new data), or resorting to doing it manually somehow with something like ffmpeg. And no, unfortunately I can't make the server do HTTP Live Streaming instead.</p>
  
  <p>Any help would be greatly appreciated!</p>