Help to find a solution to video watermark being unsharp/pixelated

For the developers that use FFmpeg in their software.
Post Reply
chrisj
Posts: 1
Joined: Thu May 16, 2019 4:40 pm

Help to find a solution to video watermark being unsharp/pixelated

Post by chrisj » Fri May 17, 2019 2:12 pm

the php web video script that I’m using adds a watermark successfully, however, the watermark.png looks ok on the small screen, but when full screen is selected the watermark.png image looks much less sharp.

‘scale2ref’ seems like a possible solution. I have tried different attempts with it without success. The ffmpeg documentation shows:

“Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio”:

Code: Select all

[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]
I need guidance with integrating scale2ref into this current line of code:

Code: Select all

$ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.escapeshellarg($watermark_image_full_path).' -i '.escapeshellarg($watermark_image_full_path).' -filter_complex "scale=426:-2, scale=426:-2, overlay=10:10, overlay=170:170:enable=between(t\,5\,5+2)" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 '.$video_output_full_path_240.' 2>&1';
any additional assistance is appreciated.

Post Reply
'