Friday, May 25, 2007

Using a Sony Handycam HDD with a Mac

So our new teeny little hard-disk camcorder arrived today. It's soooo cute. Adorable.

It's a Sony DCR-SR82, 60 gig machine. And it comes with some software for PC that I haven't started to play with yet ..... my Macbook Pro is my creative machine ..... it plays my music; it's the machine I run Adobe Creative Suite on; and the iLife suite is really the coolest thing ever to be included standard on a new computer.

Alas, iMovie and QuickTime don't play very well with camcorders that record in mpeg-2. This includes all the Sony HDD's (DCR-SR80, DCR-SR40, DCR-SR42, etc). A quick Google search produced several pages where people suggest (a) upgrading to QuickTime Pro ($30), (b) buying Apple's mpeg-2 Playback Component for QuickTime (another $20), and (c) using MPEG Streamclip to transcode files into mpeg-4 to import into iMovie or play with QuickTime. The $70 alternative is to use whatever software Sony recommends.

It's easier than that, and you can do it for free. You just have to be comfortable running a script in your Terminal.

Here goes.

1. Download and install VLC: http://www.videolan.org/vlc/

This player plays everything. And it transcodes everything. And it runs on every platform you might ever care about.

2. You can grab files straight off the camcorder by plugging it in via USB, mounting it as a n external drive, and looking in MP_ROOT/101PNV01 (at least that's where mine is). Just drag the *.MPG files onto your desktop. You'll be happy to see the VLC plays them!

3. Here's the tricky part. Use VLC to transcode into mpeg-4. If you shot your video at 4:3 standard aspect ratio, you can use the nifty "Streaming/Transcoding Wizard" from the File menu. Choose "transcode/save to file", and on the "Transcode File" page, choose:

- Transcode video
codec: MPEG-4 Video
bitrate: 1024
- Transcode audio
coded: MPEG Audio
bitrate: 192

...and there ya go. The output file can be imported into iMovie for all your editing pleasure.

3(b). I had trouble shooting at 16:9. My aspect-ratio was lost during the transcode step. The easiest way I found around this is to transcode on the command line, where you can set aspect-ratio correctly. The script I use runs like this:


/Applications/VLC.app/Contents/MacOS/VLC -I dummy M2U00001.MPG --sout #transcode{cropleft=30,cropright=30,croptop=17,cropbottom=17,width=800,height=448,deinterlace=enable,vcodec=h264,vb=1024,acodec=mp4a,ab=128}:standard{mux=mp4,dst="out1.mp4",access=file} vlc:quit


Instead of remembering all that, I started with a very nice .bash script I found on this VLC help page:
http://wiki.videolan.org/Transcode

Seriously, that script does it perfectly. I made sure to set my default to src="NTSC", and everything else ran peachy. Just copy the script into a file in your home directory, chmod it to 777, open a Terminal window, and run it against your .MPG files.

Hope this saves someone a little bit of time. Like me, next time I want to do this and forgot what I did.

Cheerio...
-j

4 comments:

Mike said...

I am confused on what to do with the converter after the step you mentioned. Do I select MPEG 4/MP4 for capsulation and do I save the file as local?
Thanks for your help.

oliver said...

Hi - I could d with a solution to Mike's question too...

Thanks.

hikingviking said...

Just save the script at http://wiki.videolan.org/Transcode and change the src to NTSC (if you're in the US).

Run it from the command line. It takes two arguments. The source .MPG and the output filename. It gets saved locally.

hth...

Tristón said...

But then the quality is lowered...
And 10Kbps is not enough for a good quality video.