Wowza Community

Can I switch audio track during VOD streaming?

Hello,

My video file contains multiple audio tracks for different languages. Does Wowza support switching the audio tracks during VOD streaming?

Also, which client player supports this feature?

Thanks.

You can select when you start playback

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

You might be able to switch during playback in RTMP client with netstream.play2(). Since it is same video the key frames will be aligned, it should work, but I don’t have detailed guidance or example.

Any RTMP player will work. I added a version that supports RTSP and HTTP clients at bottom, but it is not added to the Collection yet

Richard

In the last comment I added a version of this module that should work for RTSP and HTTP (cupertino-, sanjose- and smooth-streaming).

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

It’s not in the collection tho, you have to build it at present if you need it.

Richard

There is no equivalent to NetStream.play2() in iOS streaming. The best you can do is something like this:

https://www.wowza.com/docs/how-to-do-pre-roll-and-playlist-for-ios-a-client-side-work-around

Which is probably not going to be adequate for your purpose.

Richard

Hi lincoln,

The answer to your question is yes, as Richard said. It seems you would benefit from reading the quickstart guide: https://www.wowza.com/docs/how-to-install-and-configure-wowza-streaming-engine#cupertinostreaming

There you will see there are 3 types of HTTP streaming supported.

It’s a very good idea to read through that guide and the entire User Guide when you’re just starting out. It will save you a lot of time. Also, please try not to post the same question in different threads. It will only delay your answer as there’s more for us to read. Thanks.

Sorry, I didn’t understand the question.

Flash has features like bi-directional communication which allow you to control things on a per client basis. But, the Cupertino implementation does not. If you wanted to switch all the users watching a stream from one language to the next while the video is playing, you might be able to work something using the stream class examples and a custom module.

One example of dynamically changing the stream here: https://www.wowza.com/docs/how-to-control-stream-class-streams-dynamically-modulestreamcontrol

It is something you will have to experiment with.

Any RTMP player will work. I added a version that supports RTSP and HTTP clients at bottom, but it is not added to the Collection yet

Thank you for your reply.

What do you mean “supports RTSP and HTTP clients…”? Sorry that I do not understand.

Richard, thank you for your help.

Hi, Richard,

How about switching audio track during playback of a vod streaming in the iOS client players?

Thanks.

Any update? Thanks.

Thanks, Randall.

Let me clarify that my last question is: can I switch audio track in iOS clients during streaming?

What Richard told me is that we can switch the audio track before the streaming starts, but he did not mention whether we can switch audio track when the files are being streamed.

I want to tell you that I have read through the user guide and articles, however, I could not find any information about “switching audio track during streaming”.

By the way, I am sorry to tell you that your answer is not constructive and really does not help. Please read through other people questions carefully before you write your answer.

Thank you.

Hi, Randall

Please accept my apology for my rude communication. I shall investigate more before I post more details. Thanks.

Hi,

We are build our custom module and need to support the ability to “switch” the audio track on the fly. All our media is muxed into a mp4 wrapper. Each mp4 file contains one video track, two audio tracks and two subtitle tracks.

We know how to switch the subtitle tracks and then render them on the screen using a custom Flex based ActionScript player. However, we’ve tried several methods to switch the audio track on the fly.

Here are the two methods we’ve tried:

  1. Using the NetStream.play2 with something like this:

NetStream.play2(“mpa:” + this.audioTrackList.selectedIndex);

  1. Caching the MediaReaderH264mediaReader object for a specific IClient in a hash table then receiving a message from the Flex player to switch audio tracks and calling: MediaReaderH264.setTrackIndexAudio(trackNumber)

Unfortunatly neither approach works. This could be because we could not find the correct options to use with NetStream.play2 in any books, manuals or forums and we are not sure if the media reader can only read part of the mp4 file at the start and then it can not be changed.

We are using rtmp and Wowza Server 3.0.3 build882. Any advice would be very helpful.

Thanks in advance,

-ct