flowplayer / flash

Flowplayer Flash, the video player for the Web
http://flowplayer.org
282 stars 182 forks source link

Support multi-channel of audio #283

Open litvinok opened 9 years ago

litvinok commented 9 years ago

I have some video file with two or many audio channels (different languages for example). I would like have ability to choice need channel.

I believe that it will be very cool feature, I don't know any other flash player which supports it. HTML5 video player already has specification for this feature, but at this moment it implemented only in the IE11.

I suggest to develop plugin or include this feature in the flowplayer core.

(Source: https://github.com/flowplayer/flowplayer/issues/776)

danrossi commented 9 years ago

you can't do this with HTTP or RTMP there is no api option to do that. packing audio streams into the one file is inefficient anyway. Both HDS and HLS allow for this, it will inject the separate mp3 or aac files into the stream.

However I had to do some modifications for hbo recently to programatically switch the language audio its not in the plugin at the moment for HDS. but it's fully supported in my HLS feature or the free one available on the site but I dont support that one someone else might.

I have done some modifications to my own plugin where some people had multiple audio streams in their TS fragments rather than separate audio feeds so I had to accomodate for that.

it is unfortunate but "only supporting in such and such" is a very common affair in browser land it will never change therefore does need flash fallbacks as work arounds.

There is a way still but it requires security work arounds sadly.

http://flash.flowplayer.org/plugins/streaming/pseudostreaming.html

There is a byte range support feature, but it would have to do a whole lot of demuxing and parsing to choose the right audio track to append with the video track for both flv and mp4. It would work pretty much the same way as HDS and HLS but on standard mp4 files. The worth of this kind of work i'm unsure of ?

vkhramtsov commented 9 years ago

Our main point is that we want to allow user to switch audio stream on the fly online and offline (after downloading file) and we want to avoid synchronization problems between audio and video streams. After some investigation, we have figured out that the simplest way is store different audio tracks in different audio streams in one file. Currently in API of flowplayer (clip) we can see different audio tracks, but unfortunately cannot switch between them. Would you be so kind to implement plugin, that allow to switch audio tracks? P.S. Using HLS or HDS will lead us to overhead and we would like to avoid it, because we are use static mp4 files for this functionality.

danrossi commented 9 years ago

If you have an example I can see what might be possible.

vkhramtsov commented 9 years ago

Please use this file from https://dl.dropboxusercontent.com/u/2026692/result.mp4. It has one video and three audio tracks. Thank you.

vkhramtsov commented 9 years ago

Any news about this ticket?

VinGarcia commented 8 years ago

+1 I also would like to see this feature implemented

danrossi commented 8 years ago

Hi guys there is beginning support for multi channel audio as in surround tracks folding down to stereo but natively in the browser in mp4 containers and mpeg dash.

It's not across all yet sadly.

IE Edge and Safari supports AC3 format I believe, also folding down surround tracks to stereo.

If Flash supported such a thing, I'm not sure how it works but if it connected to this multi channel support in browsers then it would be possible.

As far as alternate switching goes for language audio tracks. Use HDS / Mpeg Dash / HLS. It allows for selectable external audio streams.

ie I have a demo for HDS on my page here and uses Flash. It appends audio separate from the video.

https://flowplayer.electroteque.org/httpstreaming-hds/fp6