How to: Automate your PC's media library

Use your PC to automate a few time-consuming tasks that will make video, photo, and music collections much easier to manage

Using your PC to store your photos, videos, and music might save you the trouble of having to dust off photo albums and alphabetize your CD collection, but it can still be a pain to keep your media converted, stored, tagged, and uploaded.

Here's how to automatically download, convert, and sync your video files, dump your photos to Flickr, and take the pain out of tagging your music library.

Automatically Convert Your Videos (and Sync)

Built-in Webcams, phone cameras, pocket camcorders, HD video on point-and-shoot cameras--you can take a video with pretty much any gadget lying within arm's reach. However, depending on what you plan on doing with those videos, you'll need to convert them into different formats, which can be a fairly time-consuming task for your PC.

If you just need to convert a folder of videos into a certain format (to play on your iPod Touch, for example), Videora iPod Converter can do this basic task. Select the setting recommended for your device, play around with the quality sliders as you see fit, and click the One-Click Convert button at the bottom-right of the screen to bring up a dialog box that will let you drag to select as many files as you want.

Unfortunately, some of Videora Converter's more advanced features don't work well. While it's possible to tell Videora to watch a certain directory for new files, automatically convert them, and add them to iTunes, I couldn't get the directory-watching to work at all, and the iTunes-adding seemed to work infrequently.

I wanted my PC to find the new videos, convert them, and sync them to my iPod Touch without requiring me to do anything, which meant I needed to switch tools. Instead of Videora, I opted to use Handbrake, another popular video conversion app.

Handbrake doesn't make it easy to set up an automatic batch conversion from the graphical user interface (you have to manually add each item), but it does include a separate command-line app that we can work with.

Dust off your DOS skills, ladies and gentlemen--we're going to write a quick batch file (.bat) that will tell our PC to take all the files in the immediate folder (or any nested folders), pass them off to Handbrake to convert into an iPod-friendly format, name them ("filename-ipod.mp4"), and then hand them off to iTunes, which will add them to the iTunes library and sync with my attached iPod.

Automatically Convert Your Videos, Continued

An app called Alert and Convert that works with Handbrake tries to do the same thing as the batch file described here, but I wasn't able to get it to work 100 percent of the time.

So we've posted a batch-file template in the PCWorld Downloads library, called Automatic Batch Video Conversion. Note that batch files can do lots of things to your PC, and if you're not careful you might be converting a lot of videos.

Right-click on the convertvideotemplate.bat file and select Edit to open it up in Notepad. You should see this:

@for /r %%F in (*.[filetype], *.[filetype]) do ( "[location of handbrake CLI]" -i "%%F" -o "%%~pnF-ipod.mp4" --preset="iPhone & iPod Touch" move /-y "%%F" "[location of processed videos dir]") @for /r %%X in (*ipod.mp4) do (move /-y "%%X" "[location of Automatically Add To iTunes folder]") start "" "[Location of iTunes app]" pause

In order to adapt this batch file to work on your PC, you're going to need to fill out each of the bracketed expressions with your own information: For [filetype], put the three-letter suffix of the kinds of files you want Handbrake to process. If I put in (*.mp4, *.flv, *.3gp, *.avi), that means Handbrake will look for all MPEG-4, Flash Layer Video, 3GP, and AVI files.

For [Location of Handbrake CLI], you'll need the path to the Handbrake CLI app. It's typically in the same folder as the Handbrake GUI app, so just right-click on the Handbrake icon in your Start Menu and copy the location. You should end up with something like "C:\Program Files\Handbrake\HandBrakeCLI.exe".

If you're converting your video to something other than an iPod Touch/iPhone format, you'll want to replace the --preset="iPhone & iPod Touch" with a different set of encoding instructions. Here's a list of Handbrake's different preset encodes.

We want to put the original files somewhere else once they're done being processed, or else this script will convert them again on the next go-round. I made a folder on my desktop called "Processed Videos" and pasted that into the [location of processed videos dir] section.

iTunes 9 and later has a folder called Automatically Add To iTunes; we'll use this folder to add our new movies to the iTunes Library. You can find it by going into your User folder and selecting Music, iTunes, iTunes Media, Automatically Add To iTunes. Copy this file path into the [location of Automatically Add To iTunes folder].

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags media centre pcshome entertainmentwindows media centre

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Patrick Miller

PC World (US online)
Show Comments

Cool Tech

Toys for Boys

Family Friendly

Stocking Stuffer

SmartLens - Clip on Phone Camera Lens Set of 3

Learn more >

Christmas Gift Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Aysha Strobbe

Microsoft Office 365/HP Spectre x360

Microsoft Office continues to make a student’s life that little bit easier by offering reliable, easy to use, time-saving functionality, while continuing to develop new features that further enhance what is already a formidable collection of applications

Michael Hargreaves

Microsoft Office 365/Dell XPS 15 2-in-1

I’d recommend a Dell XPS 15 2-in-1 and the new Windows 10 to anyone who needs to get serious work done (before you kick back on your couch with your favourite Netflix show.)

Maryellen Rose George

Brother PT-P750W

It’s useful for office tasks as well as pragmatic labelling of equipment and storage – just don’t get too excited and label everything in sight!

Cathy Giles

Brother MFC-L8900CDW

The Brother MFC-L8900CDW is an absolute stand out. I struggle to fault it.

Luke Hill

MSI GT75 TITAN

I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?