Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing pointers in Mysql to video files on HDD

Status
Not open for further replies.

EagleM

Programmer
Jan 17, 2007
31
US
I need a PHP/Mysql website to have video files for viewing/downloading. I'm not sure whether to store the files in the database, or to keep the large video files on the disk, and store in the DB only the pointers to file locations on the disk. It seems that storing only the pointers makes more sense.

What do you think?

How can I store pointers to file locations on the disk? I don't know where to start. If I have the video files on the disk, and I want to store their locations in the DB, so that people can click on a link to view them, what do I do?
 
Yes, video on filesystem, not in DB.

file: /home/files/sports/bearssuperbowlvictory2007.avi
or windows:
file: c:/video/sports/bearssuperbowlvictory2007.avi

Then in your DB table, build a sufficient amount of detail in the table, including the field that contains the file's path for retrieval. When it's time to queue up the video, you handoff that file's location/name to your streaming engine.

D.E.R. Management - IT Project Management Consulting
 
I would use a virtual path, this way you're not bound to the physical device the files are stored on.

like

/videoserver/files/sports/bearssuperbowlvictory2007.avi

change the /videoserver part when you have to stream the video...

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top