Help with ffmpeg watermark sizing/scaling

The web video script that I’m using works successfully integrating a watermark in the upper left corner of the video file, (so that when it’s downloaded, the watermark stays on the video):

$ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.$watermark_image_full_path.' -filter_complex "overlay=10:10,scale=640:-2" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 '.$video_output_full_path_240.' 2>&1';

I’ve modified this line successfully to make the code so that the watermark also displays briefly in another location (150:150), after 5 seconds, on the video:

$ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.$watermark_image_full_path.' -i '.$watermark_image_full_path.' -filter_complex "overlay=10:10,scale=640:-2, overlay=150:150:enable=between(t\,5\,5+2),scale=640:-2" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 '.$video_output_full_path_4096.' 2>&1';

However, on the uploaded test videos, the first watermark in the upper left corner now looks small and unsharp(but didn’t look that way before the modification), and the 2nd watermark, that displays in the middle after 5 seconds, looks to be the correct size, and a sharp appearance.

I saw this link:

which states"you have to scale each of the watermarks separately" so, then I tried this without success:

$ffmpegCommand =‘’.$ffmpeg_b.’ -y -i ‘.$video_file_full_path.’ -i ‘.$watermark_image_full_path.’ -i ‘.$watermark_image_full_path.’ -filter_complex “scale=640:-2; scale=640:-2; overlay=10:10; overlay=150:150:enable=between(t,5,5+2)” -vcodec libx264 -preset ‘.$pt->config->convert_speed.’ -crf 26 ‘.$video_output_full_path_240.’ 2>&1’;

Any ideas on how to get the first watermark to not look small/unsharp will be welcomed.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.