Results 1 to 2 of 2

Thread: Publishing Non-MPEG-TS RTP media streams

  1. #1
    Join Date
    Apr 2012
    Posts
    1

    Default 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

  2. #2
    Join Date
    Sep 2011
    Posts
    1,934

    Default

    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:
    <Property>
    <Name>rtpDePacketizerWrapper</Name>
    <Value>com.wowza.wms.rtp.depacketizer.RTPDePacketizerWrapperReChunkMPEGTS</Value>
    </Property>

    Its part of the tutorial from here,
    http://www.wowza.com/forums/content....based-encoder)

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

    Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •