mthguy wrote:as of now i have to get the films in .mov from the film makers
Unless you and your content providers have a very fast connection, you will probably have troubles with HTTP uploads as the upload script will either time out, exceed the max file upload size or exceed the max post size.
features.file-upload.common-pitfallsYou can override these settings globally in the php.ini file, in an .htaccess file or locally using
ini_set().
To prevent opening up your entire server, I think that it would be best to use a .htaccess file for your uploads directory.
If you don't want to do this, you will have to use ftp uploads, but now you have the issue of trying to match the meta data to the file uploads.
mthguy wrote:so in all i was wondering if there were free and/or simple to use tools for converting uploaded .mov to an open free format that i could easily code into the website without much issue.
As others have said, use mencoder or ffmpeg, which are basically the same thing. There are many examples on the web and its usage probably warrants its own thread if needed.
At a high level, my workflow be something like this, if using HTTP uploads:
Content provider:
1. (addnew.php) User completes upload form containing the file upload and the meta data (tags), title, director, actors, whatever, etc.
2. (uploadnew.php) Tags are written to the database with a flag showing the video is unprocessed. Now the video is searchable, but not available (coming soon). The mov file is moved to TODO folder for backend processing. Take a look at the
$_FILES superglobal and
move_uploaded_file().
End
Backend:
The backend will call a php script via cli scheduled as a cron job.
Now you have 2 options, run the job frequently throughout the day checking for new uploads and processing them if not already converting another. Or you set the job to run over night, processing the previous days uploads. The later delays the time to availability, but if you only have one server, the mencoder process will consume a lot of resources potentially impacting its ability to server pages. So running at 3am has less impact on your end users.
(convert.cli.php) First, the script looks for other running instances of itself, if it finds one, it exits. You don't want to try to convert two mov files at the same time.
Then get a
dir listing of the files in the TODO folder. Query the db based on the original file names, stuff that into an array.
Start looping.
Call the mencoder command via one of the
Program execution Functions (shell_exec or passthru). Parse the output of the mencoder command.
Do error processing if needed.
Otherwise move the original mov file from the TODO folder to the processed folder, write the processed file path and set the processed flag to complete in the db.
End loop
End
mthguy wrote:also, as of now the film listings and information are stored in a MySQL database, and called via php to the pages, but i have been unable to figure out how to dynamically store the movie files in the database, i just store them in a directory and name them so they are easily found, then type the path into the databse. this also seems fairly round-about to arriving at the place where i would like to be. is there an easy why to store large files in the database itself, or should i just code it to automate what is being done now?
I am not sure how much value you would gain from this. It will help with backups, portability and clustering. But how often do you plan on moving the db, or hosting this site from more than one server? For now, stick with file path pointers in your database. But if you are adamant, this should get you started:
http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx.