tags:

views:

56

answers:

2

I am a php newbie so i may be completely off here. But this is what i want to do.

Have a user upload a video to my site.

This then has a 30 second clip from our database added to it.

Which can be downloaded by the user for upload on any third party websites. Essentially the video is a flv or mpeg4, etc. But now with the 30 second clip added on.

These are the key point that make this difficult though.

  1. I would want for certain links that are attached to the video file that is downloaded to be clickable from whereever it is uploaded to.

  2. I would want for the 30 second slot to not be fast-forwardable. (Like on the youtube ads). <- I know they use FLASH for that./ But i would need my videos to be functional anywhere and youtube videos cant do that without attachment to youtube.

(This is something i intend to build myself. I just need your help in figuring out HOW to do it.)

All answers are GREATLY appreciated.

Thanks Alot!!

+1  A: 

The challenges you bring up are not something you would ideally fix with PHP knowledge per se. PHP doesn't offer any video editing capabilities of its own, so you would effectively have to use PHP to run some other utilities.

The only PHP aspect here, really, is receiving an upload from the user, executing an external command on the uploaded file, and providing it as a download again. Those are the only parts of this process that I think you can realistically do with PHP alone, and they are quite easy. If you want to figure those out before you figure out the video editing aspect, then find information about making PHP receive a file from the user, how to make a PHP script downloadable instead of a page, and how to execute external commands.

That said, there are command-line utilities out there which you can use PHP to run on the file. I suggest you check out 'mencoder'. I've only used it a couple of times myself to do some video encoding conversions, but that's the first thing that comes to mind. It doesn't matter what you find... provided that it's a command-line utility, you can make PHP use it, even if you're running Windows as a server (imagine that!).

In short; I recommend trying to find command-line utilities that support video manipulation first, forgetting about PHP for a while, then figuring out how to use them, and only then figuring out how to make PHP do what you have to do.

Helgi Hrafn Gunnarsson
A: 

The part with links in the video + no fastforward is not possible in my experience with php or anything else if this is only a video file. If you go for a full embeded player or at least youtube, then it's possible.

DCC