4

I have a video stream with mime type video/h264 that streams live h.264 video from a security camera. I am trying to stream this real time and decode the h.264 frames (preferably hardware decode) and display them in a view. I have looked extensively for libraries or frameworks to support this but am not exactly sure which is the right approach. I have looked a little bit at the AVFoundation but not sure how to handle the video/h264 stream. Should I be grabbing each frame (I frame / P frame) from the stream and passing it the AVAssetReader? Any direction / sample code / library references would be extremely helpful!

HTTP/1.1 200 OK
Date: {date}
Connection: keep-alive
Cache-Control: no-cache, no-store
Expires: -1
Content-Type: multipart/x-mixed-replace;boundary=myboundary
Set-Cookie: stream={stream-id}; version=1

--myboundary
Content-Type: video/h264
Sync-Point: "yes" or "no"
Pre-roll: "yes" or "no"
Media-Start: "invalid" or {mediastart}
Media-End: "invalid" or {mediaend}
Stream-Start: "invalid" or {stream start time}
Stream-End: "invalid" or {stream end time}
Content-Length: {content-length}
X-Date: {x-date}

{image}
4

1 に答える 1

2

iOS でエレメンタリー h.264 を再生することはできません。[http pd download または hls] を再生する前に、mp4 または ts ストリームにラップすることで回避できます。ただし、何か他のもの (ffmpeg など) をデバイスにコンパイルしない限り、生の h.264 を再生することはできません。

于 2012-12-01T15:28:38.453 に答える