How to publish and play a live stream (native RTP encoder with SDP file)

https://www.wowza.com/docs/how-to-set-up-live-streaming-using-a-native-rtp-encoder-with-sdp-file

I simply created an HTML web page with a link to the rtsp url. I opened the HTML page in the browser on the phone and clicked the link. The phone then played the stream in the media player. I have a Motorola Droid. I did most of my testing over WiFi. Be sure you have all the proper UDP ports open for streaming.

It is important that you are running the most recent version of Wowza.

Charlie

Can ipod streaming be done without an sdp file? For example could I use the stream name alias module to alias the following streams and play them through an ipod touch? The reason I ask is because that is what I’m trying to do and the wowza server log says it can’t find the stream name’s as files in the content folder.

aliasmap.stream.txt:

first=rtsp://user:pass@10.6.17.6/axis-media/media.amp

second=udp://@239.226.12.34:1234

This works great in flash with server = rtmp://wowza-server-ip/rtplive and stream = first or second.

This is what I’m trying in safari on an iPod touch with the wowza java file not found error:

http://wowza-server-ip:1935/rtplive/first/playlist.m3u8

http://wowza-server-ip:1935/rtplive/second/playlist.m3u8

Stream Manager shows they are streaming.

I guess I may not understand the difference between stream type live and rtplive?

Hi,

I’m having a strange problem.

I set up Wowza for live and VOD, with support for Cupertino, San Jose and smooth streams.

I use VLC to create a RTP/MPEG TS stream as live input.

VOD works great with all clients. But live works only with Flash clients. It works with smooth streaming only as long as there is a Flash client connected. When the Flash client quits, smoothstreaming works for a few seconds (emptying the segments buffer ?).

As I’m sure this is not normal, I think I have a configuration problem somewhere but I’m not sure where to look (input stream tweak ? config files ?).

Please, help…

(I can supply config files/logs/VLC set up)

Thanks and have a nice day,

Kamlro

You must use the stream manager, conf/StartupStreams.xml or the appInstance.startMediaCaster(…) API to start the stream and keep it running for HTTP streaming. This described in the tutorial for MPEG-TS streaming. This step is required. There is not a way around it:

Publish a live stream from an MPEG-TS encoder)

Charlie

If the stream you are trying to play is mpegts.stream then that is the stream you need to start in teh stream mananger. It looks like in the stream manager you are starting a stream named test. That is most likely why it is not working. If that is not the case then please outline in detail the exact steps you are following or carefully follow these instructions:

https://www.wowza.com/docs/how-to-publish-and-play-a-live-stream-mpeg-ts-based-encoder)

Just follow the instructions carefully. Be sure to follow the instructions for all players (and not the Flash only instructions).

Charlie

Happy to hear it is working.

Charlie

The way to debug this is look at the log files and see when the stream map files are read and the how the alias is matched.

Richard

Congaquay,

Follow the steps in this guide:

https://www.wowza.com/forums/showthread.php?t=7870

Richard

I need a wowza server at the same time to release two sets can be broadcast live on the iphone, how to set?

If you mean how to use one live stream to play on Flash and IPhone, then just follow the guide at the top of this thread.

If you mean you want two streams of different bitrate, then you have to publish two streams, Wowza will not create two streams from one.

Richard

Yes, see the “Multi-bitrate Live Streaming” section in the first post of this thread

http://community.wowza.com/t/-/65

Each stream must be keyframe and timecode aligned, so make sure that each encoding uses the same keyframe frequency.

Richard

Hi Guys,

I would like to know, what VideoPlayer your are using on Android Phones, for test the RTSP Video in this device, I have 2 Android Phones, the HTC G1 and the new Motorola, but in both cases does not work, but if I try with VLC the stream work very well.

Thanks for any tips about this.

Regards,

Alejandro

Probably a silly question, but I wasn’t sure so I thought I’d ask.

We have an origin and repeater setup working. The origin has video published to it by a simple browser based flash client, it’s not going through any intermediary or encoding process.

The repeater just repeats these streams out and they’re also consumed via a flash client through a standard website.

We now want to also consume the streams on the iPhone. We’ve setup the origin sever as:

liverepeater-origin

cupertinostreamingpacketizer, smoothstreamingpacketizer

cupertinostreaming, smoothstreaming

smoothStreamingMediaMajorVersion 2

and the child server as:

liverepeater-repeater

cupertinostreamingrepeater, smoothstreamingrepeater

cupertinostreaming, smoothstreaming

smoothStreamingMediaMajorVersion 2

In doing this, the normal web based video still works fine, but we get errors when attempting to push the iPhone/iPad stating:

LiveStreamPacketizerCupertino.handleHolder: Invalid video codec for iPhone/iPod: 2

My first thoughts are that because it’s being viewed on an iPhone/iPad it needs to be h264 and my hope was that Wowza does this conversion for you. My thinking NOW is that Wowza doesn’t do the conversion and we would need to actually encode before publishing. Is this correct or do you need more to go on to determine the error?

