You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arrived to the first error:
make[1]: Leaving directory '/home/rafael2k/files/dw/ffmpeg.js/build/ffmpeg-webm'
emcc build/ffmpeg-webm/ffmpeg.bc build/opus/dist/lib/libopus.so build/libvpx/dist/lib/libvpx.so
--post-js build/post-sync.js
-O3 --closure 1 --memory-init-file 0 -s WASM_ASYNC_COMPILATION=0 -s ASSERTIONS=0 -s EXIT_RUNTIME=1 -s TOTAL_MEMORY=67108864 --pre-js build/pre.js -o ffmpeg-webm.js -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 -lnodefs.js -lworkerfs.js -s WASM=0
Traceback (most recent call last):
File "/usr/share/emscripten/emcc.py", line 3292, in
sys.exit(main(sys.argv))
File "/usr/share/emscripten/emcc.py", line 3285, in main
ret = run(args)
File "/usr/share/emscripten/emcc.py", line 2156, in run
post_link(options, wasm_target, wasm_target, target)
File "/usr/share/emscripten/emcc.py", line 2253, in post_link
do_binaryen(target, options, wasm_target)
File "/usr/share/emscripten/emcc.py", line 2774, in do_binaryen
run_closure_compiler()
File "/usr/share/emscripten/emcc.py", line 2769, in run_closure_compiler
final_js = building.closure_compiler(final_js, pretty=not minify_whitespace(),
File "/usr/share/emscripten/tools/building.py", line 1027, in closure_compiler
proc = run_process(cmd, stderr=PIPE, check=False, env=env)
File "/usr/share/emscripten/tools/shared.py", line 94, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "/usr/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '--max_old_space_size=8192'
make: *** [Makefile:278: ffmpeg-webm.js] Error 1
In my current DASH workflow I contribute (upload) the live stream to icecast2, then I make ffmpeg connect to it and create the DASH manifest and files on the fly.
The desired destination would be a server which can later serve the encoded DASH formatted media through a webserver. But I'm not totally sure yet. The "push" protocol can be REST based, or not. A simple network socket pushing the media to the server would be enough already.
@rafael2k this is now in the UI. You can select DASH or HLS, POST or PUT and the CORS mode.
I tested it PUTting to a local Apache server which I enabled WebDAV on and it worked fine - I could stream the DASH files into a <video> element from a different browser.
This is wonderful David. I'll test soon. Cheers!
(And will also try to finally fix my build setup, which is almost there - .wasm gets created and the fail is just for the .js creation)
Activity
rafael2k commentedon Oct 7, 2021
Thanks David! So I should compile this (your) branch, right?
Already started compiling and it seems to be going all good! Just typed "make"!
rafael2k commentedon Oct 7, 2021
Arrived to the first error:
make[1]: Leaving directory '/home/rafael2k/files/dw/ffmpeg.js/build/ffmpeg-webm'
emcc build/ffmpeg-webm/ffmpeg.bc build/opus/dist/lib/libopus.so build/libvpx/dist/lib/libvpx.so
--post-js build/post-sync.js
-O3 --closure 1 --memory-init-file 0 -s WASM_ASYNC_COMPILATION=0 -s ASSERTIONS=0 -s EXIT_RUNTIME=1 -s TOTAL_MEMORY=67108864 --pre-js build/pre.js -o ffmpeg-webm.js -s NODEJS_CATCH_EXIT=0 -s NODEJS_CATCH_REJECTION=0 -lnodefs.js -lworkerfs.js -s WASM=0
Traceback (most recent call last):
File "/usr/share/emscripten/emcc.py", line 3292, in
sys.exit(main(sys.argv))
File "/usr/share/emscripten/emcc.py", line 3285, in main
ret = run(args)
File "/usr/share/emscripten/emcc.py", line 2156, in run
post_link(options, wasm_target, wasm_target, target)
File "/usr/share/emscripten/emcc.py", line 2253, in post_link
do_binaryen(target, options, wasm_target)
File "/usr/share/emscripten/emcc.py", line 2774, in do_binaryen
run_closure_compiler()
File "/usr/share/emscripten/emcc.py", line 2769, in run_closure_compiler
final_js = building.closure_compiler(final_js, pretty=not minify_whitespace(),
File "/usr/share/emscripten/tools/building.py", line 1027, in closure_compiler
proc = run_process(cmd, stderr=PIPE, check=False, env=env)
File "/usr/share/emscripten/tools/shared.py", line 94, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "/usr/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.9/subprocess.py", line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '--max_old_space_size=8192'
make: *** [Makefile:278: ffmpeg-webm.js] Error 1
davedoesdev commentedon Oct 7, 2021
Are you compiling with separate emsdk? https://emscripten.org/docs/getting_started/downloads.html
It looks like your version of Node doesn't support that argument.
Another way would be to use the Docker image - see https://emscripten.org/docs/getting_started/downloads.html but use
davedoesdev/ffmpeg.jsinstead ofkagamihi/ffmpeg.js.davedoesdev commentedon Oct 7, 2021
@rafael2k by the way, the example is now up: https://github.com/davedoesdev/streamana
rafael2k commentedon Oct 8, 2021
@davedoesdev, I'm compiling with stock versions from Debian 11 repository.
rafael2k commentedon Oct 8, 2021
Cool, thanks! I'll try with the binaries for now.
davedoesdev commentedon Oct 8, 2021
OK cool. The stock version from Debian is probably behind quite a bit. emsdk comes with it's own version of Node, for instance.
davedoesdev commentedon Oct 8, 2021
I'll think about how best to put dash in
rafael2k commentedon Oct 12, 2021
Yay! I'll update just my node and see if compilation finishes (or try to patch the source).
davedoesdev commentedon Oct 16, 2021
@rafael2k how are you testing DASH ingestion? Is there an open source server I can test against?
rafael2k commentedon Oct 17, 2021
In my current DASH workflow I contribute (upload) the live stream to icecast2, then I make ffmpeg connect to it and create the DASH manifest and files on the fly.
davedoesdev commentedon Oct 17, 2021
Hmm, at the moment I've only tested streaming the generated DASH files to an ingestion URL (like YouTube).
I guess that's not your use case?
davedoesdev commentedon Oct 17, 2021
I suppose if you had a local web server which accepted POST (or PUT) of the generated DASH files then that might work?
davedoesdev commentedon Oct 17, 2021
I'll have a look at setting one up locally when I get time.
I should also look at how streaming from the server to the browser works :)
davedoesdev commentedon Oct 17, 2021
Btw, I merged DASH support into master and streamana
I'll need to test it by ingesting it into a local http server and then playing out the files in a browser
rafael2k commentedon Oct 17, 2021
Great! Indeed, icecast2 works this way [1] - a PUT to the server. In case of DASH, I think the ingest will be similar, but instead of just one PUT, it will be one PUT per chunk, I think.
[1] https://github.com/social-dist0rtion-protocol/wasm-stream/blob/master/src/icecast.js
davedoesdev commentedon Oct 17, 2021
@rafael2k in your workflow, where is the desired destination of the DASH files?
rafael2k commentedon Oct 18, 2021
The desired destination would be a server which can later serve the encoded DASH formatted media through a webserver. But I'm not totally sure yet. The "push" protocol can be REST based, or not. A simple network socket pushing the media to the server would be enough already.
davedoesdev commentedon Oct 20, 2021
@rafael2k this is now in the UI. You can select DASH or HLS, POST or PUT and the CORS mode.
I tested it PUTting to a local Apache server which I enabled WebDAV on and it worked fine - I could stream the DASH files into a
<video>element from a different browser.rafael2k commentedon Oct 21, 2021
This is wonderful David. I'll test soon. Cheers!
(And will also try to finally fix my build setup, which is almost there - .wasm gets created and the fail is just for the .js creation)
davedoesdev commentedon Dec 7, 2021
@rafael2k how did you get on?