Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Compression Techniques finding a solution to watermark on video being unsharp/pixelated

  • finding a solution to watermark on video being unsharp/pixelated

    Posted by Chris James on May 17, 2019 at 4:55 am

    the 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”:
    [logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out]

    I need guidance with integrating scale2ref into a current line of code, for example:

    $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.

    Lou Logan replied 4 years, 11 months ago 3 Members · 2 Replies
  • 2 Replies
  • Jeff Pulera

    May 22, 2019 at 9:33 pm

    What are the resolutions of the logo graphic and the video clip?

    If for example the video is 1920×1080 and logo is 400×400, the logo is not going to look good blown up that much, just isn’t

    Thanks

    Jeff

    Jeff Pulera
    Safe Harbor Computers

  • Lou Logan

    October 9, 2019 at 7:12 pm

    If you know you aren’t upscaling (which is bad) then the culprit is probably the chroma subsampling occurring in the overlay filter. Use the “format=auto” option in the overlay filter, such as:

    overlay=10:10:format=auto

    Use the code button next time to properly format your command.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy