Wowza Community

Streaming RTSP live - Metadata appears to be bad

Hi,

I’m just starting to evaluate Wowza for streaming live from Android devices. I have an RTSP server running on localhost which responds to addresses such as rtsp://127.0.0.1:5554/257 where 257 is the stream name from the Android device. I’ve setup Wowza (running linux) and ran through the quick start guide and checked that the simple streaming example works.

Now I’ve created a live application using the “How-to-re-stream-video-from-an-IP-camera-(RTSP-RTP-re-streaming)” guide. I can see the wowza server connect to my RTSP server.

> DESCRIBE rtsp://127.0.0.1:5554/513 RTSP/1.0
> CSeq: 1
> Accept: application/sdp
> User-Agent: Wowza Media Server Pro (Wowza Media Server 3 Trial Edition (Expires: Apr 24, 2012) 3.0.5 build1220)
>
RTSP/1.0 200 OK
Date: Wed Apr 11 09:54:39 CST 2012
CSeq: 1
Content-Base: rtsp://127.0.0.1:5554/513/
Content-Type: application/sdp
Content-Length: 261
v=0
o=me 513 89 IN IP4 127.0.0.1
s=Rtp513
c=IN IP4 127.0.0.1/127
a=control:*
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420016;sprop-parameter-sets=Z0IAFukBQHsg,aM4BDyA=;
a=control:video
a=framerate:15
> SETUP rtsp://127.0.0.1:5554/513/video RTSP/1.0
> Transport: RTP/AVP/UDP;unicast;client_port=6970-6971
> CSeq: 2
> User-Agent: Wowza Media Server Pro (Wowza Media Server 3 Trial Edition (Expires: Apr 24, 2012) 3.0.5 build1220)
>
127.0.0.1:6970 (setup)
RTSP/1.0 200 OK
Date: Wed Apr 11 09:54:39 CST 2012
CSeq: 2
Session: 0
Transport: RTP/AVP;unicast;source=127.0.0.1;destination=127.0.0.1;client_port=6970-6971;server_port=35638-35639
Content-Length: 0
> PLAY rtsp://127.0.0.1:5554/513/ RTSP/1.0
> Session: 0
> CSeq: 3
> Range: npt=0.000-
> User-Agent: Wowza Media Server Pro (Wowza Media Server 3 Trial Edition (Expires: Apr 24, 2012) 3.0.5 build1220)
>
127.0.0.1:6970 (play)
RTSP/1.0 200 OK
Date: Wed Apr 11 09:54:39 CST 2012
CSeq: 3
Range: npt=0.000-
Session: 0
RTP-Info: url=rtsp://127.0.0.1:5554/513;seq=4381;rtptime=-756501277
Content-Length: 0

In the wowza console I can see the debug messages of the RTP packets being processed

