FFMPEG - 获取创建和/或修改日期

rma*_*ado 1 mp4 ffmpeg html5-video

我正在努力从我服务器上托管的MP4文件中获取修改日期.

我尝试了以下库:

ffmpeg -i video.mp4
Run Code Online (Sandbox Code Playgroud)

没有运气.我得到的只是持续时间和其他一些领域,但我无法获得修改日期.我也尝试了ffprobe,它也不存在.

有什么建议??

非常感谢

aer*_*tal 12

获取creation_time具有ffprobe:

ffprobe -v quiet input.mp4 -print_format json -show_entries stream=index,codec_type:stream_tags=creation_time:format_tags=creation_time
Run Code Online (Sandbox Code Playgroud)

要查看所有标签:

ffprobe -v quiet input.mp4 -print_format json -show_entries stream_tags:format_tags
Run Code Online (Sandbox Code Playgroud)

我找不到任何参考,modification_time所以考虑使用exiftoolmediainfo.

  • 我没有在输出中得到 `creation_time`。 (2认同)

Wil*_*ill 7

就输出而言,一种比 aergistal 更简单的替代方案是

$ ffprobe -v quiet -select_streams v:0  -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 input.mp4
Run Code Online (Sandbox Code Playgroud)

这只会打印创建时间,如下所示:

2020-07-23T11:51:02.000000Z
Run Code Online (Sandbox Code Playgroud)


Ron*_*tje 4

我查了一下,确实,mp4在MDHD中有一个修改时间条目,但它没有导出(参见代码)。您可以提交增强请求以将此元数据功能添加到 FFmpeg,但现在它对您没有帮助,您将需要另一个工具来读取此字段。