1

I want to combine two ffmpeg commands to single ffmpeg command.

exec("ffmpeg -i mimic/api/video/1560754087943.mp4 -i logo.png -filter_complex"." overlay=20:20"." topleft.mp4");



exec('ffmpeg -i topleft.mp4 -vf drawtext="fontfile=ARIBLK.ttf: text=sonukh3921: fontcolor=white: fontsize=20: x=20: y=65" output_video.mp4');

Is this possible to use the output from the first command for the second line, without using two separate commands?

1 Answers1

1

The below single command is just for you:

ffmpeg \
-i mimic/api/video/1560754087943.mp4 \
-i logo.png \
-filter_complex "overlay=20:20[video];[video]drawtext=fontfile=ARIBLK.ttf:text=sonukh3921:fontcolor=white:fontsize=20:x=20:y=65" \
output_video.mp4
ravin.wang
  • 1,122
  • 1
  • 9
  • 26
  • exec('ffmpeg \ -i 1.mp4 \ -i logo.png \ -filter_complex "overlay=20:20[video];[video]drawtext=fontfile=ARIBLK.ttf:text=sonukh3921:fontcolor=white:fontsize=20:x=20:y=65" \ output_video.mp4'); – 4k wallpaper Jun 19 '19 at 07:42
  • no " and \ in command line string, it is for bash command line, you may try exec('ffmpeg -i 1.mp4 -i logo.png -filter_complex overlay=20:20[video];[video]drawtext=fontfile=ARIBLK.ttf:text=sonukh3921:fontcolor=white:fontsize=20:x=20:y=65 output_video.mp4'); – ravin.wang Jun 19 '19 at 10:03