uploading and playing videos

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Wilbo
Forum Newbie
Posts: 22
Joined: Fri Jul 25, 2008 5:45 am

uploading and playing videos

Post by Wilbo »

Hi there,

I want to make a system on my site where I can upload videos for people to watch.
I've never done anything with videos before so I don't really know what to do and I was wondering if anyone could give me some advice.

I want the player to be embedded into the webpage. Does this mean flash?

Any help or links to articles would be greatly appreciated.

Thanks in advance,

Wilbo
User avatar
The_Anomaly
Forum Contributor
Posts: 196
Joined: Fri Aug 08, 2008 4:56 pm
Location: Tirana, Albania

Re: uploading and playing videos

Post by The_Anomaly »

I've been working a great deal with this kind of thing, and I've found that by far your best option is FLV video. This is what YouTube uses, and most other professional sites now. Windows media player is crap, Quicktime is not very compatible, and no one has Realplayer. On the other hand, anyone who would care enough to watch media would have flash--whether they know it or not.

So, if you choose to go by flash, you'll need to encode your uploaded video into a flv format. The best OS software I've found for this job is ffmpeg, with lame installed and enabled during compilation.

So, that leaves the problem of playing the video. I personally adore Flowplayer, as it's basically free, very customizable, and has insanely good documentation. I'm sure there are other options, but that's what I like.


As far as uploading the videos, you can find a plethora of information regarding uploading on these forums and through google. Just an FYI that you might already know, but I just recently learned: the MIME type of an uploaded file is easily changed. So, if you want to confirm that a video is actually a video, I've been told to use ffmpeg or a similar encoder.

So, basically, you want to upload, encode, and play--and all the code to make it work :)

I hope this helps!

EDIT: Oh, and one other thing, that you probably already know. Just google your living lungs out. There is so much information on google, I've spent more time in the search engine than in my code editor. Almost any problem you have has been had by someone else, and solved by them. It really is pretty awesome when you come to think of it.
Wilbo
Forum Newbie
Posts: 22
Joined: Fri Jul 25, 2008 5:45 am

Re: uploading and playing videos

Post by Wilbo »

Thanks The_Anomaly,
You broke it down nicely for me.
I've already made the upload code so thats no problem.

I'll give it a go then!
User avatar
The_Anomaly
Forum Contributor
Posts: 196
Joined: Fri Aug 08, 2008 4:56 pm
Location: Tirana, Albania

Re: uploading and playing videos

Post by The_Anomaly »

Wilbo wrote:Thanks The_Anomaly,
You broke it down nicely for me.
I've already made the upload code so thats no problem.

I'll give it a go then!
Glad to hear I could help :)
Post Reply