Wowza multiple Live audio with video streaming.

Dear Wowza team,

We are going to cover a live event. We have arranged a Axis camera [Q6035-e-PTZ], which will provide us HD H.264 video feed. Now we will have three different audio feed coming in different language.

We want to combine each audio feed with same video feed and have 3 output as Live Video||Live Audio 1, Live Video||Live Audio 2,Live Video||Live Audio 3.

Can we create some kind of setup like this wowza server.

Please let me know the possibility of combining it with 3rd software or with wowza.

Thanks

MediaXCoding

There is no facility in Wowza for muxing these streams. FFmpeg comes to the top of search for “how to mux several audio streams and one video”, for example:

http://cfc.kizzx2.com/index.php/muxing-audio-and-video-with-ffmpeg/

The input and output are files in the example, but I suppose it should be able to handle live input. Here is how to do live mpegts out

https://www.wowza.com/docs/how-to-use-ffmpeg-with-wowza-media-server-mpeg-ts

Then you can use this technique for track selection to playback:

https://www.wowza.com/docs/how-to-select-mpeg-ts-stream-by-program-id-and-also-audio-language-by-pid

Richard

Hi

This is possible with a Wowza server and some custom coding.

If you require the custom coding to be done by a consultant, email support@wowza.com requesting the independent consultant list.

Be sure to contact more that one consultant for a quote

Jason

Sounds like it could work.

Richard

ajitpals

How did yo get this working?

I need to stream billingual webcast soon…

JasonH,

is it the custom module available?

Thanks

Daniel

i search for same possibility for live streaming… i have some hopes in HDS… it’s a mather of “packaging”… see:

http://www.adobe.com/devnet/adobe-media-server/articles/attaching-alternate-audio.html

it’s called late-binding audio!

nice article there:

http://www.realeyes.com/blog/2011/07/28/http-dynamic-streaming-part-2-late-binding-audio-using-osmf/

also:

http://help.adobe.com/en_US/OSMF/1.0/Dev/WSc6f922f643dd2e6d-2709cfca12fdb163c9e-8000.html

David: if you are not particular about your Flash player, someone has a pretty simple modification for JW Player to do something like that (pan between left and right audio channels):

http://www.longtailvideo.com/support/forums/jw-player/javascript-interaction/28334/how-to-extend-jw-player-to-make-audio-to-be-panned-via-javascript-api/

I just tried it myself and it works great. Note the manual edit necessary for jwplayer.min.js near the top of the first post, and use the test2.html code there to correctly format your links.

The code at that link simply mutes channels, although you can see where it sets the “_transformer.pan” property, so you could easily set the “_transformer.rightToLeft” or “_transformer.leftToRight” properties at the same time to achieve your desired effect (one channel input playing through both channels output). Something like:

		override public function setPan(pan:Number):void {
			var _panValue:Number = pan;
			_transformer.pan = _panValue;
			if ( _panValue == 1 ) {
				_transformer.rightToLeft = 1;
			} else if ( _panValue == -1 ) {
				_transformer.leftToRight = 1;
			}
		}

Only downside is that since this is Flash-based, you will lose the functionality in HTML5 or on mobile devices. Those users are going to hear both channels simultaneously.

If you are dealing with video on demand content (not live), it should be fairly easy to split the stereo audio track into two separate mono audio tracks and embed them as different language tracks in the MP4 file. (Might even be able to do it live with FFMPEG, I suppose.) I haven’t done that yet although I’ve done something similar for caption tracks.

Another potential solution: use FFMPEG to split the stereo audio track into two mono audio tracks:

ffmpeg -i source.mp4 -map 0:0 -map 0:1 -map 0:1 -map_channel 0.1.0:0.1 -map_channel 0.1.1:0.2 -c:a:0 aac -b:a:0 64k -ac:a:0 1 -r:a:0 44100 -c:a:1 aac -b:a:1 64k -ac:a:1 1 -r:a:1 44100 -strict experimental -y output.mp4

Then you can use Wowza’s ModuleMP4AudioChannelSelector module to specify the desired audio track in the URL:

https://www.wowza.com/docs/how-to-select-audio-data-and-or-video-channel-from-a-multi-channel-mp4-file-by-using-imediareaderactionnotify

The nice thing about this method is that it works for VOD across RTMP, HTTP (HLS), and RTSP, delivered by Flash, HTML5, or QuickTime – basically, just about anything Wowza can output. And if you offer your videos for download, podcasting, or will be viewing them locally at all, this makes for easy audio switching in iTunes, iOS, VLC, etc. You can even assign your tracks languages with FFMPEG metadata:

http://ffmpeg.org/ffmpeg.html#Main-options

Or use MP4Box / MP4Track to set custom audio track names.

Downside to this method is you have to reload the page/player to switch between the audio tracks, and it only works when preparing VOD files, not live streams, because FFMPEG live streams require the “flv” container and that doesn’t support multiple audio tracks.

For live streams, you could run separate FFMPEG commands to isolate each of the audio channels with the video:

ffmpeg -re -i rtmp://wowza-server/liveapp/myStream -map 0:0 -map 0:1 -map_channel 0.1.0:0.1 -c:v copy -c:a aac -b:a 64k -ac:a 1 -r:a 44100 -strict experimental -f flv rtmp://wowza-server/liveapp/myStreamLeft
ffmpeg -re -i rtmp://wowza-server/liveapp/myStream -map 0:0 -map 0:1 -map_channel 0.1.1:0.1 -c:v copy -c:a aac -b:a 64k -ac:a 1 -r:a 44100 -strict experimental -f flv rtmp://wowza-server/liveapp/myStreamRight

