Receive video stream RTSP and or ONVIF

Hi all,

I’m trying to port one of my windows programs to an iOS application finally and am having problems. I work with a number of video streams from web cameras (mostly using RTSP streams or most recently with ONVIF compliant cameras).

http://www.onvif.org

I’m very new to iOS and have limited exposure to the framework so have tried using the standard web viewer with some success as it works with a motion jpeg stream well.

The issue is that I’m working towards a H264 decode that works in VLC and similar (from the camera manual):

DESCRIBE rtsp://myserver/axis-media/media.amp
?videocodec=h264&resolution=640x480 RTSP/1.0
CSeq:  0
User-Agent:  Axis AMC
Accept:  application/sdp

Obviously when I get this in the right format within a web viewer container, it wants me to open an app (such as VLC). Is there anyway to decode and display a RTSP stream within a Xojo app either natively or with a plugin?

Thanks very much once again all!

Cheers,
James

Interesting topic - I am also in pursuit of coding RTSP capabilities into XOJO for Desktop, laptop and eventually IOS apps. I am currently looking into the HTML Viewer. Other than that no luck

On the desktop you used to be able to use QuickTime on the Mac and Windows to decode RTSP. But thats been replaced by the new Mac only AVFoundation stuff that doesn’t do but a small fraction of what quicktime used to do. It won’t do RTSP at all. My desktop app that decodes RTSP I’m actually still compiling with an almost 3 year old version of Xojo so that it will still let me use the quicktime libs. I’m going to have to start importing the VLC libraries to do the streaming in a future version, but thats going to be a pain in the neck as there are bugs in them that leak memory like crazy when decoding RTSP, so it will have to do the decoding in a separate process that can be restarted periodically to reclaim memory. What a mess. And none of those things will work on iOS or with an onvif connection.

I have read through the onvif documentation, I’m sure you could write your own parser for it and create your own input to AVFoundation so that it can be decoded and handed through for display or conversion. You could do the same for RTSP for that matter. There is a lot of work there that is non-trivial though, unfortunately I’m not aware of any plugins or sample code for doing such a thing on iOS.

If you decide to tackle such a project please let us know, we’ll all be watching with some interest!

RTP and RTSP is easy on Desktop using VLC & MBS Plugins. :wink:

Do you mean you have implemented an RTSP server using MBS Plugins coded using XOJO. Then you utilized VLC as the viewer? If so I am interested in learning how you did this.

A Server to receive RTSP?

To perform the work QT now does not or are you saying this is fully integrated into a XOJO app using MonkyBread Plugins. If so I am interested in learning how you did this.

Take a look at the VLC Examples in the MBS Examples please.

RTP Player was made with it.

BTW: @Christian Schmitz wrote a nice Documentation about his VLC Solution: http://www.macsw.de/plugin/PDF/MBS%20VLC%20Plugin.pdf :slight_smile:

Has anyone come up with a solution to James’ original question… i.e. RSTP under Xojo in iOS… In particular, I would like to display the video in an HTML Viewer.

Thanks…