Wowza Community

Publishing Non-MPEG-TS RTP media streams

Hello Everybody!

I am trying to build an android application which publishes media to a Wowza server. I see similar functionality in other android applications, notably sipdroid and spydroid, but they seem to rely on publishing RTP streams with encodings like raw AMR. However, when I test publishing streams to Wowza via RTP using ffmpeg, only MPEG-TS seems to work. Is Wowza’s RTP support only for MPEG-TS? Is there any known way to get media data from an android client to be published to the Wowza server?

Thanks in advance!

Details:

If I publish a stream using the command:

ffmpeg -re -i ref.mp4 -re -vcodec libx264 -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

I can play both these urls:

totem rtsp://192.168.0.6:1935/videochat/mpegts.stream

mplayer -msglevel all=6 rtmp://192.168.0.6:1935/videochat/mpegts.stream

And if I publish the stream via direct mpegts-rtp:

ffmpeg -re -i ref.mp4 -re -vcodec libx264 -g 60 -vb 150000 -strict experimental -acodec aac -ab 96000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -f rtsp rtsp://192.168.0.6:1935/videochat/test

I can play

totem rtsp://192.168.0.6:1935/videochat/test

mplayer -msglevel all=6 rtmp://192.168.0.6:1935/videochat/test

However, this does not result in any playable url:

ffmpeg -re -i ref.mp4 -acodec libopencore_amrnb -ar 8000 -ac 1 -vn -f amr rtp://192.168.0.6:10000/

Nor do any similar implementations in Java/Android

Hi

Have you tried adding this into your code,

Property to fix TS packet alignment in UDP packets

Some (not many) MPEG-TS encoders send do not properly align TS packets in UDP packets. When this happens you will see lots of the following warning messages in the logs:

Code:

RTPDePacketizerMPEGTS.handleRTPPacket: Out of sync: 0x[nn]

Add the following property to the RTP/Properties container in [install-dir]/[application]/Application.xml (be sure to get the correct Properties container - there are several in Application.xml):

Code:

rtpDePacketizerWrapper

com.wowza.wms.rtp.depacketizer.RTPDePacketizerWrapperReChunkMPEGTS

Its part of the tutorial from here,

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

Let me know how you get on, and if this fixes the problem

Jason