How to use the new wp_read_video_metadata function

  1. 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?

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.

  1. Can I call this in a page template?

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.

require_once( ABSPATH . 'wp-admin/includes/media.php' );
  1. Finally, does anyone have a working example of getting audio or video metadata using these new functions?

I don’t, but perhaps this will help:

According to the Quick Start mini FAQ in the ID3 readme.txt file:

Q: How can I check that getID3() works on my server/files?
A: Unzip getID3() to a directory, then access /demos/demo.browse.php

The files are on Sourceforge.