In our case, viewers should only need either both channels (the original stream) or just the right channel (the second FFMPEG live stream command above) so we only need one extra command.

I am trying to add additional audio tracks to the video like many languages:

ffmpeg -i “F:\Video.mp4″ -i “F:\Audio.MP3″ -vcodec copy -acodec copy -shortest -f flv -map 0:0 -map 1:0 rtmp://IP/input.stream

But at the output I get the video without original audio with only mp3 audio, I cannot choose the audio track (original or additional mp3). Where could be the problem?

That is the correct behavior for live streams. The FLV container does not allow for multiple audio tracks. You will have to run a similar command and generate a different stream for each language you want to offer, then give your users the option of which stream they want to view.

For VOD streams, you can make MP4 files with multiple audio tracks, and then select the audio track you want to use as specified in the link above:

I’m in the process of working on a stream that carries both natural video audio (spoken English) with translated audio (spoken Spanish).

Essentially, I’m using stereo audio, with the natural (English) audio in the LEFT channel and the translated (Spanish) audio in the RIGHT channel. I plan to create a Flash module that has two buttons for the user to select (English / Spanish). These buttons would then use the “SoundTransform” ActionScript to play only the channel that the user wants to hear (if English is selected it will set the RIGHT input channel to 0 and set the LEFT input channel to pay in the LEFT speaker as well as the RIGHT speaker, using the “leftToLeft” and “leftToRight” properties of SoundTransform).

It’s still a work-in-progress, so sadly I do not have a working example to share… but I thought I’d toss that out as an idea, just in case it was of some inspiration or help. I could be heading down a rabbit hole here as well, so no promises on if this will work, or not.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundTransform.html

Thanks for support, but i have managed to get the required stream with multiple audio with single video stream using 3 different software.

Richard , i want to buy Amazon EC2 server for 10 days with pay per use license $5 + WOWZA 3,

Actually i want to know the total approx. amount that we have to pay to amazon, i would like to describe my requirement.

We have two live camera input directed to wowza server , as CAM1 and CAM2.

CAM1+ CAM2 Spec: 320x240 @25fps , 320kbps [272kbps + 48kbps] , H.264, Baseline 3.0 , key frame = 2 sec.

Then we have three more input feed coming to wowza server after mixing with three different Audio.

Feed1 + Feed2 + Feed3 [Specs] = 320x240 @25fps , 256kbps [224kbps + 32kbps] , H.264, Baseline 3.0 , key frame = 2 sec.

So we have total of 5 feeds.

Could u please let me know how to calculate the data usage and its price?

There is no facility in Wowza for muxing these streams. FFmpeg comes to the top of search for “how to mux several audio streams and one video”, for example:

http://cfc.kizzx2.com/index.php/muxing-audio-and-video-with-ffmpeg/

The input and output are files in the example, but I suppose it should be able to handle live input. Here is how to do live mpegts out

Use FFmpeg to live stream with Wowza Streaming Engine

Then you can use this technique for track selection to playback:

Specify per-stream settings in .stream files

Richard

Check the Amazon Pricing page for details.

Bandwidth is free going into you Wowza EC2 server. You’ll want to figure out your maximum # of client streams you want to support, and then figure out the total size of GB transferred this will be. That will be what you need to figure your bandwidth costs. Then there are the other costs, such as upfront free, and hourly rates.

From Wowza, it is just $5/day for the daily license.

Hi

If Ajitpals doesn’t reply with how this was done and what software was used (before you run out of time), as I mentioned above this can be done with a custom module in Wowza.

Requirements :

You’ll need a sound card with multiple inputs or multiple sound cards.

Jason

Hi

You could build a custom module yourself or a consultant will build it for you if you choose a consultant to take on this task.

If you require the custom coding to be done by a consultant, email support@wowza.com requesting the independent consultant list.

Be sure to contact more that one consultant for a quote.

Jason

I investigated this deeply and ended finding a solution that is basically free and very easy without a component or anything fancy.

Setup a ffmpeg job on your server, the ffmpeg job should probably be per language you want to support.

The syntax is:

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

In my case I am using Wirecast for the first video+audio broadcast (StreamA.sdp) and flash media live encoder for StreamB which is just the translators voice.

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.

I’m going try and breathe a little life into this thread as I think this is an important thing and our company has had a few requests for this type of multi-language support…

Below is a great example of not only necessary context of the need for the feature, but a good implementation that easily allows the viewer to choose what language to listen too.

My thinking is that this would be a fairly simple thing to do in flash for the player. A flash designer would just add this ‘menu’ of options to the flash player being used, and each option would be linked to a live audio stream being encoded on site, separately for each translator. Because it’s a translation, there are no sync issues necessarily.

I don’t see any way of implementing these options into any sort of mobile device support or anything thought… Thoughts?

Hello Isanter,

You could have a look at this article and see if it will meet your needs:

How select audio, data and/or video channel from a multi-channel MP4 file using IMediaReaderActionNotify

Salvadore

Isanter,

No, this method only works if you have a stream with multiple channels. There is nothing built into Wowza that does what you describe.

Salvadore

You would need to stream an mp4 with multiple audio channels, then on the client side you would choose an audio channel (language).

Salvadore