vlc.js issueshttps://code.videolan.org/jbk/vlc.js/-/issues2021-06-21T13:52:13Zhttps://code.videolan.org/jbk/vlc.js/-/issues/3[Feature] : build and link shared wasm modules2021-06-21T13:52:13ZMehdi Sabwat[Feature] : build and link shared wasm modulesexperimental.wasm, is currently statically linked, it takes away one of the coolest vlc features: being able to, during runtime, only load the modules (depending on the codec, file format and container, vlc feature etc...) you need.
The...experimental.wasm, is currently statically linked, it takes away one of the coolest vlc features: being able to, during runtime, only load the modules (depending on the codec, file format and container, vlc feature etc...) you need.
The current "link chain" looks like this:
`
libvlc.a => vlc-modules.bc => build/modules/.libs/* => contrib/lib/* => libvlccore.a => libcompat.a => experimental.wasm
`
vlc-modules, being a list of entries to the compiled modules.
[emscripten does not support pthreads + shared libraries](https://github.com/emscripten-core/emscripten/wiki/Linking#pthreads-support). The workaround would mean to patch the javascript loader so that it can load SIDE_MODULES in a pthread setup.
Sources:
[issue](https://github.com/emscripten-core/emscripten/issues/3494)
[dylink](https://webassembly.org/docs/dynamic-linking/)
[wasm table imports](https://hacks.mozilla.org/2017/07/webassembly-table-imports-what-are-they/)
[js wasm table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table)https://code.videolan.org/jbk/vlc.js/-/issues/4[Build] : cross compile vlc contribs2021-06-18T13:47:52ZMehdi Sabwat[Build] : cross compile vlc contribsConfigure and build more libraries in `vlc/contrib/src` (other than ffmpeg)Configure and build more libraries in `vlc/contrib/src` (other than ffmpeg)https://code.videolan.org/jbk/vlc.js/-/issues/9WebTransport module2021-06-21T13:50:08ZMehdi SabwatWebTransport modulehttps://code.videolan.org/jbk/vlc.js/-/issues/12WebCodec module2023-03-23T19:35:41ZMehdi SabwatWebCodec modulehttps://web.dev/webcodecs/https://web.dev/webcodecs/Olivier FAUREOlivier FAUREhttps://code.videolan.org/jbk/vlc.js/-/issues/16Handle multiple inputs in one page2021-06-21T13:51:31ZMehdi SabwatHandle multiple inputs in one page- use a [mosaic bridge](https://wiki.videolan.org/Documentation:Modules/mosaic-bridge/), and transcode all the streams into one output. (one vout/one canvas)
example with a vlm configuration file
```
new ch1 broadcast enabled
setup ch1...- use a [mosaic bridge](https://wiki.videolan.org/Documentation:Modules/mosaic-bridge/), and transcode all the streams into one output. (one vout/one canvas)
example with a vlm configuration file
```
new ch1 broadcast enabled
setup ch1 input "rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen02.stream"
setup ch1 output #mosaic-bridge{id=ch1,width=1280,height=512}
#setup ch1 output #display{}
new ch2 broadcast enabled
setup ch2 input "rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen03.stream"
setup ch2 output #mosaic-bridge{id=ch2,width=1280,height=512}
#setup ch2 output #display{}
new bg broadcast enabled
setup bg input "image.jpg"
setup bg output #transcode{vcodec=mp4v,vb=0,fps=0,acodec=none,channels=2,sfilter=mosaic{alpha=255,width=1280,height=10\
80,cols=1,rows=2,position=1,order="ch1,ch2",keep-aspect-ratio=enabled,mosaic-align=0,keep-picture=1}}:bridge-in{offset\
=100}:display
control bg play
control ch1 play
control ch2 play
```
having a broadcast, (thanks alaric) will call vlm_MediaInstanceNew() for each channel, so, we will have multiple players.
- another solution could be to use input slaves to have multiple inputs, and then use an sout to display them:
```
cvlc image.jpg --input-slave="./sample.mp4#./vlcjs.mp4" --sout "#display{}:display"
```
There could be cases where it would be better to have one vout in one canvas, and others where having multiple canvas is required.
https://code.videolan.org/-/snippets/1326https://code.videolan.org/jbk/vlc.js/-/issues/17[Core] : cannot link vlc.js with libvlc on core patchset branch (json module)2022-03-08T10:00:41ZMehdi Sabwat[Core] : cannot link vlc.js with libvlc on core patchset branch (json module)There is a bug in the linking stage, the wasm file does cannot be finalized or validated.
branch to reproduce : https://code.videolan.org/jbk/vlc.js/-/commits/bug-2.0.17
[emcc.output](/uploads/a1f748af2c8c7f9baa75520e306dcd1f/emcc.outp...There is a bug in the linking stage, the wasm file does cannot be finalized or validated.
branch to reproduce : https://code.videolan.org/jbk/vlc.js/-/commits/bug-2.0.17
[emcc.output](/uploads/a1f748af2c8c7f9baa75520e306dcd1f/emcc.output)
[wasm-validate.output](/uploads/c0946a1880473db9871040af60f07cfc/wasm-validate.output)
https://github.com/WebAssembly/binaryen/issues/3804https://code.videolan.org/jbk/vlc.js/-/issues/30Troubleshoot Chrome on iOS2021-06-21T13:53:25ZMehdi SabwatTroubleshoot Chrome on iOSWASM features like atomics and bulk-memory are not supported in chrome iOS, I couldn't find flags in chrome://flags, maybe we need to launch it with specific command lines, or test a nightly version.WASM features like atomics and bulk-memory are not supported in chrome iOS, I couldn't find flags in chrome://flags, maybe we need to launch it with specific command lines, or test a nightly version.https://code.videolan.org/jbk/vlc.js/-/issues/31Troubleshoot Chrome on Android2021-06-21T13:53:35ZMehdi SabwatTroubleshoot Chrome on AndroidWASM features seem to be supported (webassembly.org/roadmap) however the demo does not work (https://bit.ly/35rExIt), I have an error 404 when I try to access the logs using remote dev tools.(in chrome://inspect/#devices)WASM features seem to be supported (webassembly.org/roadmap) however the demo does not work (https://bit.ly/35rExIt), I have an error 404 when I try to access the logs using remote dev tools.(in chrome://inspect/#devices)https://code.videolan.org/jbk/vlc.js/-/issues/32Troubleshoot Firefox on Android and iOS2021-06-21T13:46:42ZMehdi SabwatTroubleshoot Firefox on Android and iOSWASM features like atomics and bulk-memory are not supported in both OSes on Firefox 89.
Need to find the flags, or compile a version we can use to test and check if there are issues.WASM features like atomics and bulk-memory are not supported in both OSes on Firefox 89.
Need to find the flags, or compile a version we can use to test and check if there are issues.https://code.videolan.org/jbk/vlc.js/-/issues/33Audio samplerate support2021-06-21T13:54:47ZJean-Baptiste KempfAudio samplerate supportAdd multiple samplerate supportAdd multiple samplerate supporthttps://code.videolan.org/jbk/vlc.js/-/issues/34Audio multichannel support2021-06-21T13:55:32ZJean-Baptiste KempfAudio multichannel supportAdd 5.1/7.1.
See #33 alsoAdd 5.1/7.1.
See #33 alsohttps://code.videolan.org/jbk/vlc.js/-/issues/35Audio Output API2021-09-14T09:54:47ZMehdi SabwatAudio Output APICurrent version of the module :
https://code.videolan.org/b1ue/vlc/-/tree/wasm.aout
The idea is that the Audio API that vlc.js uses should not be in the module code. We can use [this](https://emscripten.org/docs/porting/connecting_cpp_...Current version of the module :
https://code.videolan.org/b1ue/vlc/-/tree/wasm.aout
The idea is that the Audio API that vlc.js uses should not be in the module code. We can use [this](https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#implement-a-c-api-in-javascript), to have a c file that implements functions to :
- create the audio context in the main thread, with parameters like sample rate and number of channels
(this is the part done by the AWNode class in the previous version.
- write to / read from the ring buffer. This part must also work from a pthread.
- set the volume