Keep the Original Timestamp when converting .MOD files
I’ve helped many people with my guide on how to convert .MOD files and my other Canon FS100 related posts, however there can be a problem when you convert the files after you’ve shot the video. It will alter the timestamp to when you converted it and isn’t really useful if you are trying to keep everything in order. So a member of our community xxfunkxx to the rescue! Here is his guide to keeping the original timestamp and it is very useful. Thanks to him and if anyone else has any information for future posts don’t be afraid to email me at daz@daz4590.co.uk
To convert the .mod video files recorded with the Canon FS100 into quicktime movies I use Mpegstreamclip on my Mac. I found it very useful for my archive to have the original date and time information of the recorded .mod files in my .mov files. In my case a small bash script does this for me. Before running the script I assume that the .mod and .mov files are in the same directory! Like this:
Unzip and copy it into the same directories where the video files are located (e.g. on the Desktop with a subfolder video). First we need to make the script executable and then run it. Open the terminal (located under Applications/Utilities). After the prompt we type these 3 lines:
$ cd Desktop/video
$ chmod +x keep_original_timestamp.sh
$ ./keep_original_timestamp.sh
So that’s it. Now the Quicktime movies should have the same timestamp as the mod files. The bash script that does our work looks like this:
#!/bin/bash
# keep original time stamp from Canon FS 100 .MOD files
ext_MOD=”.MOD”
ext_MOV=”.mov”for i in *.mov; do
x=($i)
echo $x
filename=${x/%.mov/}
filename_extMOD=”$filename$ext_MOD”
filename_extMOV=”$filename$ext_MOV
echo “filename_extMOV” $filename_extMOV
fileinfo=$(/usr/bin/getinfo $filename_extMOD)
array=($fileinfo)
original_timestamp=”${array[9]:6:4}${array[9]:0:2}${array[9]:3:2} \
${array[10]:0:2}${array[10]:3:2}”.”${array[10]:6:2}”
echo “original_timestamp” $original_timestamp
# has to be CCYYMMDDhhmm[.SS]
touch -t $original_timestamp $filename_extMOV
done
exit 0
If you have any trouble please contact me: xxfunkxx@web.de













©
[...] more from the original source: internet advertising Keep the Original Timestamp when converting .MOD files » daz4590 … internet [...]
Rather interesting. Has few times re-read for this purpose to remember. Thanks for interesting article. Waiting for trackback