I need to create a video gallery for a website, and would like to create it using the html5 video tag backed up by videojs.

As I havent worked with video uploads before I have some doubts on how to approach it:

What file size would you recommend as a max?

How do I configure the apache server to be able to recognize the file extensions? At the moment I have this in the .htaccess file in the same dir as the upload scripts:

AddType video/ogg .ogv
AddType video/mp4 .mp4 .m4v
AddType video/webm .webm
SetEnvIfNoCase Request_URI \.(ogv|mp4|webm)$ no-gzip dont-vary

Is this correct?

I only want to allow the above mime types and file extensions, and let the client convert the videos beforehand on his own.

I tested the $_FILES['video']['type'] on my localhost, and I wasnt able to echo it out, when I was uploading an .AVI file, just for testing. Does that mean that my server isnt able to recognize that file type? Im just asking to know a bit more on wether these types of files are "standard" and can be uploaded or not.

I wasnt able to move the .AVI file with move_uploaded_file(), so I tested it with an image file, and it moved just fine to the target folder.

But, would the above .htaccess codes make the server "see" the files and let them be uploaded to the site?

How is the "normal approach for uploading html5 video files"?

/Klemme

Recommended Answers

All 2 Replies

Hi,

Yes for the admin of the website - It is in a CMS, where the owner would like to be able to create his own video gallery.

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.