1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help with finding a solution to watermark on video being unsharp/pixelated

Discussion in 'PHP' started by chrisj, May 17, 2019.

  1. #1
    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”:
    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';
    Code (markup):
    any additional assistance is appreciated.
    chrisj, May 17, 2019 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Likes Received:
    Best Answers:
    Trophy Points:
    This likely happens when the screen resolution is 50% or more larger than the movie resolution. Solution, use higher resolution movies. If your video is 480p (for example) of course any watermarked text is going to be blurry shown at 1080p. The only solution is better quality movies.

    Guessing wildly though, since you provided no actual example of such a movie, and half the commands in that ffmpeg string I don't recognize or use.
    deathshadow, May 23, 2019 IP