Stream rtsp live feed from Axis Camera to IOS and Android

Hi,

I have a live feed from an Axis camera that I would like to stream to both IOS and android.

I have no problem setting up an rtp-live feed for Android using RTMP, but i cannot get the IOS stream working.

I guess i should be using a HLS stream but i havent been able to get one working.

when I try it with safari, the links shows up in itunes, but it wont play.

I am using Air/Flex for android and IOS for the client software.

I am quite new to wowza and and struggeling to understand all the concepts, so bare with me if this is a stupid question.

regards,

/Lars

I haven’t heard any reports yet of someone using RTMP + Air on iOS. Usually you would use an HLS (Cupertino) stream. If you’re new, start by getting a VOD stream working to your iOS device using Cupertino streaming.

Ensure that your encoding is compatible with iOS.

It looks like Wowza is connecting to the camera ok.

I see this:

(Video may not be playable on older iPhone and iPod touch devices where Baseline/Level 3.0 or lower is required) Video info: {

H264CodecConfigInfo: codec:H264, profile:Baseline, level:4.1, frameSize:704x576, displaySize:768x576, PAR:12:11}

And this:

WARN server comment - LiveStreamPacketizerSmoothStreaming.handlePacket[live/definst/camera.stream]: Fragment duration greater than suggested range of 1-4 seconds. Adjust keyframe interval accordingly: Fragment durations: [2.5,2.5,25.6]

So you’re getting info about the codec profile. And a warn about the keyframe interval. It looks like the camera is using level 4.1 but this Apple FAQ says only level 3.1 and under is supported.

You will want to check with your camera settings or support resources to configure the camera to use a supported format. Otherwise you will have to transcode.

Hi,

No i learned the hard way that IOS doesnt do RTMP :slight_smile:

thanks for the idea of starting vid a VOD stream, I will start with that.

Is there an easy way to check the encoding of a rtsp stream?

/Lars

Hi, I tried with a vod file, and that one plays nice in quicktime on osx using the playlist.m3u8 method.

When i try to set up my live feed however, it stil fails.

I am using the Application.xml downloaded from the live URL(https://www.wowza.com/downloads/tutorials/live/Application.xml).

Here is the output from the log:

Any ideas what i might be doing wrong?

INFO stream publish camera.stream -

INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.sessionStart: PLAY: rtsp://xxx.xxx.xxx.xxx/axis-media/media.amp?videocodec=h264

INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: PLAY: rtsp://xxx.xxx.xxx.xxx/axis-media/media.amp/

INFO server comment - RTPMediaCaster.Reconnector[580915386:live/definst:camera.stream]: done: 1

INFO server comment - firstPacket: TCP:$0

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: chunkDurationTarget: 10000

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: chunkDurationTolerance: 500

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: playlistChunkCount:4

INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: sanjosestreamingpacketizer:camera.stream

INFO server comment - SanJosePacketHandler.startStream[live/definst/camera.stream]

INFO server comment - LiveStreamPacketizerSanJose.handlePacket[live/definst/camera.stream]: Video codec: H264

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: chunkDurationTarget: 10000

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: chunkDurationTolerance: 500

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: audioGroupCount: 3

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: playlistChunkCount:3

INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: cupertinostreamingpacketizer:camera.stream

INFO server comment - CupertinoPacketHandler.startStream[live/definst/camera.stream]

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/camera.stream]: Video codec:H264 isCompatible:true

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/camera.stream][avc1.66.41]: H.264 (Video may not be playable on older iPhone and iPod touch devices where Baseline/Level 3.0 or lower is required) Video info: {

H264CodecConfigInfo: codec:H264, profile:Baseline, level:4.1, frameSize:704x576, displaySize:768x576, PAR:12:11}

INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: smoothstreamingpacketizer:camera.stream

INFO server comment - LiveStreamPacketizerSmoothStreaming.startStream[live/definst/camera.stream]

INFO server comment - firstPacket: TCP:$1

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/camera.stream]: Add chunk: id:1 a/v/k:0/2/1 duration:2600

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/camera.stream]: Add chunk: id:1 mode:TS a/v/k:0/1/1 duration:2600

INFO cupertino connect 387141965 -

INFO stream create camera.stream -

INFO stream play camera.stream -

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/camera.stream]: Add chunk: id:2 a/v/k:0/309/1 duration:5440

WARN server comment - LiveStreamPacketizerSmoothStreaming.handlePacket[live/definst/camera.stream]: Fragment duration greater than suggested range of 1-4 seconds. Adjust keyframe interval accordingly: Fragment durations: [2.5,2.5,25.6]

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/camera.stream]: Add chunk: id:2 mode:TS a/v/k:0/308/1 duration:5440

INFO server comment - LiveStreamPacketizerSmoothStreaming.flushPendingVideo: Bitrate[live/definst/camera.stream]: 1279995

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/camera.stream]: Add chunk: type:video id:0 count:1 duration:2560

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/camera.stream]: Add chunk: id:3 a/v/k:0/407/1 duration:52120

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/camera.stream]: Add chunk: type:video id:1 count:3 duration:2560

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/camera.stream]: Add chunk: id:3 mode:TS a/v/k:0/406/1 duration:52120

Thanks for the info!

using the following RTSP url to the camera i was able to stream HLS to safari on the iphone.

rtsp://xx.xxx.xxx.xxx/axis-media/media.amp?videocodec=h264&audio=0&streamprofile=Bandwidth

the streamprofile=Bandwidth sets bitrate to fixed, which seems to do the trick for the profile.

INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.sessionStart: PLAY: rtsp://xx.xxx.xxx.xxx/axis-media/media.amp?videocodec=h264&audio=0&streamprofile=Bandwidth

INFO server comment - RTPSessionDescriptionDataProviderBasicRTSPWorker.processResponse: PLAY: rtsp://xxx.xxx.xxx.xxx/axis-media/media.amp/

INFO server comment - RTPMediaCaster.Reconnector[99484925:live/definst:camera.stream]: done: 1

INFO server comment - firstPacket: TCP:$0

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: chunkDurationTarget: 10000

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: chunkDurationTolerance: 500

INFO server comment - LiveStreamPacketizerSanJose.init[live/definst/camera.stream]: playlistChunkCount:4

INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: sanjosestreamingpacketizer:camera.stream

INFO server comment - SanJosePacketHandler.startStream[live/definst/camera.stream]

INFO server comment - LiveStreamPacketizerSanJose.handlePacket[live/definst/camera.stream]: Video codec: H264

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: chunkDurationTarget: 10000

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: chunkDurationTolerance: 500

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: audioGroupCount: 3

INFO server comment - LiveStreamPacketizerCupertino.init[live/definst/camera.stream]: playlistChunkCount:3

INFO server comment - MediaStreamMap.getLiveStreamPacketizer: Create live stream packetizer: cupertinostreamingpacketizer:camera.stream

INFO server comment - CupertinoPacketHandler.startStream[live/definst/camera.stream]

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/camera.stream]: Video codec:H264 isCompatible:true

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/camera.stream][avc1.66.30]: H.264 Video info: {H264CodecConfigInfo: codec:H264,

profile:Baseline, level:3.0, frameSize:704x576, displaySize:768x576, PAR:12:11}