Suggested Method to Play a Video

Hello,

I have been writing an RTSP client for an app and I'm at the point where I need to play a video of the images output from the HW decoder. What would be the best method to play a series of images, say an array of 30-60 images displayed for the duration of 1 second? I looked at the AVPlayer class and it doesn't provide the ability I need. Ideally I would like to provide some buffer that the class could reference and it would just read the buffer and program the display.

The issue is I am decoding the video on the client system, and the APIs do not have the necessary parameters. It seems like AVPlayer does all the work for a given URL, but I don't think it supports RTSP/RTP.

One possible solution is to use UIImageView to display an array of images. But I'm not sure if this is the correct usage of the class. I am still new to image formats and so on, so I'm not sure if there would be unnecessary overhead for converting CVImageBuffer (output of HW decoder) to UIImage. If this sounds like an idea that would work, please let me know.

If anyone knows of any helpful classes that could solve this use case, please let me know. Any help is appreciated, thank you.

Answered by capp in 740753022

I've decided to make an adjustment to the requirement of RTSP streaming to HTTP streaming. I think this is a much better option, as I've read Apple developed a HTTP streaming method in 2008 or something. So there would be much better support and it's unlikely the APIs are to change drastically in the future. I am okay with this solution as I would spend less time coding an app. RTSP is a legacy protocol and is not widely supported. I don't recommend anyone go down this path, especially if they are trying to prove a point for themselves. Just use the existing solutions.

Accepted Answer

I've decided to make an adjustment to the requirement of RTSP streaming to HTTP streaming. I think this is a much better option, as I've read Apple developed a HTTP streaming method in 2008 or something. So there would be much better support and it's unlikely the APIs are to change drastically in the future. I am okay with this solution as I would spend less time coding an app. RTSP is a legacy protocol and is not widely supported. I don't recommend anyone go down this path, especially if they are trying to prove a point for themselves. Just use the existing solutions.

Suggested Method to Play a Video
 
 
Q