1

I use this command for my video:

ffmpeg -i input.mp3 -i input.mp4 -y -ss 00:00:00 -t 00:00:10 -filter_complex "[0:a]showwaves=s=1920x175:colors=Yellow:mode=cline,colorkey=0x000000:0.01:0.1,format=yuva420p[v];[1:v][v]overlay=0:800[outv]" -map "[outv]" -pix_fmt yuv420p -map 0:a -c:v libx264 -c:a copy -shortest output.mp4

and this command to the video:

ffmpeg -i input.mp4 -y -ss 00:00:00 -t 00:00:10 -vf drawtext="fontfile=/path/to/font.ttf: text='My Text': fontcolor=white: fontsize=74: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -c:v libx264 -c:a copy -shortest output.mp4

I want to combine these two command in one command. I see this question and try several times without success.

georgmann
  • 45
  • 1
  • 3

2 Answers2

0

Just add it after the overlay :

[1:v][v]overlay=0:800,
       drawtext="fontfile=/path/to/font.ttf: text='My Text': fontcolor=white: fontsize=74: box=1: 
       boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2"[outv]"
Gyan
  • 63,018
  • 7
  • 100
  • 141
0

Thank you very much! It's work! I'm happy!

ffmpeg -i input.mp3 -i input.mp4 -y -ss 00:00:00 -t 00:00:10 -filter_complex "[0:a]showwaves=s=1920x175:colors=Yellow:mode=cline,colorkey=0x000000:0.01:0.1,format=yuva420p[v];[1:v][v]overlay=0:800,drawtext=fontfile=/path/to/font.ttf: text='My Text': fontcolor=white: fontsize=74: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -pix_fmt yuv420p -map 0:a -c:v libx264 -c:a copy -shortest output.mp4
georgmann
  • 45
  • 1
  • 3