vlc.js issueshttps://code.videolan.org/jbk/vlc.js/-/issues2023-04-24T02:55:49Zhttps://code.videolan.org/jbk/vlc.js/-/issues/53An error ocurred while building the library2023-04-24T02:55:49ZLeandroGeorgeAn error ocurred while building the library`make: *** [../src/glslang/rules.mak:13: ../tarballs/glslang-ef1f899b5d64a9628023f1bb129198674cba2b97.tar.xz] Error 128
make: *** Waiting for unfinished jobs....
100 18.7M 100 18.7M 0 0 6073k 0 0:00:03 0:00:03 --:--:-- 60...`make: *** [../src/glslang/rules.mak:13: ../tarballs/glslang-ef1f899b5d64a9628023f1bb129198674cba2b97.tar.xz] Error 128
make: *** Waiting for unfinished jobs....
100 18.7M 100 18.7M 0 0 6073k 0 0:00:03 0:00:03 --:--:-- 6072k
38 2836k 38 1091k 0 0 172k 0 0:00:16 0:00:06 0:00:10 176kremote: Enumerating objects: 10270remote: Enumerating objects: 597266, done.
remote: Counting objects: 100% (597266/597266), done.
53 2836k 53 1514k 0 0 145k 0 0:00:19 0:00:10 0:00:09 103kremote: Compressing objects: 69% remote: Compressing objects: 100% (134843/134843), done.
61 2836k 61 1757k 0 0 142k 0 0:00:19 0:00:12 0:00:07 111kReceiving objects: 0% (433/59726 67 2836k 67 1926k 0 0 143k 0 0:00:19 0:00:13 0:00:06 121kReceiving objects: 0% (830/59726 74 2836k 74 2101k 0 0 146k 0 0:00:19 0:00:14 0:00:05 138kReceiving objects: 0% (1303/5972 79 2836k 79 2258k 0 0 147k 0 0:00:19 0:00:15 0:00:04 151kReceiving objects: 0% (1891/5972 84 2836k 84 2403k 0 0 146k 0 0:00:19 0:00:16 0:00:03 153kReceiving objects: 0% (2460/5972 90 2836k 90 2557k 0 0 147k 0 0:00:19 0:00:17 0:00:02 160kReceiving objects: 0% (2956/5972 96 2836k 96 2730k 0 0 149k 0 0:00:19 0:00:18 0:00:01 164kReceiving objects: 0% (3544/5972100 2836k 100 2836k 0 0 150k 0 0:00:18 0:00:18 --:--:-- 163k
remote: Total 597266 (delta 477003), reused 579175 (delta 461473), pack-reused 0
Receiving objects: 100% (597266/597266), 120.42 MiB | 128.00 KiB/s, done.
Resolving deltas: 100% (477003/477003), done.
From http://git.videolan.org/git/ffmpeg
* branch HEAD -> FETCH_HEAD
emmake: error: 'make -j4 fetch' failed (returned 2)`https://code.videolan.org/jbk/vlc.js/-/issues/52Dockerfile to generate vlc.js builds2023-03-27T09:48:50ZRahul D ShettyDockerfile to generate vlc.js buildsHi Team,
As the title suggests, I want to add a Dockerfile and improve build steps/instructions for vlc.js
- This will streamline the build process.
- This can be leveraged in CI/CD processes for generating vlc.js artifacts.
- Consiste...Hi Team,
As the title suggests, I want to add a Dockerfile and improve build steps/instructions for vlc.js
- This will streamline the build process.
- This can be leveraged in CI/CD processes for generating vlc.js artifacts.
- Consistent Environment for building artifacts.
I want to take this up for my GSoC'23 proposal, so please let me know your feedback.
Best Regards,
Rahulhttps://code.videolan.org/jbk/vlc.js/-/issues/51Can't get VideoDecoder type on Firefox2022-11-21T00:10:49ZBenjamin RyanCan't get VideoDecoder type on FirefoxAudio outputs but canvas is empty. Can vlc.js run on newer versions of Firefox (tried stable & dev)? This works on Chrome.
`[vlc.js: 0x23f20c0/0x176c268] libvlc decoder: Can't get VideoDecoder type, webcodec is probably not supported on...Audio outputs but canvas is empty. Can vlc.js run on newer versions of Firefox (tried stable & dev)? This works on Chrome.
`[vlc.js: 0x23f20c0/0x176c268] libvlc decoder: Can't get VideoDecoder type, webcodec is probably not supported on this browser`
* Firefox: 105.0.2 (64-bit) Windows 10
* Firefox Dev: 108.0b3 (64-bit)https://code.videolan.org/jbk/vlc.js/-/issues/50Placeholder for test job in the CI2022-06-30T16:39:29ZMehdi SabwatPlaceholder for test job in the CIUsing a framework like mocha to have a test job running tests in vlc/test/ , automatically.Using a framework like mocha to have a test job running tests in vlc/test/ , automatically.https://code.videolan.org/jbk/vlc.js/-/issues/49MediaList tests: Next does not play the next element in the medialist2022-06-30T16:15:28ZMehdi SabwatMediaList tests: Next does not play the next element in the medialistIn the testing branch, the vlc_media_list_poc.html file as a simple setup for media_list prev()/next() operations.
_next(), here fails to start playback for the next media.
For the logs, there seem to be the same as the ones where we c...In the testing branch, the vlc_media_list_poc.html file as a simple setup for media_list prev()/next() operations.
_next(), here fails to start playback for the next media.
For the logs, there seem to be the same as the ones where we call Stop() :
```
[vlc.js: 0x27f4c08/0x274aae0] libvlc vout display: picture displayed late (missing 1 ms)
experimental.js:9 [vlc.js: 0x23ef890/0x17e9c30] libvlc decoder: killing decoder fourcc `mp4a'
experimental.js:9 [vlc.js: 0x23ef890/0x17e9c30] libvlc decoder: removing module "avcodec"
experimental.js:9 [vlc.js: 0x2754648/0x17e9c30] libvlc audio resampler: removing module "samplerate"
experimental.js:9 [vlc.js: 0x274c350/0x17e9c30] libvlc audio filter: removing module "scaletempo"
experimental.js:9 [vlc.js: 0x2744290/0x17e9c30] libvlc volume: removing module "float_mixer"
experimental.js:9 [vlc.js: 0x12e2ba0/0x17e9c30] libvlc player: keeping audio output
experimental.js:9 [vlc.js: 0x12e69a8/0x17e9c30] libvlc input: ES track unselected: 'audio/1' (fourcc: 'mp4a')
```
First step is to investigate why the decoder module is not removed.https://code.videolan.org/jbk/vlc.js/-/issues/48SW decoder fallback fails2022-06-30T18:02:41ZMehdi SabwatSW decoder fallback failsThis seems to be due to the wrong texture format being used when allocating them in the interop_sw.c module.
Logs with BBB :
```
WebGL: INVALID_VALUE: texImage2D: invalid internalformat
experimental.js:9 WebGL: INVALID_VALUE: texImage2...This seems to be due to the wrong texture format being used when allocating them in the interop_sw.c module.
Logs with BBB :
```
WebGL: INVALID_VALUE: texImage2D: invalid internalformat
experimental.js:9 WebGL: INVALID_VALUE: texImage2D: invalid internalformat
experimental.js:9 WebGL: INVALID_VALUE: texImage2D: invalid internalformat
experimental.js:9 Aborted(Assertion failed: !"GL_INVALID_VALUE", at: /home/b1ue/cur/vlc.js/vlc/modules/video_output/opengl/vout_helper.c,150,vout_display_opengl_New)
experimental.js:9 Uncaught (in promise) RuntimeError: Aborted(Assertion failed: !"GL_INVALID_VALUE", at: /home/b1ue/cur/vlc.js/vlc/modules/video_output/opengl/vout_helper.c,150,vout_display_opengl_New)
at abort (experimental.js:9:276349)
at ___assert_fail (experimental.js:9:298793)
at imports.<computed> (experimental.js:9:415376)
at Open.50 (experimental.wasm:0x261c43)
at vout_display_New (experimental.wasm:0x13679f1)
at Thread.3 (experimental.wasm:0x1374159)
at dynCall_ii (experimental.wasm:0x142f0a2)
at ret.<computed> (experimental.js:9:416050)
at Object.doRewind (experimental.js:9:417474)
at experimental.js:9:418422
```https://code.videolan.org/jbk/vlc.js/-/issues/47Crash at the end of the file2022-06-30T14:03:58ZMehdi SabwatCrash at the end of the file```
Uncaught (in promise) RuntimeError: null function or function signature mismatch
at vlc_frame_Release (experimental.wasm:0x12aef)
at vlc_frame_Cleanup (experimental.wasm:0x55568b)
at ret.<computed> (experimental.js:9:1471...```
Uncaught (in promise) RuntimeError: null function or function signature mismatch
at vlc_frame_Release (experimental.wasm:0x12aef)
at vlc_frame_Cleanup (experimental.wasm:0x55568b)
at ret.<computed> (experimental.js:9:147157)
at MessagePort.onDecoderWorkerMessage (experimental.js:9:22759)
experimental.js:9 Error while decoding:
experimental.js:9 DOMException: Decoder error.
```
Happened one time, at the end of the BigBuckBunny sample, with webcodec.
```
Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 3 frames
Format settings, GOP : M=1, N=30
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 9 min 56 s
Bit rate : 1 991 kb/s
Maximum bit rate : 5 373 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.090
Stream size : 142 MiB (94%)
```https://code.videolan.org/jbk/vlc.js/-/issues/46[CI]: Setup http headers to allow serving vlc.js artifacts2022-08-10T12:24:44ZMehdi Sabwat[CI]: Setup http headers to allow serving vlc.js artifactsThe vlc.js app uses the SharedArrayBuffer object, which needs [specific headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy#certain_features_depend_on_cross-origin_isolation) in the gitlab inst...The vlc.js app uses the SharedArrayBuffer object, which needs [specific headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy#certain_features_depend_on_cross-origin_isolation) in the gitlab instance.
the closest thing I found in the documentation to allow setting custom headers is :
https://docs.gitlab.com/ee/administration/pages/#http-strict-transport-security-hsts-support
The idea is to have these [artifacts](https://gitlab.com/msabwat/e85e00/-/blob/ci/.gitlab-ci.yml#L16), served to allow this [page](https://msabwat.gitlab.io/-/e85e00/-/jobs/2644493000/artifacts/vlc.html) to run without errors and without the coi service worker.https://code.videolan.org/jbk/vlc.js/-/issues/45[WASMFS] Placeholder for filesystem api change2022-04-13T12:45:12ZMehdi Sabwat[WASMFS] Placeholder for filesystem api changeenabling -s WASMFS shows two issues :
1.
```
warning: undefined symbol: $SOCKFS (referenced by $getSocketFromFD__deps: ['$SOCKFS','$FS'], referenced by __syscall_accept4__deps: ['$getSocketFromFD','$writeSockaddr','$DNS','$SYSCALLS'], r...enabling -s WASMFS shows two issues :
1.
```
warning: undefined symbol: $SOCKFS (referenced by $getSocketFromFD__deps: ['$SOCKFS','$FS'], referenced by __syscall_accept4__deps: ['$getSocketFromFD','$writeSockaddr','$DNS','$SYSCALLS'], referenced by top-level compiled C/C++ code)
```
linking with `-lsockfs.js` is not a solution because it will call .mount() with the wrong filesystem.
2. Assuming we don't need this syscall for now, in the runtime we have an assert :
```
Uncaught RuntimeError: Aborted(Assertion failed: (flags & ~(O_CREAT | O_EXCL | O_DIRECTORY | O_TRUNC | O_APPEND | O_RDWR | O_WRONLY | O_RDONLY | O_LARGEFILE | O_CLOEXEC)) == 0, at: /b/s/w/ir/x/w/install/emscripten/system/lib/wasmfs/syscalls.cpp,388,doOpen)
at abort (experimental.js:2171:11)
at ___assert_fail (experimental.js:2860:7)
at doOpen(wasmfs::path::ParsedParent, long, unsigned int, wasmfs::Backend*) (experimental.wasm:0xdac1d8)
at __syscall_openat (experimental.wasm:0xdac4eb)
at open (experimental.wasm:0xdc53e8)
at vlc_open (experimental.wasm:0xda5407)
at FileOpen (experimental.wasm:0x113eaa)
at generic_start (experimental.wasm:0xd3069b)
at vlc_module_load (experimental.wasm:0xd30529)
at module_need (experimental.wasm:0xd3061b)
```
That means that some flags are not supported, if we remove the assert, the demo works.
Next step is to add a backend to allow reading a previously selected file in a dedicated pthread (or wasm worker)https://code.videolan.org/jbk/vlc.js/-/issues/44[toolchain update] possible regression in emsdk 3.1.62022-04-13T11:08:45ZMehdi Sabwat[toolchain update] possible regression in emsdk 3.1.6Linking vlc.js with libvlc when (emsdk version >= 3.1.6) shows an issue :
```
### build logs ###: libvlc build: generate static modules entry points
creating module list
### build logs ###: vlc static modules: compiling static modules...Linking vlc.js with libvlc when (emsdk version >= 3.1.6) shows an issue :
```
### build logs ###: libvlc build: generate static modules entry points
creating module list
### build logs ###: vlc static modules: compiling static modules entry points
VLC for wasm32-unknown-emscripten built!
getting video
Generating executable
Setting environment variables:
wasm-ld: error: --shared-memory is disallowed by libaribb24_la-drcs.o because it was not compiled with 'atomics' or 'bulk-memory' features.
emcc: error: '/home/b1ue/may22/wasmfs/emsdk/upstream/bin/wasm-ld @/tmp/emscripten_7b66v_9f.rsp.utf-8' failed (returned 1)
```
It can be worked around by enabling pthread on zlib and png.
[Suspected additions](https://github.com/emscripten-core/emscripten/compare/3.1.5...3.1.6)https://code.videolan.org/jbk/vlc.js/-/issues/43Provide docker file for reproducible build2022-03-28T07:18:53ZBanouProvide docker file for reproducible buildI've been trying to build one of the latest branches to no success, the end build always has some assert issues at runtime or just doesn't finish building.
I'm guessing I am missing something but there's no explicit errors on what is goi...I've been trying to build one of the latest branches to no success, the end build always has some assert issues at runtime or just doesn't finish building.
I'm guessing I am missing something but there's no explicit errors on what is going wrong.
It would be helpful if you could setup a small dockerfile to be able to build vlcjs easily.https://code.videolan.org/jbk/vlc.js/-/issues/42Make Modularize an opt-in feature2022-03-28T06:53:56ZMehdi SabwatMake Modularize an opt-in featureIf we don't want to rename the Module's factory function, to directly access the Module object. It is currently hard to do, and the code could be reorganized to make it easier.If we don't want to rename the Module's factory function, to directly access the Module object. It is currently hard to do, and the code could be reorganized to make it easier.https://code.videolan.org/jbk/vlc.js/-/issues/41configure takes a lot of time2022-03-22T10:48:42ZMehdi Sabwatconfigure takes a lot of timeThis ticket is a placeholder for configure slowness issue.
I did a quick test to understand why it takes 5x more time to configure in wasm-emscripten, compared to linux for example. Forcing CFLAGS/CXXFLAGS to disable optimizations for c...This ticket is a placeholder for configure slowness issue.
I did a quick test to understand why it takes 5x more time to configure in wasm-emscripten, compared to linux for example. Forcing CFLAGS/CXXFLAGS to disable optimizations for conftest.c compilation adds a 5 second speedup.
```
libvlc configuration: -O0
--------------------
version : 4.0.0-dev
system : emscripten
architecture : wasm32
optimizations : yes
build vlc executable : no
To build vlc and its plugins, type `make', or `./compile' if you like nice colors.
real 0m45.816s
user 0m42.492s
sys 0m8.851s
```
```
libvlc configuration: -g -O2 (default)
--------------------
version : 4.0.0-dev
system : emscripten
architecture : wasm32
optimizations : yes
build vlc executable : no
To build vlc and its plugins, type `make', or `./compile' if you like nice colors.
real 0m51.078s
user 0m50.229s
sys 0m10.476s
```https://code.videolan.org/jbk/vlc.js/-/issues/40add missing eglGetPlatformDiplay2022-02-17T18:33:20ZMehdi Sabwatadd missing eglGetPlatformDiplay```
wasm-ld: error: ./vlc/build-emscripten/modules/.libs/libegl_display_generic_plugin.a(libegl_display_generic_plugin_la-egl_display_generic.o): undefined symbol: eglGetPlatformDisplay
``````
wasm-ld: error: ./vlc/build-emscripten/modules/.libs/libegl_display_generic_plugin.a(libegl_display_generic_plugin_la-egl_display_generic.o): undefined symbol: eglGetPlatformDisplay
```https://code.videolan.org/jbk/vlc.js/-/issues/39Verify and upstream webgl toolchain fix2022-01-31T09:17:45ZHugo Beauzée-LuyssenVerify and upstream webgl toolchain fix```
diff --git a/src/library_html5_webgl.js b/src/library_html5_webgl.js
index 46a673663..a7618c702 100644
--- a/src/library_html5_webgl.js
+++ b/src/library_html5_webgl.js
@@ -178,7 +178,7 @@ var LibraryHtml5WebGL = {
#endif
...```
diff --git a/src/library_html5_webgl.js b/src/library_html5_webgl.js
index 46a673663..a7618c702 100644
--- a/src/library_html5_webgl.js
+++ b/src/library_html5_webgl.js
@@ -178,7 +178,7 @@ var LibraryHtml5WebGL = {
#endif
return 0;
}
- canvas = GL.offscreenCanvases[canvas.id];
+ canvas = GL.offscreenCanvases[canvas.id].canvas;
}
}
#else // !OFFSCREENCANVAS_SUPPORT
```
Making this an issue in order not to forget and because I can't guarantee that it's enough to get a usable offscreen canvas :sweat_smile:https://code.videolan.org/jbk/vlc.js/-/issues/38Remove some contribs from the build2022-01-04T10:10:57ZHugo Beauzée-LuyssenRemove some contribs from the builda52, aom, faad2 chromaprint mad libmpeg2 nvcodec tremov vpx theoraa52, aom, faad2 chromaprint mad libmpeg2 nvcodec tremov vpx theorahttps://code.videolan.org/jbk/vlc.js/-/issues/37vout: do not hardcode video width and height2021-11-17T14:15:29ZMehdi Sabwatvout: do not hardcode video width and heightCurrently, playing a video with :
```
Width : 1 920 pixels
Height : 1 080 pixels
```
won't scale correctly because of https://code.videolan.org/jbk/vlc.js/-/blob/incomi...Currently, playing a video with :
```
Width : 1 920 pixels
Height : 1 080 pixels
```
won't scale correctly because of https://code.videolan.org/jbk/vlc.js/-/blob/incoming/vlc.html#L91 and the vout module does not resize.
Need to be careful about not letting the browser do the resize, and let vlc do it.
Cf.
https://github.com/emscripten-core/emscripten/blob/main/tests/canvas_animate_resize.cpp#L18https://code.videolan.org/jbk/vlc.js/-/issues/36aout: destroy awn_cb_wrapper2021-11-23T12:53:30ZMehdi Sabwataout: destroy awn_cb_wrapper```
Embind found a leaked C++ instance awn_cb_wrapper <0x13965e0>.
We'll free it automatically in this case, but this functionality is not reliable across various environments.
Make sure to invoke .delete() manually once you're done with...```
Embind found a leaked C++ instance awn_cb_wrapper <0x13965e0>.
We'll free it automatically in this case, but this functionality is not reliable across various environments.
Make sure to invoke .delete() manually once you're done with the instance instead.
Originally allocated
at emval_allocator_1 (eval at craftEmvalAllocator (https://192.168.1.81:8443/test/update/experimental.js:1:1), <anonymous>:7:11)
at __emval_new (https://192.168.1.81:8443/test/update/experimental.js:9924:14)
at (anonymous namespace)::Open(vlc_object_t*) (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[3020]:0x10750f)
at generic_start (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24286]:0xe38cca)
at vlc_module_load (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24284]:0xe38b57)
at module_need (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24285]:0xe38c4a)
at aout_New (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[25045]:0xe85760)
at input_resource_GetAout (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24924]:0xe7d602)
at vlc_player_aout_Init (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24899]:0xe7b4df)
at vlc_player_New (https://192.168.1.81:8443/test/update/experimental.wasm:wasm-function[24855]:0xe77376)
```
https://github.com/emscripten-core/emscripten/pull/15327https://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 volumehttps://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 also