Mix rtmp and mpegts audios and output HLS

Hi guys, i have a RTMP stream (which contains 1 video track and 1 audio track) and a MPEG-TS stream with multiple audio tracks. I want to mix video and audio tracks from RTMP and MPEG-TS to output a single HLS stream. Can i do it in Wowza, or is there any other possible solution? Thanks a lot!

The media flow like below:

 -- RTMP (1 video / 1 audio) -->
                                -----> HLS (1 video / 3 audios) 
 -- MPEG-TS (2 audios)  ------->

Yes you can do that and you would use the AV Mix module:

Mix audio and video from different live sources with a Wowza Streaming Engine Java module


There is also a repo on our GitHub with some sample code.

Thank you for your reply, does this module only support mix one video with one audio? Could it support mix one video track and one audio track with multiple audio tracks as what i want?

Thanks

Sorry, we were closed for the U.S. Holiday. No you can mix and combine several tracks. If you looked at the article, it should describe how you can add multiple audio tracks for one video as an example. We have customers that add multiple audio language tracks for one video just to give you an idea.

You can also combine them using FF-MPEG and mix them there before you send it to Wowza as you can see described in this post:

One last option for you in addition to the AVmix module is you can have the player select the audio track from a SMIL file. Not sure what your use case is, but I’ll share this in case it’s helpful:

Thank you for your reply, but i still can’t find how to mix more audio tracks into one stream. I wll try to find some other solution, thanks a lot.

Ok, well if you want, you can submit a support ticket and have a Wowza engineer work with you to get this set up. It’s a very common use case, but we do get a fair amount of tickets asking how to configure it so know we are here to help! You can use the AV mix module or you can build a SMIL file which references the different audio tracks for one video.

Just let us know if we can help in a ticket. Good luck to you @Li_Meng1

1 Like