Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To water mark videos at bottom right corner using ffmpeg

Tags:

php

ffmpeg

I found some answer here in stack which is indeed using ffmpeg but it is giving me some error.

I ran it in command window and the error is quite like

"Unable to find a suitable output format for 'ΓÇôi' ΓÇôi: Invalid argument".

my command is as follows

ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=(main_w-overlay_w-10)/2:(main_h-overlay_h-10)/2 [out]" outputvideo.mp4

please suggest some ideas.

like image 480
bibliophilsagar Avatar asked Oct 08 '15 10:10

bibliophilsagar


1 Answers

You can try these out. Should work out for you.

/*
 * At top left watermark
 */
$mark = "ffmpeg -i ".$inputvideo." -i logo.png -filter_complex ". '"overlay=x=(main_w-overlay_w)/(main_w-overlay_w):y=(main_h-overlay_h)/(main_h-overlay_h)"'." ".uniqid()."topleft.mp4";

/*
 * At top right watermark
 */
$mark = "ffmpeg -i ".$inputvideo." -i logo.png -filter_complex ". '"overlay=x=(main_w-overlay_w):y=(main_h-overlay_h)/(main_h-overlay_h)"'." ".uniqid()."topright.mp4";
like image 134
Parthapratim Neog Avatar answered Sep 25 '22 01:09

Parthapratim Neog