Add dynamic video content (YouTube like) (PHP)
Asked Answered
E

8

3

I'm looking to setup video uploads for users on a site and want to have them viewed through a Flash player. The site is already partially built (by someone else) and I'm wondering what kind of technologies there are to deal with the video files, specifically in PHP.

I'm thinking the files need to be converted to an FLV. After that I think it's just loading the FLV, like an SWF in Flash.

They also want to do mp3's with Flash streaming, so it'd be cool if it could also support mp3's.

Eldredge answered 12/11, 2008 at 1:7 Comment(0)
B
8

ffmpeg is the tool for you. It's a major opensource video encoding library that a lot of other tools are based on. It's a bit tricky to use directly, but I think there are a few wrappers around.

Bollworm answered 12/11, 2008 at 1:13 Comment(2)
This is probably the best option, although the setup and configuration time are prohibitive. Much easier to use one of the many encoding services available, especially if only standard encoding is needed.Eldredge
Yes, I agree. All to easy to fall into the trap of wanting to do everything yourself. Some of the services out there are great, and cost so little it's very hard to justify doing it yourself.Bollworm
E
7

In adition to Daniels answer, I recommend you to check ffmpeg-php, is a wrapper library for PHP that adds an object-oriented API for accessing and retrieving information from video and audio files using ffmpeg.

You can do a lot of things, from converting between formats, get video frame images for thumbnails and more in an easy way...

Eartha answered 12/11, 2008 at 1:28 Comment(0)
E
3

Have you tried SWFObject for displaying FLVs? Used this recently in a project and it works a like a charm. Very easy to configure as well.

Endometriosis answered 12/11, 2008 at 10:8 Comment(2)
That's good to know about, although I need a way to get from, say a an avi to an flv first. After that it's not hard.Eldredge
I also came accross this - an opensource video platoform that runs on Amazon EC2 and S3. It manages uploads, encoding and streaming and implements a RESTful API. Take a look at pandastream.comEndometriosis
E
1

I actually found that using other services to encode the file is the easiest option and also the fastest to setup. I ended up using Hey!Watch for this project. I haven't worried about a streaming server/service yet because for the most part the videos are short and people won't be skipping around within the video.

Eldredge answered 12/2, 2010 at 6:56 Comment(0)
A
1

There is this highly underrated post with 3 great links for open source solutions that are like youtube and fits perfectly your question (and at least another one).

Amorous answered 24/3, 2010 at 22:42 Comment(0)
D
0

Use the YouTube API and let them do the heavy lifting for you.

Dewitt answered 12/11, 2008 at 1:8 Comment(1)
As far as I'm reading, the video will be posted on YouTube, which wouldn't work at the videos need to be private. If I'm wrong, can you provide a link?Eldredge
U
0

Just FYI: If you have HQ videos you need not to encode them into FLV. Flash Player 10 has builtin H264 support, this is what HQ does in popular video sites.

Unblock answered 9/12, 2009 at 21:48 Comment(0)
O
0
  • For converting movies to flv I suggest (as the most people before) ffmpeg
  • You could stream these flv over http, but then the users could not skip forward in the movies. There for you need a streaming server like FlashMediaServer or Red5. (These server are also more effcient than pure HTTP)
  • Finally you need FlashMovie that plays the stream. It's quite easy to write one by yourself, or you chose one the open sourced/free players. (e.g.: JW Player)
Octamerous answered 9/12, 2009 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.