Closed himanshudeveloper closed 9 months ago
Please give the smallest available example
[AVFilterGraph @ 0xab401f80] No such filter: 'drawtext' Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 [aac @ 0xaabc8d00] Qavg: 3434.781 [aac @ 0xaabc8d00] 2 frames left in the queue on closing Conversion failed!
[AVFilterGraph @ 0x6e36d7dbd0] No such filter: '“drawtext' Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #0:0 Conversion failed!
That's not an example, show your command.
https://ffmpeg.org/ffmpeg-filters.html#drawtext-1
To enable compilation of this filter, you need to configure FFmpeg with --enable-libfreetype. To enable default font fallback and the font option you need to configure FFmpeg with --enable-libfontconfig. To enable the text_shaping option, you need to configure FFmpeg with --enable-libfribidi.
i am also facing same issue
LOG [AVFilterGraph @ 0xb4ad7700] No such filter: 'drawtext' LOG Error reinitializing filters! LOG Failed to inject frame into filter network: Invalid argument LOG Error while processing the decoded data for stream #0:0 LOG Conversion failed!
my code is:
const addTextOverlay = async (inputVideoPath: any, outputVideoPath: string, text: string, x: number, y: number, fontSize: number, fontColor: string) => { try {
const escapedText = text.replace(/"/g, '\\"'); // Escape double quotes in the text
const ffmpegCommand = `-i "${inputVideoPath}" -vf drawtext=text="${escapedText}":x=${x}:y=${y}:fontsize=${fontSize}:fontcolor=${fontColor} -codec:a copy -y "${outputVideoPath}"`;
// const ffmpegCommand = `-i ${inputVideoPath} -vf "drawtext=text='My text starting at 640x360':x=640:y=360:fontsize=24:fontcolor=white" -c:a copy ${outputVideoPath}`
const result = await FFmpegKit.executeAsync(ffmpegCommand);
console.log(outputVideoPath, 'outputVideoPath');
return outputVideoPath;
} catch (error) {
console.error('Error adding text overlay:', error);
throw error;
}
}; anyone help one this.
To enable compilation of this filter, you need to configure FFmpeg with --enable-libfreetype. To enable default font fallback and the font option you need to configure FFmpeg with --enable-libfontconfig. To enable the text_shaping option, you need to configure FFmpeg with --enable-libfribidi.
This message from @mathieu-aubin explains which libraries are needed for drawtext
. Make sure you use an ffmpeg-kit
package that includes those libraries.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
Description A clear and concise description of what the bug is.
Expected behavior What you expected to happen.
Current behavior What happened.
To Reproduce Steps to reproduce the behaviour.
Screenshots If applicable, add screenshots to help explain your problem.
Logs Post logs here or paste them to Ghostbin and insert the link here.
Environment
Android
/Flutter
/iOS
/Linux
/macOS
/ReactNative
/tvOS
arm-v7a
,arm-v7a-neon
,arm64-v8a
,x86
,x86_64
,armv7
,armv7s
,arm64
,arm64-mac-catalyst
,arm64-simulator
,arm64e
,i386
,x86-64
,x86-64-mac-catalyst
v5.1
/v5.1.LTS
main
,development
13.4.1
1.10.3
4.0
r25b
Other Add any other context about the problem here.