如何找到实际录制视频(.AVI .MP4)的日期?

use*_*552 24 video metadata

properties> date created... i thought this meant the date the video was created, but finally realized that date changes every time i move, reorganize, even open a file. often, the date modified is earlier than date created. the date a jpeg was taken is readily available. is there any way to get the same information from an AVI or MP4 FILE? thank you for any information you can give.

Isa*_*avo 6

似乎没有明确定义的视频元数据标准(与分别具有EXIF和ID3 /等的照片和音频文件相比)

某些标签存在,例如Title,Composer等.如果您在Windows 7(也许是早期版本)资源管理器中选择电影文件或右键单击并查看属性,则可以看到这些标签.我遗憾地找不到录制日期的标签 - 最接近的是Year(整数):-(

以编程方式,您可以使用Taglib Sharp从单声道项目中读取和编写.NET中的大多数标签.banshee FTP服务器上提供了源和二进制文件.它有一个非常令人印象深刻的格式列表它支持(但仍然,确保你在尝试读取或写入标记时捕获异常 - 它会在找到一个它无法理解的文件时抛出,这对我来说几次发生在我的适度集合中家庭录音.)

要阅读标签:

using (var f = TagLib.File.Create(@"c:\Path\To\MyVideo.mp4"))
{
    if (f.Tag != null)
    {
        string title = f.Tag.Title;
        Size resolution = new Size(f.Properties.VideoWidth, f.Properties.VideoHeight);
        int year = f.Tag.Year;
        // etc.
    }
}
Run Code Online (Sandbox Code Playgroud)

同样,要将元数据写回文件:

using (var f = TagLib.File.Create(@"c:\Path\To\MyVideo.mp4"))
{
    f.Tag.Title = "My Awesome Movie";
    f.Tag.Year = (uint)2011;
    f.Save();
}
Run Code Online (Sandbox Code Playgroud)


Chr*_*iki 5

在许多视频文件中查找日期/时间元数据的快速命令

以下命令在查找各种AVI / MP4视频上的日期/时间元数据方面非常有用:

ffmpeg -i /path/to/video.mp4 -dump
Run Code Online (Sandbox Code Playgroud)

注意:如其他答案所述,不能保证此类信息在所有视频文件中均可用或以特定格式提供。

某些AVI文件的简短样本输出

    Metadata:
      Make            : FUJIFILM
      Model           : FinePix AX655
      DateTime        : 2014:08:25 05:19:45
      JPEGInterchangeFormat:     658
      JPEGInterchangeFormatLength:    1521
      Copyright       :     
      DateTimeOriginal: 2014:08:25 05:19:45
      DateTimeDigitized: 2014:08:25 05:19:45
Run Code Online (Sandbox Code Playgroud)

某些MP4文件的缩写样本输出

  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2018-03-13T15:43:24.000000Z
Run Code Online (Sandbox Code Playgroud)

  • 谢谢!就我而言,这只是证明我得到的 MP4 完全没有元数据。 (2认同)

Dav*_*vid 1

该元数据的存在完全取决于写入该文件的应用程序。加载带有文件元数据(EXIF 标签)的 JPG 文件很常见,例如时间戳或相机信息或地理位置。MP3 文件中的 ID3 标签也很常见。但在视频文件中看到这种元数据的情况要少得多。

如果您只需要一个工具来手动从文件中读取这些数据,GSpot 可能可以解决问题: http: //www.videohelp.com/tools/Gspot

如果您想在代码中阅读此内容,那么我想每种容器格式都会有自己的标准,并且每个标准都需要一些研究和实现来支持。