Recently I found some older AVI files that had been recorded on my retired Canon S2 digital camera. The associated THM (thumbnail) file that has the date and time the movie was created had been deleted so I needed a way to extract the date and time directly from the AVI file. Again, I use the excellent EXIF Tool by Phil Harvey to accomplish this task. A little tweak on the command line for the code I used to rename my IOS MOV files and we're underway.
Exiftool Installation for Windows 7/8
- Download the excellent ExifTool by Phil Harvey here. Use the "Windows Executable" version.
- Extract the program and rename the exe from 'exiftool(-k).exe' to 'exiftool.exe'
- Move the 'exiftool.exe' program to C:\Windows
- Further installation instructions here
- Copy the code below to the clipboard (highlight and use CRTL +C) exiftool "-filename<${datetimeoriginal}" -ext AVI -d "%Y%m%d-%H%M%S.%%e" . (don't forget the space and fullstop at the end)
- Navigate to the folder where you have the movies stored. Don't enter the folder itself as you need to be selecting the folder in the next step
- Hold down the 'Shift' key and right click the folder containing the movies pegged for renaming
- Select 'Open command window here'
- Right click and choose paste to drop in the exiftool code
- Hit enter
- After a period of time (see below), the command window will give you a report of the scan process
- Your movies are now renamed using the date and time...cool.
Modifiers
How much stuff is in the folder dictates the time it takes to scan the
folder so try and keep the folder void of everything but the movies
that need renaming as the program will scan everything in the folder.
Creating corresponding thumbnails for XBMC
For those that are interested and that may be using XBMC too, after renaming the AVI files with the date and time the movie was taken, I then use FFMPEG to create thumbnails with a *.tbn extension 5 seconds into each clip.
For those that are interested and that may be using XBMC too, after renaming the AVI files with the date and time the movie was taken, I then use FFMPEG to create thumbnails with a *.tbn extension 5 seconds into each clip.
- Download ffmpeg and place it in your Windows\System32 folder
- Copy this code: for %i in (*.avi) do ffmpeg -i "%i" -f mjpeg -t 0.001 -ss 5 -y "%~ni.tbn" (the last speech marks are part of the code)
- As before, hold down shift and right click to open a command prompt in the right folder location
- Right click in the command window and paste the ffmpeg code copied above and hit Enter
Comments
Post a Comment