Results 1 to 10 of 10

Thread: MPEGTS encoder

  1. #1
    Join Date
    Dec 2011
    Posts
    24

    Default MPEGTS encoder

    Hi,

    We have encoder that outputs MPEG-TS / H.264. How can we publish stream from encoder to Wowza server with client specified name ?

    I have means to insert HTTP request headers before mpegts stream on the same connection. Can Wowza server read HTTP headers and take stream name from it and then publish stream on that name?

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    This is the basic guide to re-streaming mpeg-ts
    http://www.wowza.com/forums/content....based-encoder)

    Wowza does not support custom http headers. What are you trying to accomplish exactly?

    Richard

  3. #3
    Join Date
    Dec 2011
    Posts
    24

    Default

    Hi Richard,

    I am trying to publish MPEG-TS stream without using pre-configured .stream file and without using Stream Manager. I would like to have encoder specify stream name, like it is done in RTMP encoder.

    What further actions must encoder do to acomplish that ?

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Change the Application.xml /StreamType to "rtp-live". If you only use Flash RTMP client such as Flowplayer then it will work without StreamManager.

    The alternatives to .stream files are the StreamNameAlias Addon:
    http://www.wowza.com/forums/content....e-alias-module

    Or the most dynamic method is the IMediaStreamNameAliasProvider2
    http://www.wowza.com/forums/content....der2-interface

    The above two alias methods cannot be mixed with .stream files, i.e., you cannot use alias names with .stream extension in the same app as either of the above aliasing methods

    Richard

  5. #5
    Join Date
    Dec 2011
    Posts
    24

    Default

    Hi Richard,

    I am trying to use IMediaStreamNameAliasProvider2 from custom wowza module, but i can`t publish mpegts stream.

    I need mpegts stream already published to be able to resolve stream name aliases !

    What is needed to be done from wowza module code so that wowza media server will listen on given port for mpegts stream ? I would prefer TCP connection.

    Here is what i am trying on encoder side:
    ffmpeg -i "source.flv" -re -vbsf h264_mp4toannexb -vcodec copy -acodec copy -f mpegts "http://127.0.0.1:1935/live/alex"

    And I know that ffmpeg can output rtmp stream, please help me publish mpegts stream.

  6. #6

    Default

    Hi Alex,

    Please see the FFmpeg MPEG-TS Tutorial for an example.

  7. #7
    Join Date
    Dec 2011
    Posts
    24

    Default

    Hi randall,

    That does not answer my questions. I that article ffmpeg output is udp://127.0.0.1:10000?pkt_size=1316 , and my question was what server side api can make wowza listen on port 10000 for MPEG-TS stream.

    Please help.

  8. #8
    Join Date
    Dec 2007
    Posts
    21,962

  9. #9
    Join Date
    Dec 2011
    Posts
    24

    Default

    Hi,

    I succeeded defining stream to be published by using this code:
    boolean started = appInstance.startMediaCasterStream("udp://0.0.0.0:10001", "rtp");
    This produces wowza log:
    RTPMediaCaster.create[17807805]
    RTPMediaCaster.init[17807805]
    RTPMediaCaster.Reconnector[17807805:live/_definst_:udp://0.0.0.0:10001]: start: 1
    ApplicationInstance.startMediaCasterStream[live/_definst_]: Stream started: flv:udp://0.0.0.0:10001
    RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: URI: udp://0.0.0.0:10001
    media caster started: true
    From the log I understand that MediaCaster accepted the UDP url.

    Is there a way for wowza to listen for TCP connections instead UDP? When I replace 'udp://' protocol prefix with 'tcp://' wowza does not recognize my intent:
    2012-07-02 11:28:45 INFO server comment - RTPMediaCaster.create[5487610]
    2012-07-02 11:28:45 INFO server comment - RTPMediaCaster.init[5487610]
    2012-07-02 11:28:45 INFO server comment - RTPMediaCaster.Reconnector[5487610:live/_definst_:tcp://0.0.0.0:10001]: start: 1
    2012-07-02 11:28:45 INFO server comment - ApplicationInstance.startMediaCasterStream[live/_definst_]: Stream started: flv:tcp://0.0.0.0:10001
    2012-07-02 11:28:45 INFO server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: C:/bin/WowzaMediaServer3.0.2/content/tcp://0.0.0.0:10001
    2012-07-02 11:28:45 WARN server comment - RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: C:/bin/WowzaMediaServer3.0.2/content/tcp://0.0.0.0:10001

  10. #10

    Default

    "what server side api can make wowza listen on port 10000 for MPEG-TS stream."

    So, you have answered this question using the Mediacaster API.

    My current understanding is that the client requests either UDP or TCP when using RTP. In this case, Wowza is the client, and you can tell Wowza to try to request TCP setting:
    <MediaCaster><RTP><RTSP><RTPTransportMode>interleave</RTPTransportMode>

    "I am trying to publish MPEG-TS stream without using pre-configured .stream file and without using Stream Manager."

    You can use RTSP:

    ffmpeg -re -i sample.mp4 -vcodec libx264 -vprofile baseline -vb 150000 -acodec libfaac -f rtsp -muxdelay 0.1 rtsp://127.0.0.1:1935/live/myStream

    Or RTMP:
    ffmpeg -re -i sample.mp4 -vcodec copy -acodec copy -f flv rtmp://127.0.0.1/live/myStream

    RTMP uses TCP.

Similar Threads

  1. MpegTS encoder to Wowa
    By jagadishkamathk in forum General Forum
    Replies: 5
    Last Post: 01-08-2013, 10:33 AM

Posting Permissions

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