I am trying to do the below tasks.
- Convert video from webm to mp4 format
- Resize the video
- Add watermark to the bottom right
- Generate the thumbnail
I am able to do it by running multiple shell commands. Is there a way to do all four tasks in one go. For example
$watermark = "https://dummyimage.com/150x50/bf1fbf/ffffff.png";
shell_exec("ffmpeg -i test.webm -vf scale=100:-1, {$watermark} -filter_complex overlay=x=(main_w-overlay_w):y=(main_h-overlay_h) test.mp4 -ss 00:00:01.000 -vframes 1 test.jpg");