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

前端 未结 5 1392
时光取名叫无心
时光取名叫无心 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: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
    

提交回复
热议问题