Sharik ansari
Sharik ansari

Reputation: 111

How drawtext on video using flutter ffmpeg 0.3.0

Hello I want to add text and image on video but my command not working with flutter ffmpeg 0.3.0

Here is my commands :

Working command code with only logo:

FlutterFFmpeg flutterFFmpeg = new FlutterFFmpeg();
flutterFFmpeg.execute('-i $video -i $logo -filter_complex "overlay=20:20" $output').then((rc) => 
print("FFmpeg process exited with rc $rc"));

Not Working command code with logo and text:

FlutterFFmpeg flutterFFmpeg = new FlutterFFmpeg();
flutterFFmpeg.execute('-i $video -i $logo -filter_complex "overlay=20:20" drawtext=text=mytext $output').then((rc) => 
print("FFmpeg process exited with rc $rc"));

Please help me

Upvotes: 0

Views: 1093

Answers (1)

Sharik ansari
Sharik ansari

Reputation: 111

-i $video -i watermark.png -filter_complex "[0:v][1:v] overlay=5:2, drawtext=fontsize=20:fontcolor=white:fontfile=simple.ttf:text=hello" out.mp4

execute this command to add watermark with text in a flutter.

I was an error from fontfile don't forget to add fontfile correct path

Upvotes: 3

Related Questions