JCooney.NET

Joseph Cooney's Weblog

My Links

Blog Stats

News

I work for:


see also:
Dominic Cooney
Patrick Cooney

Archives

Image Galleries

My GotDotNet Samples

Bulk Re-Encoding Home Videos with Handbrake and Iron Python

Recently Scott Hansellman posted an entry describing his IJW experience recording videos from his digital camcorder to his Windows 7 PC using some of the Windows Live applications. Spurred on by his example I extracted a few hours of footage from some digital tapes I'd been meaning to back up for ages, also with great success. Except that the resulting videos were bloated AVIs. Using Handbrake and Iron Python I was able to cook up the following script to bulk-encode a directory of videos. I expect you could do something similar with the command-line version of Expression Encoder too.

import System
from System import *
from System.IO import *
from System.Diagnostics import *

for s in DirectoryInfo("D:\\path\\to-your\\family\\videos\\").GetFiles("*.avi"): 
    arg = String.Format('-i "{0}" -t 1 -c 1 -o "{1}" -f mp4 -w 720 --loose-anamorphic  --detelecine --decomb -e x264 -q 20 -a 1,1 -E faac,ac3 -6 dpl2,auto -R 48,Auto -B 160,auto -D 0.0,0.0 -x b-adapt=2:rc-lookahead=50 -v 1', s.FullName, "D:\\output\\location\\forvideos\\" + s.Name.Replace(".avi", ".mp4"))
    print arg
    proc = Process.Start("C:\\Program Files (x86)\\Handbrake\\HandBrakeCLI.exe", arg) #path to handbrake goes here
    proc.WaitForExit()

posted on Thursday, January 21, 2010 5:23 AM

Feedback

# re: Bulk Re-Encoding Home Videos with Handbrake and Iron Python 2/1/2010 6:42 PM EAS label

thanks 4 sharing this

# re: Bulk Re-Encoding Home Videos with Handbrake and Iron Python 2/24/2010 6:51 PM nike outlet

Yooo great job with this post! LOL it did something for me.
http://www.cheap-uggs-outlet.com/ uggs outlet
http://www.emu-boots.net/ emu boots
http://www.cheap-ugg.net cheap uggs
http://www.nike-star-shoes.net nike outlet

Title  
Name  
Url
Security Word (prevent comment spam)
Protected by FormShield
Comments