views:

479

answers:

3

Hi,

I am developing online video streaming website on PHP.

I need two functionalities:

  1. Need to add title/text at bottom of the video dynamically.
  2. Need to add background music to video dynamically.

Is it possible with PHP or any available open source library?

Can anyone guide me or provide links to this type of library ?

Thanks.

+2  A: 

Editing video with PHP is an extremely bad idea. This idea very closely approximates impossible. At best you would need to decode the video which would be brutally slow in php.

If I had to tackle this problem, I would try to add the title and background music in the player, not to the video file itself. If you're streaming the video it is likely that you're using Flash or some other client-side player. You would need to write the player (or perhaps modify an existing one, there are several available) to add another layer over top of the movie for the title, and an audio track.

Slightly more hare-brained, but still easier than rewriting video in php, would be to layer a transparent image generated in php over top of the player using css and javascript, and embedding the audio in the page. This paragraph contains a terrible idea.

Rob Drimmie
This solution would typically not block people from downloading the source video without the overlaid text or the background audio. But it's the only viable solution using only PHP, HTML, Flash, CSS, and Javascript.
donut
A: 

very simple just make a player ( flash palyer with default watermark) and no need of php.

svrfoundations
+1  A: 

php doesn't provide any video oriented stuff to perform, but there is one CMS namely Kaltura, is designed and implemented in doing these kindaa stuff. Search it , download it and play it.

AmolL