我可以从AVI文件的哪个位置提取记录的日期? [英] From where in an AVI file can I extract the recorded date?

查看:90
本文介绍了我可以从AVI文件的哪个位置提取记录的日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从某些AVI文件(在这种情况下,是使用Sony DV便携式摄像机创建的)中提取录制的日期.

I am trying to extract the recorded date from some AVI files (in this particular case created with a Sony DV camcorder).

在不了解格式的情况下,我可以使用以下引用来理解文件中主要块中的元数据:

Starting with no knowledge on the format, I have been able to make sense of the metadata in the main chunks in the file using this reference: https://msdn.microsoft.com/en-us/library/windows/desktop/dd318189(v=vs.85).aspx

我进行了很多搜索以查找日期存储在哪里,但是没有任何运气.我最接近的是来自MediaInfo论坛的以下答案,但是我没有足够的道理来解决问题:

I been searching a lot to find out where the date is stored, but without any luck. The closest that I came was the following answer from the MediaInfo forum, but I didn't manage to make enough sense out of it to solve the problem: https://sourceforge.net/p/mediainfo/discussion/297610/thread/8bb6e526/

我知道录制的日期在文件元数据中的某个位置,因为Sony的PlayMemories能够显示它,而MediaInfo也是如此.

I know that the recorded date is in the file metadata somewhere, because Sony's PlayMemories is able to display it, and the same is MediaInfo.

我需要找出的是有关记录日期如何存储在文件中的详细信息:

What I need to find out is the details on how the recorded date is stored in the file:

  1. 其中哪个区块
  2. 偏移量
  3. 什么格式

对此将提供任何帮助,我们将不胜感激. :)

Any help on this would be highly appreciated. :)

我已经提取了要测试的文件中的块的列表(请参见下面的清单),但是我不确定日期存储在哪个块中.

I have extracted a list of the chunks in the file that I am testing on (see below listing), but I am not sure what chunk the date is stored in.

<RIFF - AVI  - size="11969600" offset="0">
  <LIST - hdrl - size="33330" offset="12">
    <avih size="56" offset="24"></avih>
    <LIST - strl - size="16500" offset="88">
      <strh size="56" offset="100"></strh>
      <strf size="40" offset="164"></strf>
      <indx size="16376" offset="212"></indx>
    </LIST>
    <LIST - strl - size="16478" offset="16596">
      <strh size="56" offset="16608"></strh>
      <strf size="18" offset="16672"></strf>
      <indx size="16376" offset="16698"></indx>
    </LIST>
    <LIST - odml - size="260" offset="33082">
      <dmlh size="248" offset="33094"></dmlh>
    </LIST>
  </LIST>
  <JUNK size="1446" offset="33350"></JUNK>
  <LIST - movi - size="11932228" offset="34804">
    <00db size="144000" offset="34816"></00db>
    <01wb size="5120" offset="178824"></01wb>
    ...            
    <00db size="144000" offset="11816560"></00db>
    <01wb size="5120" offset="11960568"></01wb>
    <ix00 size="664" offset="11965696"></ix00>
    <ix01 size="664" offset="11966368"></ix01>
  </LIST>
  <idx1 size="2560" offset="11967040"></idx1>
</RIFF>

启发式方法?

我还一直在思考,因为我知道要测试的文件的日期,所以也许我可以以某种方式在二进制文件中搜索它,以这种方式定位字节位置. 但是,那么我首先需要知道(或猜测)日期存储在哪种二进制格式中.对于我正在测试的文件,该日期在以下日期中报告为"2007-08-12 12:30:27.000" MediaInfo(与PlayMemories中一样). 关于如何在二进制文件中搜索日期的任何建议也将不胜感激.

Heuristic approach?

I have also been thinking that since I know the date for the file I am testing on, then maybe I somehow could be able to search for it in the binary file to locate the byte location(s) that way. However, then I would first need to know (or guess) what kind of binary format the date is stored in. For the file I am testing on, the date is reported as "2007-08-12 12:30:27.000" in MediaInfo (as in PlayMemories). Any suggestions on how to search for the date in the binary file would also be appreciated.

通过检查,我发现日期未存储在JUNK块中,因为该日期完全空白(全零).

I have found out by examination that the date is not stored in the JUNK chunk, as that is completely blank (all zeros).

我也曾尝试以各种方式(使用HxD十六进制编辑器)在二进制文件中搜索日期,但是没有运气:

I have also tried to search for the date in the binary file in various ways (using the HxD hex editor), but with no luck:

  • 搜索"2007"作为整数-不应在movi块中出现一次-不应为它(修改后无效)
  • 搜索"2007"作为浮点数-没有出现
  • 以ascii字符串搜索"2007"-没有出现
  • 搜索"2007"为十六进制字符串-不应在movi块中出现一次-不应这样(修改后无效)
  • 搜索日期("2007-08-12 12:30:27.000")作为unix时间戳("1186921827")作为整数和浮点数-没有发生

我知道它不在此块中:JUNK

I know it is not in this chunk: JUNK

我不希望它出现在以下任何块中:hdrl,avih,strl,strh,strf

I don't expect it to be in any of these chunks: hdrl, avih, strl, strh, strf

如果是这样,则应位于以下之一:indx,odml,dmlh,(电影,idx1)

If so, then it should be in one of these: indx, odml, dmlh, (movi, idx1)

我基本上无法确定日期的存储方式和位置,因此我的问题仍然没有解决...

I have basically not been able to find out how and where the date is stored, so my problem remains unsolved...

我的二进制搜索没有结果的事实让我有些困惑...

The fact that my binary searches gave no results has left me a bit puzzled...

任何帮助将不胜感激. :)

Any help would be highly appreciated. :)

推荐答案

在Linux下,您可以尝试avprobe,它是libav的一部分( https://libav.org/download/).在此处查看creation_time:

Under Linux you could try avprobe which is part of libav (https://libav.org/download/). Look there at creation_time:

avprobe capture.mp4
avprobe version 9.18-6:9.18-0ubuntu0.14.04.1+fdkaac, Copyright (c) 2007-2014 the Libav developers
  built on Apr 10 2015 23:22:24 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'capture.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isom
    creation_time   : 2016-03-24 12:31:18
  Duration: 01:22:33.57, start: 0.000000, bitrate: 1957 kb/s
    Stream #0.0(eng): Video: h264 (Main), yuv420p, 960x540 [PAR 1:1 DAR 16:9], 1764 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
    Metadata:
      creation_time   : 2016-03-24 12:31:18
    Stream #0.1(deu): Audio: aac, 48000 Hz, stereo, fltp, 189 kb/s
    Metadata:
      creation_time   : 2016-03-24 12:31:18
# avprobe output

这篇关于我可以从AVI文件的哪个位置提取记录的日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