ffmpeg.wasm
ffmpeg.wasm copied to clipboard
Screen grabbing
I'm new to this, so not sure if this is a bug or a feature request.
I'm trying to run the following command capture the desktop screen:
ffmpeg.run('-f', 'avfoundation', '-framerate', '5', '-i', '"1"', '~/Desktop/ffmpeg-test-electron.mkv')
I get an error saying Unknown input format: 'avfoundation'. The command works fine when run with ffmpeg directly in the command line (without the wasm build).
I understand that for this to work, ffmpeg uses it's library called libavdevice
. Is that not part of the wasm build?
wasm can't access to your device screen directly
if you wanna capture the desktop screen, try navigator.mediaDevices.getDisplayMedia
and MediaRecorder
in JavaScript
Actually the whole reason I came to this library was because I didn’t want to use the browser’s getDisplayMedia
method as Chrome doesn’t allow an option to never capture the cursor in the recording.
So you’re saying using the ffmpeg Wasm is a dead end?
Edit: Just want to mention it’s an electron app In building.
ffmpeg.wasm
runs on wasm and can be considered virtual, isolated from the operating system, so there is no direct access to the host
use package @ffmpeg-installer/ffmpeg
instead, which runs directly on host