Forum Moderators: coopster

Message Too Old, No Replies

Video and PHP

Is there a way to get information from video files in PHP?

         

threefivetwo

6:19 am on Oct 29, 2006 (gmt 0)

10+ Year Member



I've got an online project allowing users to post text and images relating to a specific subject. I'd like to implement a system for video files to be uploadable and viewable. However, due to constraints on storage and the design of the site, no video can be larger in resolution than 640x480 (in fact, I'm considering limiting resolution to either 640x480 or 320x240 for simplicity). The videos would either be in the .wmv format or the .mov format, and use browser plugins for viewing.

However, I'm not really sure how to detect the resolution of the video file. I scanned through the PHP manual (as well as searching) and I didn't see any functions relating to video files. I think it might be possible to directly access the file and read from the header, but given the complexity (as far as I'm concerned) of doing so, I'd rather not. Is there a way to do this?

Thanks

mcibor

4:45 pm on Oct 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know any built in way to check the video files,
but here you've got specifications of:
.asf
[microsoft.com...]

.wmv
[digitalpreservation.gov...]

.mov (was hard to find)
[digitalpreservation.gov...]

However I think the best option would be to limit the size of upload, not the resolution, but that's up to you.

Regards
Michal