Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: mixing live audio + vod to ONE stream...?

  1. #1
    Join Date
    Jun 2013
    Posts
    5

    Lightbulb mixing live audio + vod to ONE stream...?

    Hi everyone,
    I've searching around this forum, and although I've found similar questions, I haven't found exactly this question so I post it here:

    Transmitting audio live from an auction, and have previously uploaded a lots of videos of each product to be sold.

    Now I'm transmitting one audio stream and let the client app (flash in a browser) listen to the audio, while selecting the video he want's to watch.

    Want to change this and mix the live audio with the correct product video, so the client only recieve ONE audio/video stream.

    I think it's clear that wowza can't do this directly (or?), but is there any other way with ffmpeg or similar?

    I've found similar examples, but don't know if it's possible to mix a LIVE stream with VOD videos...

    thank you in advance for any hint!

    /best
    /javier


    similar post:
    http://www.wowza.com/forums/showthre...ix+audio+video
    with this soolution:
    ffmpeg -itsoffset -5 -i "rtmp://127.0.0.1/live/StreamA.sdp live=1" -i "rtmp://127.0.0.1/live/StreamB.sdp live=1" -vcodec copy -acodec copy -shortest -f flv -map 0:0 -map 1:0 rtmp://127.0.0.1/live/StreamC.sdp
    The result of this is a new stream, StreamC which has the*video*of StreamA + the*Audio*of StreamB. the itsoffset is a parameter you can play with to give your translator some delay.

  2. #2
    Join Date
    Jun 2013
    Posts
    5

    Default

    I'm replying myself, as this could be usefull for someone..
    If anyone has something to add, please do.

    I've successfully mixed one audio stream (live) and one video stream (vod) into one stream (live) with ffmpeg:

    The idea is to take a live audio stream, and creating a live stream from VOD through a playlist that is modified from the clientside...
    These two is converted to ONE live audio/video stream, that is delivered to the clients.

    1) added support for ModuleStreamControl to wowza (installing WowzaServerAddOnCollection...)

    2) installed ffmpeg on the server

    3) created wowza application "livemix" and added:
    <Module>
    <Name>streamcontroller</Name>
    <Description>ModuleStreamControl</Description>
    <Class>com.wowza.wms.plugin.collection.module.ModuleStreamControl</Class>
    </Module>

    4) creating a stream dynamically from this example: http://www.wowza.com/downloads/forum...assControl.zip
    as explained in this article: "How to dynamically control Stream class streams" http://www.wowza.com/forums/content.php?187

    resulting stream: rtmp://[server]:1935/livemix/video

    in my case I add a mp4 located on the wowza server

    5) audio: from a client transmitting with Flash Media Live Encoder audio only (mp3)

    resulting stream: rtmp//[server]:1935/livemix/audio

    6) on the server started:
    ffmpeg -i "rtmp://127.0.0.1/livemix/video" -i "rtmp://127.0.0.1/livemix/audio" -vcodec copy -acodec copy -shortest -f flv -map 0:0 -map 1:1 rtmp://127.0.0.1/livemix/mix

    resulting stream: rtmp://[server]:1935/livemix/mix

    this is the final stream that clients should connect to!


    Things to investigate:

    * mp4 video + mp3 video resulting rtmp stream works in a flash player
    * what about html5 video tag?
    * ios devices?
    * android?

    ...to be continued!

    best
    /j

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

    Default

    Javier,

    You might also manage this in the RTMP client. You can have multiple NetStreams on one NetConnection, or multiple NetConnections. It might be be better to have multiple NetConnections, and have them connected before ready to start a NetStream.

    Richard

  4. #4
    Join Date
    Jun 2013
    Posts
    5

    Default

    Richard,
    thank you for your answer.
    This seems like chinese for me (and I'm not!) but I'll google your ideas and will return for more ;-)

    thanks again!
    /j

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

    Default

    Take a look at the Wowza FlashRTMPPlayer examples, in the examples folder that ships with Wowza.

    And you might be able to do this with off-the-shelf player like JW Player or Flowplayer. They have a javascript API that could help coordinate playback.

    Richard

  6. #6
    Join Date
    May 2013
    Posts
    3

    Default

    Hi jenciso,

    Thanks for giving the helpful information.

    For the iOS, following link will help you to upload live stream from iphone to wowza,
    http://blog.themidnightcoders.com/in...ion-with-rtmp/

    Similarly, I also able to upload stream from android as well with rtmp.

    But the main problem is in playing the uploaded stream in android, iphone. Like, rtmp is flash and we can successfully able to play rtmp video in above flash player. But most devices of android, iOS are not supporting flash. rtmp is not officially supported in android, iOS, http://developer.android.com/guide/a...a-formats.html.


    Kindly, share any help you find in this case.

    Thanks.

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

    Default

    We fallback on recommending RTSP for Android because of the fragmented feature/version support.

    Richard

  8. #8
    Join Date
    May 2013
    Posts
    3

    Default

    Hi Richard,

    Yes, RTSP seems best option for playing the video in android devices.

    We successfully able to stream live video from android to wowza with RTMP. And we can also see the live video from the example of FlashRTMPPlayer, it works fine. But the main problem is that then its not possible to view the same video in another android device with RTSP because we are uploading through RTMP.

    At wowza, can we re-stream live video from RTMP to RTSP? ffmpeg will be useful for this?

    Thanks Rechard, answer of this question will help to many developers.


    Bhargav.


    Quote Originally Posted by rrlanham View Post
    We fallback on recommending RTSP for Android because of the fragmented feature/version support.

    Richard

  9. #9
    Join Date
    Jun 2013
    Posts
    5

    Default

    Best Richard,

    I've taken some time to review your answer...
    I believe my final goal wasn't clear in my first post:

    I'm currently having a website receiving two separated streams: one live audio stream, and one vod video stream (the client listen to the auction live, and selects witch product video to watch).

    While this may not be best practice, it does work with flash in a browser in a common pc.
    However on a mobile platform I found several troubles:
    -old android have flash / newer android and ios doesn't
    -html5 doesn't behave exactly the same in all devices
    -can't have two separated <video> tags (one for audio and one for vod), because one stops the other...

    So, the idea was to bring ONE stream, mixing the live audio plus a dynamic playlist of the products, so at least it is possible to listen and watch the correspondent image at the same time.


    It seams possible through ffmpeg - tested succesfully, but don't know if the server runs smoothly with a lot of watchers, or if ffmpeg can run constantly (as a service?), or if there is some memory leaks... or whatever...



    Back to your answer:

    You might also manage this in the RTMP client. You can have multiple NetStreams on one NetConnection, or multiple NetConnections. It might be be better to have multiple NetConnections, and have them connected before ready to start a NetStream.
    Does this solve my first goal?
    When you talk about NetStreams and NetConnection, you are assuming I transmit and receive in flash. Correct?

    I do transmit with Flash Media Live Encoder, but i want to receive both in flash and in html5 <video> tag.



    /thanks for any suggestion!
    /best regards
    /javier

  10. #10
    Join Date
    Jun 2013
    Posts
    5

    Default

    Hi bhargav!

    thank you for your post...

    It's not what i was looking for though: I want to stream TO mobile devices (not FROM them).

    In the ios/androids without flash we are trying to have a html5 video tag, so it's not rtmp nor rtsp - we're using http stream cupertino ...

    /best
    /javier

Page 1 of 2 12 LastLast

Similar Threads

  1. Mixing multiple audio streams
    By mprzybys in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 03-09-2013, 05:39 AM
  2. Replies: 2
    Last Post: 03-15-2012, 08:48 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
  •