Help - Search - Members - Calendar
Full Version: Display video time/date stamp right on the video
HTMLHelp Forums > Web Authoring > Graphics, Flash and Multimedia
DaveNemo
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
Christian J
Haven't tried, but maybe this could work? https://www.phpclasses.org/package/10183-PH...ideo-files.html

Not sure if browsers' video players allow you to position the resulting data in front of the video.
DaveNemo
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????
Christian J
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/We...nt/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.
Christian J
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2020 Invision Power Services, Inc.