Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG - Get creation and/or modification date

I'm trying hard to get the modification date from a MP4 file hosted on my server.

I tried the following library:

ffmpeg -i video.mp4

Without any luck. All I get is duration and a few other fields but I'm not able to get modification date. I tried ffprobe as well and it is not there either.

Any suggestions??

Thanks a lot

like image 570
rmartrenado Avatar asked Aug 22 '26 15:08

rmartrenado


2 Answers

Get creation_time with ffprobe:

ffprobe -v quiet input.mp4 -print_format json -show_entries stream=index,codec_type:stream_tags=creation_time:format_tags=creation_time

To view all tags:

ffprobe -v quiet input.mp4 -print_format json -show_entries stream_tags:format_tags

I can't find any reference to modification_time so consider using exiftool or mediainfo.

like image 168
aergistal Avatar answered Aug 25 '26 05:08

aergistal


A simpler alternative to aergistal in terms of output is

$ ffprobe -v quiet -select_streams v:0  -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 input.mp4

which will just print the creation time like so:

2020-07-23T11:51:02.000000Z
like image 38
Will Avatar answered Aug 25 '26 05:08

Will



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!