Hello all,
i am stuck on this.. i want to be able to play a video from a mysql database. Currently i can upload the video to mysql (name, type, size, content) and download the file. i have a media player that shows a video, but i have to use the <embed src"...location of file">
Basically this is what i am asking for.

User enters page... video plays current video. On the left side of video player, there are links of different videos. so if a user want to watch a video, he/she clicks on the link and watches that video.
i just dont know how to put the file together and get displayed on the embeded player.

So.. i click on link
info gets passed to php code.
php pulles file info from mysql (name, type, size, content);
php puts content together and displays on the video player.
i know its easier to store videos on a server and just upload the "url", but i want it to be played via mysql content. i really appreciate any comments or help.

Recommended Answers

All 10 Replies

Hello all,
i am stuck on this.. i want to be able to play a video from a mysql database. Currently i can upload the video to mysql (name, type, size, content) and download the file. i have a media player that shows a video, but i have to use the <embed src"...location of file">
Basically this is what i am asking for.

User enters page... video plays current video. On the left side of video player, there are links of different videos. so if a user want to watch a video, he/she clicks on the link and watches that video.
i just dont know how to put the file together and get displayed on the embeded player.

So.. i click on link
info gets passed to php code.
php pulles file info from mysql (name, type, size, content);
php puts content together and displays on the video player.
i know its easier to store videos on a server and just upload the "url", but i want it to be played via mysql content. i really appreciate any comments or help.

just use this flow player..

http://flowplayer.org/

here u also get code to display your video...

if it didnt work then reply here...:)

put the files in a folder
put the uri of the files in the database
smaller faster

put the files in a folder
put the uri of the files in the database
smaller faster

hi, may i know the step u do it. My problem is how to save url on database...
thanks in advance.

hi, may i know the step u do it. My problem is how to save url on database...
thanks in advance.

To save into the database simply have a column named url and maybe a column named title then to insert use the following syntax.

mysql_query('INSERT INTO `movies` SET `title`="matrix reload", `url`="1647.flv"');

And to select it all you need to do is mysql_query('SELECT `url` FROM `movies` WHERE `title`="matrix reload"');
Very simple. Then of course you pass the url to a client side flv/movie player.

the quetions? i have a folder called VIDEO and mysql database filed where all the .flv video file path has been saved into.
how do i embed .flv file in my browser using the path from the database .
any help will be appreciated.

you make the query and get the filename and path as [example]$row and $row
then using whatever tag/script normally plays a flv file
example

<tag url='filepath' >play filename</tag>

becomes

echo "<tag url='$row['filepath']' >play $row['filename']</tag>";

obviously NOT the actual code, I have no idea what the player is for flv

How to display thumbnail of videos using flowplayer.

How to display thumbnail of videos using flowplayer.

HTML5 video player not working with video bigger than 13 mb.

Member Avatar for diafol

This thread died 4 years ago. There is no knowing whether your question is related to the OP or not as you don't specify the video filetype. flv? HTML5?!
Perhaps you should consider starting a new thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.