Thanks!

********** UPDATE: received a respone via email already. Thanks Richard!

I need a wowza server at the same time to release two sets can be broadcast live on the iphone, how to set?

Sorry, did not say clearly.

I mean, receives two streams at the same time released to iphone, iphone can choose to play

Hi Charlie,

i am a newbie with wowza. i followed your tutorial, I tried playback with link for flashplayer with rtmp protocol work good, link for iphone, ipod touch with http protocol work good but when i tried playback with rtsp link, the real player and quicktime player show “switching transport”, nothing else happen. I tried rtsp link with vlc it work.

I googled for “switching transport” on quicktime and real player, people said it because of firewall, i turned it off but still the same.

Do you have any idea to fix this?

Thanks and regard!

Hi,

I’m having a strange problem.

I set up Wowza for live and VOD, with support for Cupertino, San Jose and smooth streams.

I use VLC to create a RTP/MPEG TS stream as live input.

VOD works great with all clients. But live works only with Flash clients. It works with smooth streaming only as long as there is a Flash client connected. When the Flash client quits, smoothstreaming works for a few seconds (emptying the segments buffer ?).

As I’m sure this is not normal, I think I have a configuration problem somewhere but I’m not sure where to look (input stream tweak ? config files ?).

Please, help…

(I can supply config files/logs/VLC set up)

Thanks and have a nice day,

Kamlro

Hi Charlie,

Thanks for your help.

I did use the stream manager to declare the input live stream.

(After your reply, I did test that I run into the exact same problem without declaring the stream in stream manager : Wowza is able to stream a live stream to Flash clients even though the stream is not declared using stream manager (!?) [and while it streams to Flash clients, it is able to stream it to Smooth clients too]).

So maybe my stream manager is not doing what it should… (?)

On the start.sh output, the declaration of the live stream (thru stream manager) is only complaining about the SDP file missing :

WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: /usr/local/WowzaMediaServer/content/test

Would that be a problem ?

Here are the complete process’s logs :

(only INFO type before this)

INFO server comment - Wowza Media Server is started!

(then I declare the live input stream thru stream manager)

INFO application app-start definst live/definst

INFO server comment - RTPMediaCaster.create[25781085]

INFO server comment - RTPMediaCaster.init[25781085]

INFO server comment - RTPMediaCaster.Reconnector[25781085:live/definst:test]: start: 1

INFO server comment - HTTPStreamManager.onHTTPRequest: Publish stream successfully started [live/definst]: flv:test

INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/definst]: /usr/local/WowzaMediaServer/content/test

WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: /usr/local/WowzaMediaServer/content/test

(then I run a smooth client)

INFO application app-start definst live/definst

INFO server comment - RTPMediaCaster.create[25781085]

INFO server comment - RTPMediaCaster.init[25781085]

INFO server comment - RTPMediaCaster.Reconnector[25781085:live/definst:test]: start: 1

INFO server comment - HTTPStreamManager.onHTTPRequest: Publish stream successfully started [live/definst]: flv:test

INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/definst]: /usr/local/WowzaMediaServer/content/test

WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: /usr/local/WowzaMediaServer/content/test

(I get a missing manifest file on the client side (I use the smooth client from the provided examples))

(Now I run a Flash client (from the provided examples))

INFO session connect-pending 192.168.0.176 -

INFO session connect 192.168.0.176 -

INFO stream create - -

INFO server comment - MediaStreamMediaCasterPlay: startPlay

INFO server comment - RTPMediaCaster.create[24337190]

INFO server comment - RTPMediaCaster.init[24337190]

INFO server comment - RTPMediaCaster.Reconnector[24337190:live/definst:mpegts.stream]: start: 1

INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/definst]: URI: udp://239.0.0.1:5004

INFO stream create - -

INFO stream publish mpegts.stream -

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

INFO server comment - MulticastTransport.bind: 239.0.0.1/5004

INFO server comment - LivePlayer.play[live/definst/mpegts.stream]: Dynamic Stream Markers are on.

INFO server comment - RTPDePacketizerMPEGTS.handleRTPPacket: MPEG-TS over RTP

INFO server comment - RTPDePacketizerMPEGTS.handleRTPPacket: audioPID[AAC]: 0x48

INFO server comment - RTPDePacketizerMPEGTS.handleRTPPacket: videoPID[H264]: 0x49

INFO server comment - MulticastTransport.firstPacket: 239.0.0.1/5004

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

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

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

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

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

INFO server comment - LiveStreamPacketizerSanJose.handlePacket: Video codec: H264

