finlir
finlir

Reputation: 230

iOS, FFmpeg render video with UIimage vs OpenGL

I have an IP camera that streams h264 video over RTSP. On iOS I use FFmpeg to capture the RTSP stream and decode the frames then render with an UIimage and UIimageview.

I have seen examples of of rendering video from FFmpeg, they all seem to use OpenGL ES or the SDL library.

My question is what are the benefits for using OpenGL? since rendering with UIimage is easy and seem to work fine.

Upvotes: 2

Views: 2865

Answers (1)

foundry
foundry

Reputation: 31745

  • SDL and OpenGL are portable, cross-platform standards

  • These libraries use the GPU for processing data. This is really efficient for graphics processing and enables you - for example - to apply realtime filters to the video.

Apple offers CIImage for processing image data on the GPU. This can be a more cocoa-centric way of providing some of the benefits of openGL and SDL. See Are the Core Image filters in iOS 5.0 fast enough for realtime video processing? for some useful discussion of this.

If you don't need to apply filters, and don't require cross-platform code, your working method is fine.

Upvotes: 2

Related Questions