Open connorbo97 opened 2 years ago
Hey, you need to convert the video into an array buffer before passing to ffmpeg.js, e.g.:
const vid = await fetch(url);
const buffer = await vid.arrayBuffer();
ffmpeg({
MEMFS: [{ name: 'test.mp4', data: buffer }],
arguments: [
'-i',
'test.mp4',
...
In the CLI, ffmpeg can accept a URL as the input file
ffmpeg -i http://archive.org/download/athooPhahghookoaNg4o/A%20Life%20Among%20the%20Clouds%3A%20A%20NATURE%20Short%20Film-QI25c80h0WI-nomusic.mpeg4 -ss 8 -t 1 -vf fps=1 %d.jpg
However, when I try these arguments in ffmpeg.js, it doesn't recognize the protocol. Are URL inputs not supported? Am I inputting the arguments wrong?
The output is
Run with node
v16.14.2