INFO server comment - LiveStreamPacketizerSanJose.handlePacket: Audio codec: AAC

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

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

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

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

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

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

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

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/mpegts.stream]: Audio codec:AAC isCompatible:true

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/mpegts.stream][mp4a.40.2]: AAC Audio info: {AACFrame: size: 0, rate: 48000, channels: 2, samples: 1024, errorBitsAbsent: true, profileObjectType: “LC”}

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

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

INFO server comment - LiveStreamPacketizerCupertino.handlePacket[live/definst/mpegts.stream][avc1.100.32]: 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: profile: “High”, level: 3.2, frameSize: 368x246, displaySize: 332x246, PAR: 19:21, crop: l:0 r:0 t:0 b:5, frameRate: 25.0}

INFO stream play mpegts.stream -

INFO server comment - LiveStreamPacketizerSmoothStreaming.flushPendingAudio: Bitrate[live/definst/mpegts.stream]: 100015

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:audio id:0 count:94 duration:2005

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:audio id:1 count:94 duration:2005

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:audio id:2 count:94 duration:2006

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:1 a/v/k:555/279/3 duration:11781

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

INFO server comment - LiveStreamPacketizerSmoothStreaming.flushPendingVideo: Bitrate[live/definst/mpegts.stream]: 1254889

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:video id:0 count:44 duration:1760

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:1 a/v/k:184/278/3 duration:11781

(…)

(the video is visible on the Flash client)

(Now I ran the Smooth client)

INFO smoothstreaming connect 606465274 -

INFO stream create mpegts.stream -

INFO stream play mpegts.stream -

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:audio id:10 count:94 duration:2005

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:3 a/v/k:483/258/3 duration:10280

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:3 a/v/k:161/257/3 duration:10280

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:video id:7 count:93 duration:3720

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:video id:8 count:40 duration:1600

INFO server comment - LiveStreamPacketizerSmoothStreaming.addFragment[live/definst/mpegts.stream]: Add chunk: type:video id:9 count:124 duration:4960

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:4 a/v/k:489/261/3 duration:10400

(…)

(The smooth client sees the video OK when I press ‘play’)

(Now the Flash client quits (‘stop’ button))

INFO server comment - MediaStreamMediaCasterPlay: close

INFO stream stop mpegts.stream -

INFO stream destroy mpegts.stream -

INFO session disconnect 1905387573 -

INFO server comment - LiveStreamPacketizerSanJose.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:10 a/v/k:355/190/2 duration:7560

INFO server comment - LiveStreamPacketizerCupertino.endChunkTS[live/definst/mpegts.stream]: Add chunk: id:10 a/v/k:118/189/2 duration:7560

INFO server comment - RTPMediaCaster.shutdown[12916244:live/definst:mpegts.stream]: mpegts.stream

INFO server comment - RTPMediaCaster.disconnect[12916244:live/definst:mpegts.stream]

INFO server comment - RTPMediaCaster.closeRTPSession[12916244:live/definst:mpegts.stream]

INFO stream unpublish mpegts.stream -

INFO stream destroy mpegts.stream -

INFO server comment - MediaStreamMap.removeLiveStreamPacketizer[live/definst/mpegts.stream]: Destroy live stream packetizer: cupertinostreamingpacketizer

INFO server comment - MediaStreamMap.removeLiveStreamPacketizer[live/definst/mpegts.stream]: Destroy live stream packetizer: smoothstreamingpacketizer

INFO server comment - MediaStreamMap.removeLiveStreamPacketizer[live/definst/mpegts.stream]: Destroy live stream packetizer: sanjosestreamingpacketizer

INFO server comment - RTPMulticastListener.run(stop)

WARN server comment - HTTPStreamerAdapterSmoothStreaming.getAppInstance: LiveStreamPacketizer not found [live/mpegts.stream/QualityLevels(1694170)/Fragments(video=62070990000)/WowzaSessions(606465274).ismv]: smoothstreamingpacketizer

WARN server comment - HTTPStreamerAdapterSmoothStreaming.getAppInstance: LiveStreamPacketizer not found [live/mpegts.stream/QualityLevels(96253)/Fragments(audio=62089580000)/WowzaSessions(606465274).isma]: smoothstreamingpacketizer

WARN server comment - HTTPStreamerAdapterSmoothStreaming.getAppInstance: LiveStreamPacketizer not found [live/mpegts.stream/QualityLevels(96253)/Fragments(audio=62109630000)/WowzaSessions(606465274).isma]: smoothstreamingpacketizer

(the smooth client runs for a while and then stops)

INFO stream stop mpegts.stream -

INFO stream destroy mpegts.stream -

INFO smoothstreaming disconnect 606465274 -

What I understand is that when the Flash client quits, Wowza kills the input stream, making it unavailable to other clients.

I don’t understand why this happens…

Thanks to help…

Karim

Hi Charlie,

Thanks for your help…

Stupid me… As you noticed, I wrongly named the input stream declared thru stream manager.

It now works flawlessly…

Thanks a lot for your help and have a nice day,

Karim