I'm trying to find code to display a video's time and date stamp (from the video's metadata) right on the video in a browser. Is that possible? I'm using MP4 videos.
DaveNemo
Haven't tried, but maybe this could work? https://www.phpclasses.org/package/10183-PHP-Extract-metadata-from-audio-and-video-files.html
Not sure if browsers' video players allow you to position the resulting data in front of the video.
Thanks for the info. I looked at the data that it can get and it seems that it gets media length but not file date/time stamp. Anybody else got a lead on how to get file date/time stamp????
Oh, I thought you meant the creation date in the video's EXIF data. In contrast, the actual file's last-modifed timestamp is defined as when it's uploaded to the server. You can get that with PHP as well: https://www.php.net/manual/en/function.filemtime.php or with javascript https://developer.mozilla.org/en-US/docs/Web/API/Document/lastModified
Of course the content could have been created long before the file was uploaded. Also note that if your web host decides to migrate to new server software (or you change web host) the last-modified timestamp will be reset.
A more reliable approach might be to specify the date explicitly in some way. For example, you might use it as part of the file name; or if you use a database, use a column for dates.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)