The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Display video time/date stamp right on the video, I wish to use html and script and CSS to display a video's actual
DaveNemo
post Jul 16 2020, 11:06 AM
Post #1





Group: Members
Posts: 2
Joined: 16-July 20
Member No.: 27,438



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 16 2020, 12:00 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,587
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
DaveNemo
post Jul 19 2020, 10:00 AM
Post #3





Group: Members
Posts: 2
Joined: 16-July 20
Member No.: 27,438



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????
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 19 2020, 12:32 PM
Post #4


.
********

Group: WDG Moderators
Posts: 8,587
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 19 2020, 12:41 PM
Post #5


.
********

Group: WDG Moderators
Posts: 8,587
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st October 2020 - 08:24 PM