1
votes

TL;DR

I need to convert full RTSP (A/V) stream from Axis IP cameras to be viewed in a fully-contained/not-full-screen div in an iOS browser. Think: "Youtube live stream as viewed from iOS browser". I've seen several links that hint at the issue. . .

. . .but they're either "incomplete" or out of date.

The solution must be local and remain behind site firewall (so no external services).

MORE DETAIL

I'm currently writing a custom "Axis IP Camera Manager" Vue/Laravel web app for a client. The initial requirements were very simple:

  1. scan network for axis devices and store addresses/info for future use

  2. display grid of MJPEG for selected camera(s).

The initial requirements were fairly straightforward. Now, though, there are additional requirements:

  1. Record RTSP stream to [seconds] long MP4 streams.

  2. Convert an RTSP stream from AXIS IP CAMERA to something viewable in both desktop and mobile browsers with full A/V.

I've successfully managed #3 by using ffmpeg to capture and store the stream to MP4. However, I'm no video aficionado, and the nature of #4 is still a bit fuzzy to me. Per my understanding I can't watch RTSP streams in a browser in iOS, but I also can't stream an "in-process" MP4 over HTTP. I've seen references to several items such as Red5, Live555, Wowza, ffserver (discontinued?), etc. but I'm completely unfamiliar with them. In the short term, I'm looking for a quick "live" conversion solution. In the long term, I'm interested in a deeper understanding of the issue(s) at hand. Any current info/expertise/links/manuals would be appreciated.

1
You can try the command here to view a "in-process" MP4. ffserver was slated for removal, but the developers dithered at the time of pulling the trigger.Gyan
In IOS Http browsers it is impossible to view a RTSP stream directly, Also if you convert your RTSP to HTTP Live Streaming (HLS) you will get a delay around 5 seconds so, using Http browser in IOS is not a good solution to view IP cams. You could to convert to MJPEG but then you will get a low quality "stream".Hokusai
@Mulvya, yeah, that only complicates matters, but I appreciate the input.humble_coder
@hokusai, yup, I'm well aware, hence my "conversion" question. I expect some delay. I spoke to the folks at Red5 and they mentioned that their product would do what I needed, but there was a 20 second delay. Currently I'm just pulling the MJPEG stream (which is fine), but I need some mechanism by which to at least convert/sync the accompanying audio for iOS consumption.humble_coder

1 Answers

1
votes

The IOS Device is not supported to play the RTSP Stream Video. First You have to encode the stream into some codec supported by IOS. Then publish it using APPLE HTTP LIVE STREAMING. You can read the artical relate to it:

https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-SW1

http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/