Help : FFmpeg drawing text on video is giving error
I have setuped a nextjs project with @ ffmpeg/ffmpeg's latest version I am running the command
await FF.exec([
"-i",
inputVideoFile.name,
"-vf",
"drawtext=text='When my code works':fontsize=16:x=10:y=10:fontcolor=white",
"output.mp4"
]);
But the command is giving this error
[fferr] [Parsed_drawtext_0 @ 0xbb902c0] No font filename provided
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] [AVFilterGraph @ 0x6e37640] Error initializing filter 'drawtext' with args 'text=When my code works:fontsize=16:x=10:y=10:fontcolor=white'
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] Error reinitializing filters!
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] Failed to inject frame into filter network: Invalid argument
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] Error while processing the decoded data for stream #0:0
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] [aac @ 0x6a767c0] Qavg: 20187.871
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] [aac @ 0x6a767c0] 2 frames left in the queue on closing
ae344e46-c550-42cd-bea3-e14537683a64:49 [fferr] Conversion failed!
ae344e46-c550-42cd-bea3-e14537683a64:49 [ffout] FFMPEG_END
VM360 index.js:219 [info] run FS.readFile output.mp4
In the end it is giving me a 0kb video file.
Note : All other commands are working fine