|
|
#1 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
Video Streaming
I'm in the process of making a video streaming system where I can specify the file in the URL, and the script will play the file in the DivX player.
I last asked for help in this thread, but feel a more up-to-date thread would help: Streaming Basically, I'm doing this in a special way, where... + Video is specificed in a variable (stream.php?video=file.avi) + stream_file.php will specify location, open, and read the file. + The video player on stream.php will play stream_file.php's file.avi I've tried this, but it seems that it just wants to keep "connecting". this method has worked with WMV files, but I really would like to use .avi files with the DivX player. Anyone have a solution that may work? Thank you.
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#2 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,227 posts
Gave thanks: 18
Thanked 86 times
|
If you're wanting to use the DivX player, I suspect the extension will need to .divx and the appropriate mime type added through cpanel for it.. whatever that is, and the correct mime type header sent out if using that script in the other thread.
I'll see if I can get something working on my site out of curiousity.
__________________
|
|
|
|
| This user thanks MarkRH for this great post! | GamingHybrid (August 9th, 2007) |
|
|
#3 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,227 posts
Gave thanks: 18
Thanked 86 times
|
I got a single embedded video to stream. It did not matter if i used a .avi or .divx extension of if I added a video/divx mime type or not.
I did notice that I had to use complete URLs for it to work, relative paths would fail. I then tried using that php script as the src with video=file.avi and I got the same constant connecting. So... now I'm like really tired.. lol.. My guess is you'd have make a sort of wrapper script where you sent it the filename and then it would generate the complete embed html code with the URL to the video. Hmmm...
__________________
|
|
|
|
| This user thanks MarkRH for this great post! | GamingHybrid (August 9th, 2007) |
|
|
#4 (permalink) | |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
Quote:
A test can be found here (warning, I used my only avi available at the time, a World of Warcraft trailer :O) Basically I'm trying to have a file specified in a .php document to be played in the player (aka, making the player's src that .php document). This is so that no one can download/leech (mainly download) that video... as I'm setting up a permission system for that... So, something along the lines of having the .php do a fopen() or so, the file I want ot be played, and then src-ing that .php in the embed (and param) code of the player. Yet so far it doesnt work Just gets stuck on loading...(Also, it seems that the src needs to have a .divx or .avi extension or the play wont bother trying at all! So I did a variable thing, basically file.php?video=file.avi)
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
|
#5 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
Oh, and the link given is a hard coded thing, not sourced to the .php file.... as it doesnt work yet :P
I just set that up to test the player. It pwns, but it's tweaking doesnt.
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#6 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
And you already replied lol.
Actually, that makes sense then! I'll try to modify my code with a url. Too bad I can'tlocate the files outside the /public_html/, but since even that is "hidden" with php, I don't think it matters if I use my domain then, hehe.
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#7 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
Here is what I've been trying to use...
stream.php - where the video player is: PHP Code:
Code:
<?PHP
$video = "/videos/".$_GET["vid"];
header("Content-Type: video/x-msvideo"); //that is an avi video
readfile($video);
?>
http://www.gaminghybrid.com/videos/ as you can see, the file is in there, but the player just doesn't want to play. Same issue with an .avi file. Just keeps "connecting"... (I know the script isn't secured yet, but it is still in alpha for functionality first)
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#8 (permalink) |
|
Race Surpass
Super #1
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,227 posts
Gave thanks: 18
Thanked 86 times
|
Basically running into the same problem. stream.php may work by changing it to:
PHP Code:
Code:
http://gallery.markheadrick.com/d/683-2/turtle_02aug2007.jpg which is actually being sent out by a php script since the images are above /public_html/ Wonder if I can use my gallery as an example to figure something out... hrmmm.
__________________
|
|
|
|
| This user thanks MarkRH for this great post! | GamingHybrid (August 10th, 2007) |
|
|
#9 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,547 posts
Gave thanks: 91
Thanked 49 times
|
the issue I'm facing is possibly that the server is confused about the file type...
I'm going to try a .htaccess trick, hopefully what I'm looking for will work...
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|