Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 the file time they were placed on my computer). Some applications (like Ulead Video Studio) can access this information, which I believe is embedded in the CODEC.

I would LOVE to find how how either I can write a .Net app to extract this information to rename my files so I can easily organize them OR find an application that will do this for me. Thank you very much in advanced.

additional information:: home movies were captured on miniDV and DVD camcorders.

like image 969
dustinson Avatar asked Oct 17 '08 17:10

dustinson


2 Answers

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
like image 101
PhilT Avatar answered Sep 26 '22 04:09

PhilT


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/

like image 42
Mayowa Avatar answered Sep 24 '22 04:09

Mayowa