0

i use this command for padding my video:

ffmpeg -i 1.mp4 -vf "pad=width=254:height=254:x=0:y=50:color=#ffff55" 2.mp4

and this command for adding watermark to the video:

ffmpeg -i 2.mp4 -vf drawtext="fontfile=arial.ttf: text='Stack Overflow': fontcolor=#ffff55: fontsize=24: box=1: boxcolor=black@0.5: x=(w-text_w)/2: y=(h-text_h)/2" -codec:a copy 3.mp4

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

علیرضا
  • 2,069
  • 1
  • 20
  • 30

1 Answers1

1

Chain the filters together,

ffmpeg -i 1.mp4 -vf "pad=254:254:0:50:color=#ffff55,drawtext=fontfile=arial.ttf:text='Stack Overflow':fontcolor=#ffff55:ontsize=24:box=1:boxcolor=black@0.5:x=(w-text_w)/2:y=(h-text_h)/2" -c:a copy 3.mp4
Gyan
  • 63,018
  • 7
  • 100
  • 141