DEBUG server comment - rtp[video:1139] {80 60 56 60 d4 ad 0f 44 00 00 02 01 5c 81 fb a0 }
DEBUG server comment -   nalUnit: hdr:41 sz:4183:4187 typ:SLICE
DEBUG server comment -   sliceType:0 frameType:2:P isISliceIsKey:true isAllISliceKey:false
DEBUG server comment -   writePacket[vid]: sz:4192 tc:1334104214752:3568099318:1334104181001:0 key:false
DEBUG server comment - LiveReceiver.checkFlush[live/_definst_/camera.stream][true,false,50]: tc:1334104214752>1334104214735 || rt:1334104181001>1334104181049
DEBUG server comment -   FU-A: tc:3568111428 st:true
DEBUG server comment - rtp[video:1139] {80 60 56 61 d4 ad 0f 44 00 00 02 01 5c 01 f7 c5 }
DEBUG server comment -   FU-A: tc:3568111428 st:false
DEBUG server comment - rtp[video:1139] {80 60 56 62 d4 ad 0f 44 00 00 02 01 5c 01 2f 1d }
DEBUG server comment -   FU-A: tc:3568111428 st:false
DEBUG server comment - rtp[video:1124] {80 60 56 63 d4 ad 0f 44 00 00 02 01 5c 41 1a 41 }
DEBUG server comment -   FU-A: tc:3568111428 st:false
DEBUG server comment - rtp[video:1118] {80 60 56 64 d4 ad 26 eb 00 00 02 01 5c 81 fd c0 }
DEBUG server comment -   nalUnit: hdr:41 sz:4471:4475 typ:SLICE
DEBUG server comment -   sliceType:0 frameType:2:P isISliceIsKey:true isAllISliceKey:false
DEBUG server comment -   writePacket[vid]: sz:4480 tc:1334104214820:3568105373:1334104181003:0 key:false
DEBUG server comment - LiveReceiver.checkFlush[live/_definst_/camera.stream][true,false,50]: tc:1334104214820>1334104214802 || rt:1334104181003>1334104181051
DEBUG server comment -   FU-A: tc:3568117483 st:true
DEBUG server comment - rtp[video:1118] {80 60 56 65 d4 ad 26 eb 00 00 02 01 5c 01 e4 01 }
DEBUG server comment -   FU-A: tc:3568117483 st:false
DEBUG server comment - rtp[video:1118] {80 60 56 66 d4 ad 26 eb 00 00 02 01 5c 01 84 f3 }
DEBUG server comment -   FU-A: tc:3568117483 st:false
DEBUG server comment - rtp[video:1103] {80 60 56 67 d4 ad 26 eb 00 00 02 01 5c 41 28 30 }
DEBUG server comment -   FU-A: tc:3568117483 st:false
DEBUG server comment - rtp[video:1432] {80 60 56 68 d4 ad 3e 92 00 00 02 01 7c 85 b8 40 }
DEBUG server comment -   nalUnit: hdr:41 sz:4486:4490 typ:SLICE
DEBUG server comment -   sliceType:0 frameType:2:P isISliceIsKey:true isAllISliceKey:false
DEBUG server comment -   writePacket[vid]: sz:4495 tc:1334104214887:3568111428:1334104181005:0 key:false
DEBUG server comment - LiveReceiver.checkFlush[live/_definst_/camera.stream][true,false,50]: tc:1334104214887>1334104214870 || rt:1334104181005>1334104181053
DEBUG server comment -   FU-A: tc:3568123538 st:true
DEBUG server comment - rtp[video:1432] {80 60 56 69 d4 ad 3e 92 00 00 02 01 7c 05 5b a7 }
DEBUG server comment -   FU-A: tc:3568123538 st:false

But the stream doesn’t play in the live stream example player (usr/local/WowzaMediaServer-3.0.5/examples/LiveVideoStreaming/client/live.html) and I get the following warnings in the error log

WARN    server  comment 2012-04-11      09:55:17        -       -       -       -       -       2400.479        -       -       -       -       -       -       --       MediaReaderFLV.open: Metadata appears to be bad: camera.stream

My camera.stream file contains

rtsp://127.0.0.1:5554/257

Here is the Application.xml I’m using. As you can see I’ve tried many of the properties suggested in the RTP/RTSP troubleshooting.

