I’ve been getting a bit into the habit of taking camcorder footage of things that I go to now, editing them in iMovie’09, and then posting them on Facebook and YouTube.
However, I’ve had some issues trying to transfer video from an HD camera I’ve borrowed, the JVC Everio GZ-HD7U. It’s a handy camera with a large hard drive and a decently-long lasting battery, but it’s not very compatible with iMovie — if you connect it to a Mac and try to import the movies, it simply doesn’t let you import them directly.
I’ve tried a few things, mostly transcoding with ffmpegX, but every time I did so it resulted in really bad motion artifacts that band across my movie. Today, I finally discovered a good compromise and the solution is actually much easier than I would have thought.
The short answer:
ffmpeg -i infile.mpg -target ntsc-dv outfile.dv
The expanded answer is that even though the camera records internally as MPEG-TS, it’s in some kind of compressed format and needs to be transcoded. The way that I do this is:
- Plug the camera into my computer using the USB Cable.
- Turn on the camera.
- Using the camera’s options, select “Back up onto PC”. The camera will mount itself as a drive on the computer. The drive layout will probably vary based on what you’ve been recording, but in general it’s laid out with a bunch of directories named PRG000, PRG0001 and so on.
- Within these directories, copy all of the .TOD files onto your hard drive.
- Once the files are on your hard drive, export them to DV format using the ffmpeg command:
ffmpeg -i infile.mpg -target ntsc-dv outfile.dv
I use the following shell script to do this.
#!/bin/sh suffix=.TOD files=`find . -name "*.TOD"` for movie in $files; do infile=`basename $movie` outfile=`basename -s $suffix $infile`.dv ffmpeg -i $infile -target ntsc-dv $outfile done
If you don’t have ffmpeg installed on your Mac, you can do it with MacPorts (type sudo port install ffmpeg
and ports should do the rest*).
I hope this helps some of you!
NOTE:
Using this method converts stuff into standard NTSC resolution (apparently, I don’t know enough about video transcoding). Now, the “original” movies are filmed at 1920×1080 (HD 1080) resolution, but if I copy the TOD files onto my computer and play them, I get nice funny artifacts. This leads me to suspect that the camcorder’s compression kind of plays tricks on playback or something – makes it seem like they’re HD1080 when the files are in fact not even close to that. So the issue of course is that when you use the DV output format with ffmpeg, you end up scaling your movies down to 720×480. The odd thing for me is that the movies are still widescreen. I don’t know how this works or if some programs are fooled and all I truly do know is that the movies look better. But, this leads me to believe that if you buy a camcorder that says “full HD” it might actually not be full HD even if it claims that it can film in 1920×1080 resolution.
Just my two cents, if anyone can help fill me in on video formats please let me know.
* I did have a problem with installing from ports, and it was due to an outdated gettext Perl module. What I ended up needing to do was to delete all of my ports and recompile. I am suspecting the issue was because I installed all of my ports on Leopard, and upgrading to Snow Leopard without recompiling all of the ports caused problems.