1
votes

Both F4V and MP4 files have "video/mp4" as their MIME type. However, I'm working on a Wordpress blog where I want uploaded F4V files to be shown using a Flash video Player, and MP4 files using the HTML5 [video] tag. Obviously, I can't tell them apart using their MIME type. Is there any other way I could do it, aside of the file extension?

Thanks.

1

1 Answers

1
votes

I can't seem to find a good list of metadata available for MP4 files, but it is possible that the F4V files may have a metadata item that MP4 does not. See this for a list of F4V data:http://help.adobe.com/en_US/FlashMediaEncoder/2.5/help.html?content=config_automate_16.html

Additionally, there is a PHP class available to read metadata from both file formats which may help you out: http://code.google.com/p/php-mp4info/