Search code examples
iosrtsplive-streamingwowza

Live stream implementation using RTSP protocol


I'm trying to gain access to a live stream through the RTSP protocol on iOS. I'm trying to run the example from this website: http://www.gdcl.co.uk/2013/02/20/iOS-Video-Encoding.html and it's advertised that you can just take the url (rtsp://) and paste it into quicktime player, VLC or some other means, but whenever I try it fails. When I try in quicktime player it gives me this error: The document “Macintosh HD” could not be opened. The file may be damaged or may not be a movie file that is compatible with QuickTime Player.

What am I doing wrong? Is the example broken or do I need to update some specs in the code. I'm running iOS 9.3 and it's told to work > 7.0.


Solution

  • I was able to play this back on VLC when compiling and running on my iOS device. You need to ensure that you are on WiFi (vs LTE or 3G). I'm on iOS 9.2.1 and played back with VLC version 2.2.2.

    You can then take it a step further as I was successful in ingesting it into Wowza via Stream file with the following configuration:

    {
      uri : "rtsp://[rtsp-address-as-published-on-the-app]",
        streamTimeout:12000,
        reconnectWaitTime:12000,
        rtpTransportMode:"udp",
        rtspValidationFrequency:15000,
        rtspFilterUnknownTracks:true,
        rtspStreamAudioTrack:false,
        rtspStreamVideoTrack:true,
        rtpDebugSession:true,
        rtspSessionTimeout:12000,
        rtspConnectionTimeout:12000
    }
    

    I would suggest reviewing what the console logs say in your iOS application (xcode) and then also take a look at your VLC error messages/logs as well to see what the exact issue is when you try to playback.