Stabilize Shaky Video from your GoPro Hero2 Helmet Cam
Posted: Thu Nov 08, 2012 10:01 pm
Are you tired of taking cool videos while surfing along only to find out later it's so bouncy and jerky you get a headache and your eyes keep bobbing for 5 minutes afterward? If so, this post is for you so grab a case of beer and let's go!
It'll end up looking like <a href="/http://www.youtube.com/watch?v=T4dXEIZSDpk" target="_blank">this</a> (yeah!) rather than <a href="/http://www.youtube.com/watch?v=DcjWpJyOzKY" target="_blank">this</a> (booo).
The instructions below are for the <a href="/http://gopro.com/hd-hero2-cameras/" target="_blank">GoPro Hero2</a> but it will work for any video source. This is a bit convoluted but it works very, very, well and is free. You'll need a Windows PC and a bottle opener.
1. Save your video file to the hard drive. Your longest GoPro Hero 2 video will be about 3.2 GB and 34:35 minutes. You'll need about 350GB free during the editing process. Make sure the video processing is all your machine will be doing (i.e. no games or web browsing) as I've found it can do weird things.
2. Get your software (and your first beer):
a. <a href="/http://www.pazera-software.com/products ... converter/" target="_blank">Download Pazera MP4 to AVI video converter.</a> The link "zip archive" is on the very top right, don't be fooled by the other "ad spam" buttons.
b. <a href="/http://www.virtualdub.org/download.html" target="_blank">Download VirtualDub 1.9.11 32-bit video batch processing editor.</a>
c. <a href="/http://www.guthspot.se/video/deshaker.htm" target="_blank">Download Deshaker 3.0 for VirtualDub.</a>
3. Unzip them according to the directions. Pazera and VirtualDub will be in different directories and Deshaker you'll copy to the plugins directory in VirtualDub.
4. Open Pazera and convert your video file from MP4 to MPEG1 (2-pass), use the MPG tab on the bottom left. Why? Virtual Dub only imports MPEG1 or AVI (not WMV). Don't worry, the quality will be high. It'll take a while too - maybe 10 frames a second or 30 if you have an overclocked I7 processor. So get a second beer.
5. Open Virtual Dub and follow <a href="/http://www.guthspot.se/video/deshaker.htm" target="_blank">these instructions</a> on the MPEG1 video you just created. This will take a while too, just like above so get beer number three.
If you only want to do one part of your video, the bottom 2 RHS controls will let you set the in and out points.
For pass #1 ("run video analysis pass") the GoPro Hero2 is a 'rolling shutter' and with the 170 degree lens the 'amount' is 83. There are other adjustments available in the FAQ. I recommend nothing else for pass #1. The file size may balloon 100x so a 3GB file becomes 300GB. This can take a while so get a fourth beer.
For pass #2 ("save the video" as it applies the adjustments) you can leave defaults except you will need to:
a. Check the "use previous and future frames to fill in borders"
b. Check the "soft borders edge transition"
c. Check the "extrapolate colors into border"
Why? Because there will be areas of no information as VirtualDub rotates and pans the frames to keep the scene stable. These fill in sky and water (top and bottom) pretty well, otherwise you'd be left with black. You'll need a fifth beer here.
Save your file - It will be huge so choose the right hard-drive. Now you will be left with a very, very, large AVI file. If you try and play it it will be very slow as it is so big. Frankly you can't play it.
6. Last step is to get a sixth beer and then reshrink your latest video by converting it back to MP4 like you started with. So yes, the size will decrease by 100x.
Close Pazera. Open it again (otherwise it doesn't seem to clear properly) Add your new AVI file. Now you are going to convert it to AVI with the H.264/MPEG-4 AVC video codec (2-pass). This is MP4 although it will come out with a AVI extension.
In Pazera on the bottom right you can crop the sides in the final video. I do 96 pixels on the top and bottom and 56 on each side. The reason is that it gets rid of a bit of sky and water but importantly most of the artifacts from the deshaking edge back-fill. Note that if you do this and upload it to YouTube the highest resolution is going to be 720p, if you leave it as is it will be 1080p.
It will rename itself by adding a _001 to the other AVI file name (the one that was created in the Step 4 MPEG-1 file).
7. That's it. Your file will be deshaked and would actually be watchable if you weren't so hammered. Crack open another to celebrate!
There are many things you can do including cropping and focusing the stabilization on one area of the camera frame but I won't waste your time while you're drinking.
8. Post here if you need help from me - we need more cool videos.
It'll end up looking like <a href="/http://www.youtube.com/watch?v=T4dXEIZSDpk" target="_blank">this</a> (yeah!) rather than <a href="/http://www.youtube.com/watch?v=DcjWpJyOzKY" target="_blank">this</a> (booo).
The instructions below are for the <a href="/http://gopro.com/hd-hero2-cameras/" target="_blank">GoPro Hero2</a> but it will work for any video source. This is a bit convoluted but it works very, very, well and is free. You'll need a Windows PC and a bottle opener.
1. Save your video file to the hard drive. Your longest GoPro Hero 2 video will be about 3.2 GB and 34:35 minutes. You'll need about 350GB free during the editing process. Make sure the video processing is all your machine will be doing (i.e. no games or web browsing) as I've found it can do weird things.
2. Get your software (and your first beer):
a. <a href="/http://www.pazera-software.com/products ... converter/" target="_blank">Download Pazera MP4 to AVI video converter.</a> The link "zip archive" is on the very top right, don't be fooled by the other "ad spam" buttons.
b. <a href="/http://www.virtualdub.org/download.html" target="_blank">Download VirtualDub 1.9.11 32-bit video batch processing editor.</a>
c. <a href="/http://www.guthspot.se/video/deshaker.htm" target="_blank">Download Deshaker 3.0 for VirtualDub.</a>
3. Unzip them according to the directions. Pazera and VirtualDub will be in different directories and Deshaker you'll copy to the plugins directory in VirtualDub.
4. Open Pazera and convert your video file from MP4 to MPEG1 (2-pass), use the MPG tab on the bottom left. Why? Virtual Dub only imports MPEG1 or AVI (not WMV). Don't worry, the quality will be high. It'll take a while too - maybe 10 frames a second or 30 if you have an overclocked I7 processor. So get a second beer.
5. Open Virtual Dub and follow <a href="/http://www.guthspot.se/video/deshaker.htm" target="_blank">these instructions</a> on the MPEG1 video you just created. This will take a while too, just like above so get beer number three.
If you only want to do one part of your video, the bottom 2 RHS controls will let you set the in and out points.
For pass #1 ("run video analysis pass") the GoPro Hero2 is a 'rolling shutter' and with the 170 degree lens the 'amount' is 83. There are other adjustments available in the FAQ. I recommend nothing else for pass #1. The file size may balloon 100x so a 3GB file becomes 300GB. This can take a while so get a fourth beer.
For pass #2 ("save the video" as it applies the adjustments) you can leave defaults except you will need to:
a. Check the "use previous and future frames to fill in borders"
b. Check the "soft borders edge transition"
c. Check the "extrapolate colors into border"
Why? Because there will be areas of no information as VirtualDub rotates and pans the frames to keep the scene stable. These fill in sky and water (top and bottom) pretty well, otherwise you'd be left with black. You'll need a fifth beer here.
Save your file - It will be huge so choose the right hard-drive. Now you will be left with a very, very, large AVI file. If you try and play it it will be very slow as it is so big. Frankly you can't play it.
6. Last step is to get a sixth beer and then reshrink your latest video by converting it back to MP4 like you started with. So yes, the size will decrease by 100x.
Close Pazera. Open it again (otherwise it doesn't seem to clear properly) Add your new AVI file. Now you are going to convert it to AVI with the H.264/MPEG-4 AVC video codec (2-pass). This is MP4 although it will come out with a AVI extension.
In Pazera on the bottom right you can crop the sides in the final video. I do 96 pixels on the top and bottom and 56 on each side. The reason is that it gets rid of a bit of sky and water but importantly most of the artifacts from the deshaking edge back-fill. Note that if you do this and upload it to YouTube the highest resolution is going to be 720p, if you leave it as is it will be 1080p.
It will rename itself by adding a _001 to the other AVI file name (the one that was created in the Step 4 MPEG-1 file).
7. That's it. Your file will be deshaked and would actually be watchable if you weren't so hammered. Crack open another to celebrate!
There are many things you can do including cropping and focusing the stabilization on one area of the camera frame but I won't waste your time while you're drinking.
8. Post here if you need help from me - we need more cool videos.