Hello,
I have to play large video files (10-60 minutes) into my website. I will use PHP/Mysql when developing my site but I don't know anything about the movie playing part.
Anyone can help me ? How can I play movie files ? What format you say it's the best ?
Please notice that I will have to make the movies myself as they will be some tutorials stuff.
Play MOVIES using PHP
Moderator: General Moderators
This isn't a PHP thing it's an HTML thing. You will need to embed the movie into your HTML page, probaly using the <object> tag.
For big movies though I would recommend streaming them with RealVideo or something because no one will hang around waiting for a 10 minute long movie to load.
Another alternative would be to use Flash to stream the video, I know Flash MX has some very good video streaming options.
For big movies though I would recommend streaming them with RealVideo or something because no one will hang around waiting for a 10 minute long movie to load.
Another alternative would be to use Flash to stream the video, I know Flash MX has some very good video streaming options.
- AVATAr
- Forum Regular
- Posts: 524
- Joined: Tue Jul 16, 2002 4:19 pm
- Location: Uruguay -- Montevideo
- Contact:
like Gen-ik said, you have to make it through html, like this: http://www.strixs.com/demo_3d.php
Here you go... I pulled out the <embed> object for you. This is one of the things you can use to play your movie(s). Just replace "yourMovie.mov" which the name of your .mov file (if you are using them) and obviously change the width="" and height="" values to match your movie.
Code: Select all
<embed src="yourMovie.mov" width="320" height="272" autoplay="false" loop="false" controller="true" playeveryframe="false" cache="true" scale="TOFIT" bgcolor="#000000" kioskmode="false" targetcache="false" pluginspage="http://www.apple.com/quicktime/"></embed>Try this:
Add a new column "video_name varchar(30)" to your MySQL table and add some values like: smt.avi - then create the php file:
<?php
...
$sql ="select video_name from $table_name where ..."
....
while ($row =mysql_fetch_array($result)) {
$video_name = $row['video_name'];
}
if ($video_name != "") {
echo "<a href=\"$video_name\">$video_name </a><br>";
}
?>
If you click on the link the video should be played - You've got to have the required plugins of course.
Add a new column "video_name varchar(30)" to your MySQL table and add some values like: smt.avi - then create the php file:
<?php
...
$sql ="select video_name from $table_name where ..."
....
while ($row =mysql_fetch_array($result)) {
$video_name = $row['video_name'];
}
if ($video_name != "") {
echo "<a href=\"$video_name\">$video_name </a><br>";
}
?>
If you click on the link the video should be played - You've got to have the required plugins of course.