Sunday, February 17, 2008

Canon video conversion revisited

This is a follow up to my original post on converting videos from my Canon camera as, searching for something else, I came across this post by Omar Shahine on the same subject. As I was finding it very time-consuming to convert my videos one at a time with AutoGK (so they would play on the DMA 2100), and I ended up with something that was almost the same size and had the risk of not playing on the extender, I thought I would use a command-line script as he suggests:

cscript.exe "C:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -loadprofile "C:\Users\sbreck\Documents\Canon.prx" -input "s:\temp\Oscar.new" -output "C:\Users\sbreck\Videos\Oscar\"

(Refer to Omar's post for links to Windows Media Encoder, the script, and workable settings for Canon.prx.)

Unfortunately, launching cscript.exe wmcmd.vbs crashes "Microsoft ® Console Based Script host".

For the sake of expediency, I turned to Charlie Owen's entry that shows a graphical method to do the bulk of my conversions, using Omar's settings, and that got me through the bulk of my conversions. However, I do like the idea of having conversions without me ever having to worry about them again, and I like even better the idea of picking up a bit of scripting, so I returned to Omar's solution.

Fortunately, the cscript.exe crash is easy to resolve. Read this KB article, and quickly you will see that it is a Vista / WME9 problem. Then install the hotfix linked there.

Now, the process. I have, under the default Videos directory in my profile, a directory called Oscar, 'cause that's the name of my infant son who is the subject of all these videos. I further have subdirectories called iPod and Original, because I'd like the main subdirectory to contain WMV videos suitable for playing on the DMA 2100 Media Center Extender, and I have a packrat mentality when it comes to digital media which drives me to amass more and more hard drive space for things I deem irreplaceable, such as unconverted Canon videos in Motion JPEG format. Anyway, I'd like to move these videos off the camera into a holding directory, place the converted WMV version in the main Oscar share, and then move the original to the Original subdirectory. And then back them up since you can never have enough copies of your kid's videos (and because I share out the backup for Media Center viewing because the backup server is always up).

To do this, I made a batch file that contains this:
@echo off
S:
cd \temp\Oscar.new
if not exist *.avi goto nonew

echo converting movies...
cscript.exe "C:\Program Files\Windows Media Components\Encoder\wmcmd.vbs" -loadprofile "C:\Users\sbreck\Documents\Canon.prx" -input "s:\temp\Oscar.new" -output "C:\Users\sbreck\Videos\Oscar\"

echo moving originals to appropriate location...
move *.avi "C:\Users\sbreck\Videos\Oscar\!Original"

echo launching SyncToy to back everything up...
net use \\server\share /user:sbreck mypassword
if not exist \\server\share\some_file_that_exists goto done
"C:\Users\sbreck\AppData\Local\SyncToy\SyncToy.exe" -R"BackupVideos2"
goto done

:nonew
echo no new movies to convert
goto done

:done
pause
exit

and scheduled it to run every night at 4AM. My test runs were successful and so was a job I left in Oscar.new to test the scheduled task. So, now I just load the videos in there, and late that night they're converted and backed up automatically. Much slicker than any manual solution.

--sbreck

Since this is incidentally related to my Linksys DMA 2100 purchase, I will include it with the other postings:

DMA 2100 initial impressions

converting Canon camera videos and DVDs for use with the DMA 2100

Canon video conversion revisited (this post)

OTA HDTV and the DMA 2100

following up with Linksys DMA 2100 problems

Labels: ,


This page is powered by Blogger. Isn't yours?

eXTReMe Tracker