jsmpeg icon indicating copy to clipboard operation
jsmpeg copied to clipboard

How to achieve 5.1 or at least 2.1 audio?

Open revofire opened this issue 6 years ago • 2 comments

So I have a good working build right now but MP2 on JSMPEG is limited to Stereo, I wanted to achieve at least 2.1 or if possible, 5.1. I see in later specs of MP2 that this becomes acceptable. Is JSMPEG capable or will be capable of this in the near future? If not, what is the alternative, what methodology should I use? I don't think MPEG-TS accepts anything else, is it possible to have another audio decoder work simultaneously work in JS with this?

So currently I use OBS that proxies FFMPEG, so if FFMPEG can mix into this revision of MP2 then we're golden for that. Then it's a question of the decoder and making it still stay in sync with the frames...

https://en.wikipedia.org/wiki/MPEG-1#MPEG-2_audio_extensions

revofire avatar Nov 28 '18 14:11 revofire

You should handle audio outside of jsmpeg. jsmpeg only implements mpeg1.

mpeg1 allows mp3 audio, which supports only 2 channels.

I think you will have a hard time getting a browser to play > stereo anyway. I sunk a lot of time to this and tldr: it's not going to happen. The last I heard was Dolby + Edge having a "Windows based" partnership @ http://audioexperience.dolby.com/

jadaradix avatar Jan 11 '19 17:01 jadaradix

@revofire as alternative you could consider to produce binaural audio that works with stereo. But then you can experience 3D surround audio mainly with headphones / earphones. I am studying binaural audio and it very interesting :)

https://en.wikipedia.org/wiki/Binaural_recording

AndreaMonzini avatar May 24 '20 15:05 AndreaMonzini