How can I get the original capture timestamp from my home movie files:: AVI and MPG4?

前端 未结 5 1394
时光取名叫无心
时光取名叫无心 2021-02-09 05:06

I have over a TB of home movies with horrible file names. Finding what you want is impossible. I would like to rename all files to the time they were originally recorded (not t

相关标签:
5条回答
  • 2021-02-09 05:13

    There's a good chance you're out of luck unless the original capture used absolute timestamps. In my experience, most capture applications use time 0 for the first frame, not a universal time. To check this out, get GraphStudio, load the file in it, then look at the start time in the properties for the first output pin.

    You might look at using GSpot to see if the metadata you're looking for is even present in the files. For your AVI files, you might also look into VirtualDub's RIFF features in its hex editor. Unless your capture application was nice to you, that data was probably never recorded.

    Assuming that the original timestamps are available somehow, I'd suggest looking at the source of whichever application helped you find it.

    For my videos, I've taken to grabbing the metadata at capture time, storing it in an XML file and having my transcoding / post-processing apps keep the last modified timestamp fixed as the original timestamps.

    0 讨论(0)
  • 2021-02-09 05:21

    You should have a look at exiftool. It's an non-GUI utility that allow you to access such information in many media files metadata

    http://www.sno.phy.queensu.ca/~phil/exiftool/#supported

    You can probably extract exiftool output to make a nice GUI to rename in any language you want. I have my own python script for that.

    0 讨论(0)
  • 2021-02-09 05:26

    Here is a bit of code that i found a while back that should get you started.

    http://www.developerfusion.com/code/3435/a-convenient-wrapper-class-to-get-file-info/

    0 讨论(0)
  • 2021-02-09 05:26

    I can’t talk about DVD, but the Digital Video (DV) codec does indeed store time and date (as set in the camera) on each single frame!

    For Linux, programs like dvgrab handle those timestamps, for Windows I believe a tool named dvdate.exe does.

    DV video can be stored in AVI containers (.avi), raw (.dv or .dif) and QuickTime (.mov). But not all AVIs are DV. 60min of DV video is about 13GB. – If your files are smaller, they are probably already converted to other codecs and the timestamps are lost.

    0 讨论(0)
  • 2021-02-09 05:28

    Here is a hacky howto based on mplayer that works at least for the MOV files produced by my camera:

    mplayer -vo null -ao null -frames 0 -identify myfile.MOV 2>/dev/null|grep creation_time:
    

    I use it to batch-rename them:

    for m in MVI*.MOV; do
        t=$(mplayer -vo null -ao null -frames 0 -identify $m 2>/dev/null|grep creation_time:|sed 's/.*creation_time: *//;s/[-:]//g;s/ /-/')
        mv ${m} ${t}_${m}
    done
    
    0 讨论(0)
提交回复
热议问题