Add logo to video

687 Views Asked by At

I have a video streaming websites. And I have many videos on my website. I want to add my logo to all videos. How can I process all my videos using ruby if feasible to add my logo and add video intro at the video start?

1

There are 1 best solutions below

0
On

Depending on what you want to achieve there are two (maybe more.. :) ) options:

ffmpeg

Just process your videos with ffmpeg and add an overlay:

ffmpeg –i original_video.avi -vf "movie=logo.png [watermark]; [in][watermark] overlay=10:10 [out]" processed_video.flv

You could call this shell command from ruby, or maybe there are ways to integrate ffmpeg directly. Don't know ruby so well, but found e.g. this project: https://github.com/gwik/ffmpeg-ruby

You could also add the intro-sequence with ffmpeg, but as you probably are using a streaming server you could add it on the server. (e.g. sending a playlist containing the intro and video to the clients)

'Adding' the logo in the client player

You are not so specific about your setup - but maybe it would be possible to just add the logo in a customised player. If streaming via rtmp this could be a flash-based player with the logo on top of the video.