# Publishing Non-MPEG-TS RTP media streams

**URL:** <https://community.wowza.com/t/publishing-non-mpeg-ts-rtp-media-streams/38444>\
**Category:** Wowza Streaming Engine\
**Created:** [April 4, 2012, 10:40am UTC](https://community.wowza.com/t/publishing-non-mpeg-ts-rtp-media-streams/38444 "2012-04-04T10:40:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Charneski](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Andrew\_Charneski](https://community.wowza.com/u/Andrew_Charneski)\
**Post date:** [April 4, 2012, 10:40am UTC](https://community.wowza.com/t/publishing-non-mpeg-ts-rtp-media-streams/38444/1 "2012-04-04T10:40:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [April 6, 2012, 9:23am UTC](https://community.wowza.com/t/publishing-non-mpeg-ts-rtp-media-streams/38444/2 "2012-04-06T09:23:22Z")

</div>

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](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
