Closed alpacaPwaa closed 2 months ago
If anyone is reading this who has successfully set up ffmpeg wasm before please give a little help, I would love to work with ffmpeg wasm for the project I had in mind.
Having a similar issue.
@alpacaPwaa Would you please check the log of ffmpeg like below so that we can see if we are having the same issue?
const ffmpeg = new FFmpeg();
ffmpeg.on("log", ({ message }) => {
console.log("[ffmpeg]", message);
});
The detailed error I encounter is Error initializing filter 'drawtext' with args 'text="hello"' index.ts:129:12
Arg passed to ffmpeg.exec
is
[
"-i",
"input.mp4",
"-vf",
"drawtext=text=\"hello\"",
"output.mp4"
]
I've also tried with text=hello
, text='hello'
. None of them worked.
I'm new to ffmpeg. I found another random video filter and it worked: scale=iw/2:-1
Perhaps this issue is drawtext
-only?
https://ffmpegwasm.netlify.app/docs/getting-started/usage/#display-text-on-the-video
It turned out that font file is required in order to make drawtext
work properly. My problem solved after loading & applying font file.
But it would be more friendly to user if ffmpeg.wasm could warn user that font is missing. Because fontfile
was not required when running ffmpeg
natively
@EnixCoda thanks for your reply, I just came back to my project and saw your reply it's very helpful, I did the same and it fix the error.
Describe the bug The console give this error everytime I try to transcode the uploaded file.
VideoUploaderTest.tsx:42 Uncaught (in promise) ErrnoError: FS error
To Reproduce
Expected behavior I should be able to transcode the video and add overlay text to it.
Screenshots
Desktop (please complete the following information):