0

I am making video uploading site in shared hosting using PHP and I want users to upload their videos, and I want to put logo watermark to appear automatically on every video uploaded to site.

I don't want to use any API for this, please help

I have tried to put watermark on images using:

imagecopy();

& it worked fine.

How to Install and Run FFMpeg in shared hosting ?

Sandeep Pal
  • 31
  • 1
  • 4
  • 1
    Possible duplicate of [Adding watermark to a video by using ffmpeg in php](https://stackoverflow.com/questions/19356963/adding-watermark-to-a-video-by-using-ffmpeg-in-php) –  Mar 24 '19 at 08:08
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow – James Z Mar 24 '19 at 08:53

1 Answers1

1

You should check following library. May be its helpful.

https://github.com/PHP-FFMpeg/PHP-FFMpeg#watermark

Watermark a video with a given image.

$video
->filters()
->watermark($watermarkPath, array(
    'position' => 'relative',
    'bottom' => 50,
    'right' => 50,
));

https://transloadit.com/demos/video-encoding/watermarking/

Watermark videos

"watermarked": {
  "use": "resized",
  "robot": "/video/encode",
  "ffmpeg_stack": "v3.3.3",
  "result": true,
  "preset": "ipad-high",
  "watermark_url": "https://demos.transloadit.com/inputs/transloadit-padded.png",
  "watermark_size": "25%",
  "watermark_opacity": 0.7,
  "watermark_x_offset": -10,
  "watermark_y_offset": 10,
  "watermark_position": "top-right"
}