I see in WordPress 3.6 that you can read metadata from video and audio files. I have read through the codex (http://codex.wordpress.org/Function_Reference/wp_read_video_metadata), and even tried to implement getting the bitrate on a video, but with no results. Does anyone know the answers to the following questions:
- Can this function be used to read the metadata on my videos hosted on Amazon S3, basically can this function be used for external video and audio?
- Can I call this in a page template? I ask because the error I received when I tried the default example from the codex was that the function wp_read_video_metadata was not found. Which indicates the file wp-admin/includes/media.php is not being included on a standard page template.
- Finally, does anyone have a working example of getting audio or video metadata using these new functions?
Any help would be great. Thanks!
I don’t think so. The WordPress code uses the PHP function file_exists() which doesn’t say it cannot check external files. The ID3 code, however, tries to determine the web server operating system, so it looks like you need local files for the ID3 detection.
You will have to include to run it from a page template. The ID3 files should be loaded when the
wp_read_video_metadata()
function is run.I don’t, but perhaps this will help:
According to the Quick Start mini FAQ in the ID3
readme.txt
file:The files are on Sourceforge.