<Root>
	<Application>
		<!-- Uncomment to set application level timeout values
		<ApplicationTimeout>60000</ApplicationTimeout>
		<PingTimeout>12000</PingTimeout>
		<ValidationFrequency>8000</ValidationFrequency>
		<MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
		<MaximumSetBufferTime>60000</MaximumSetBufferTime>
		<MaximumStorageDirDepth>25</MaximumStorageDirDepth>
		-->
		<Connections>
			<AutoAccept>true</AutoAccept>
			<AllowDomains></AllowDomains>
		</Connections>
		<!--
			StorageDir path variables
			
			${com.wowza.wms.AppHome} - Application home directory
			${com.wowza.wms.ConfigHome} - Configuration home directory
			${com.wowza.wms.context.VHost} - Virtual host name
			${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
			${com.wowza.wms.context.Application} - Application name
			${com.wowza.wms.context.ApplicationInstance} - Application instance name
			
		-->
		<Streams>
			<StreamType>live</StreamType>
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/content</StorageDir>
			<KeyDir>${com.wowza.wms.context.VHostConfigHome}/keys</KeyDir>
			<!-- LiveStreamPacketizers (separate with commas): cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer, cupertinostreamingrepeater, smoothstreamingrepeater, sanjosestreamingrepeater, dvrstreamingpacketizer, dvrstreamingrepeater -->
			<LiveStreamPacketizers>cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer</LiveStreamPacketizers>
			<!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
			<Properties>
				<Property>
					<Name>nalUnitFilter</Name>
					<Value>13</Value>
					<Type>Integer</Type>
				</Property>
			</Properties>
		</Streams>
		<Transcoder>
			<!-- To turn on transcoder set to: transcoder -->
			<LiveStreamTranscoder></LiveStreamTranscoder>
			<!-- [templatename].xml or ${SourceStreamName}.xml -->
			<Templates>${SourceStreamName}.xml,transrate.xml</Templates>
			<ProfileDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/profiles</ProfileDir>
			<TemplateDir>${com.wowza.wms.context.VHostConfigHome}/transcoder/templates</TemplateDir>
			<Properties>
			</Properties>
		</Transcoder>
		<DVR>
			<!-- As a single server or as an origin, use dvrstreamingpacketizer in LiveStreamPacketizers above -->
			<!-- Or, in an origin-edge configuration, edges use dvrstreamingrepeater in LiveStreamPacketizers above -->
			<!-- As an origin, also add dvrchunkstreaming to HTTPStreamers below -->
			<!-- To turn on DVR recording set Recorders to dvrrecorder.  This works with dvrstreamingpacketizer  -->
			<Recorders></Recorders>
			<!-- As a single server or as an origin, set the Store to dvrfilestorage-->
			<!-- edges should have this empty -->
			<Store></Store>
			<!--  Window Duration is length of live DVR window in seconds.  0 means the window is never trimmed. -->
			<WindowDuration>0</WindowDuration>
			<!-- Storage Directory is top level location where dvr is stored.  e.g. c:/temp/dvr -->
			<StorageDir>${com.wowza.wms.context.VHostConfigHome}/dvr</StorageDir>
			<!-- valid ArchiveStrategy values are append, version, delete -->
			<ArchiveStrategy>append</ArchiveStrategy>
			<!-- If this is a dvrstreamingrepeater, define ChunkOriginURL to point back to origin -->
			<!-- And define Application/Repeater/OriginURL to point back to the origin -->
			<Repeater>
				<ChunkOriginURL></ChunkOriginURL>
			</Repeater>
			<!-- Properties for DVR -->
			<Properties>
			</Properties>
		</DVR>
		<!-- HTTPStreamers (separate with commas): cupertinostreaming, smoothstreaming, sanjosestreaming, dvrchunkstreaming -->
		<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>
		<SharedObjects>
			<StorageDir></StorageDir>
		</SharedObjects>
		<Client>
			<IdleFrequency>-1</IdleFrequency>
			<Access>
				<StreamReadAccess>*</StreamReadAccess>
				<StreamWriteAccess>*</StreamWriteAccess>
				<StreamAudioSampleAccess></StreamAudioSampleAccess>
				<StreamVideoSampleAccess></StreamVideoSampleAccess>
				<SharedObjectReadAccess>*</SharedObjectReadAccess>
				<SharedObjectWriteAccess>*</SharedObjectWriteAccess>
			</Access>
		</Client>
		<RTP>
			<!-- RTP/Authentication/[type]Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
			<Authentication>
				<PublishMethod>digest</PublishMethod>
				<PlayMethod>none</PlayMethod>
			</Authentication>
			<!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
			<AVSyncMethod>senderreport</AVSyncMethod>
			<MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
			<IdleFrequency>75</IdleFrequency>
			<RTSPSessionTimeout>90000</RTSPSessionTimeout>
			<RTSPMaximumPendingWriteBytes>0</RTSPMaximumPendingWriteBytes>
			<RTSPBindIpAddress></RTSPBindIpAddress>
			<RTSPConnectionIpAddress>0.0.0.0</RTSPConnectionIpAddress>
			<RTSPOriginIpAddress>127.0.0.1</RTSPOriginIpAddress>
			<IncomingDatagramPortRanges>*</IncomingDatagramPortRanges>
			<!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
			<Properties>
				<Property>
					<Name>rtpIgnoreProfileLevelId</Name>
					<Value>true</Value>
					<Type>Boolean</Type>
				</Property>
				<Property>
					<Name>rtpDePacketizerWrapper</Name>
					<Value>com.wowza.wms.rtp.depacketizer.RTPDePacketizerWrapperReChunkMPEGTS</Value>
				</Property>
				<Property>
					<Name>videoIsAligned</Name>
					<Value>false</Value>
					<Type>Boolean</Type>
				</Property>
			</Properties>
		</RTP>
		<MediaCaster>
			<RTP>
				<RTSP>
					<!-- udp, interleave -->
					<RTPTransportMode>udp</RTPTransportMode>
				</RTSP>
			</RTP>
			<!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
			<Properties>
				<Property>
					<Name>rtspValidationFrequency</Name>
					<Value>0</Value>
					<Type>Integer</Type>
				</Property>
				<Property>
					<Name>rtspFilterUnknownTracks</Name>
					<Value>true</Value>
					<Type>Boolean</Type>
				</Property>
				<Property>
					<Name>rtspStreamAudioTrack</Name>
					<Value>false</Value>
					<Type>Boolean</Type>
				</Property>
				<Property>
					<Name>debugRTSPSession</Name>
					<Value>true</Value>
					<Type>Boolean</Type>
				</Property>
			</Properties>
		</MediaCaster>
		<MediaReader>
			<!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
			<Properties>
			</Properties>
		</MediaReader>
		<MediaWriter>
			<!-- Properties defined here will override any properties defined in conf/MediaWriter.xml for any MediaWriter loaded by this applications -->
			<Properties>
			</Properties>
		</MediaWriter>
		<LiveStreamPacketizer>
			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
			<Properties>
			</Properties>
		</LiveStreamPacketizer>
		<HTTPStreamer>
			<!-- Properties defined here will override any properties defined in conf/HTTPStreamers.xml for any HTTPStreamer loaded by this applications -->
			<Properties>
			</Properties>
		</HTTPStreamer>
		<Repeater>
			<OriginURL></OriginURL>
			<QueryString><![CDATA[]]></QueryString>
		</Repeater> 
		<Modules>
			<Module>
				<Name>base</Name>
				<Description>Base</Description>
				<Class>com.wowza.wms.module.ModuleCore</Class>
			</Module>
			<Module>
				<Name>properties</Name>
				<Description>Properties</Description>
				<Class>com.wowza.wms.module.ModuleProperties</Class>
			</Module>
			<Module>
				<Name>logging</Name>
				<Description>Client Logging</Description>
				<Class>com.wowza.wms.module.ModuleClientLogging</Class>
			</Module>
			<Module>
				<Name>flvplayback</Name>
				<Description>FLVPlayback</Description>
				<Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
			</Module> 
		</Modules>
		<!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
		<Properties>
		</Properties>
	</Application>
</Root>

How can I get more information about what is going wrong?

Thanks.

Can you open rtsp://127.0.0.1:5554/257 in vlc? I tried from here and couldn’t reach it.

If you can, what does VLC report in Tools > Codec Info?

Richard

Make sure you go through the trouble-shooting section of the IP camera re-stream tutorial you are following

Otherwise, I not exactly sure how to help with streaming from Android.

Richard

Can you open rtsp://127.0.0.1:5554/257 in vlc? I tried from here and couldn’t reach it.

If you can, what does VLC report in Tools > Codec Info?

Richard

Yes, sorry I forgot to mention that it does work in VLC. The codec info reports

Codec: H264 - MPEG-4 AVC (part 10) (h264)

Resolution: 640x480

I should also mention that we’re only streaming video, no audio.