Stabilize Shaky Video from your GoPro Hero2 Helmet Cam
Stabilize Shaky Video from your GoPro Hero2 Helmet Cam
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.
Last edited by Snarfer on Mon Aug 19, 2013 1:28 pm, edited 16 times in total.
- dangerdane
- Posts: 50
- Joined: Tue Mar 24, 2009 9:34 am
Mac Users
Great post! Anyone out there know how to do the same on a Mac with FCPX? I think FCPX has stabilization but I'm still new to the program.
My only comment is that there is "stabilization" and there is "s t aB i l iZA tI o N ". Every other solution I've tried hasn't been industrial strength like this. In fact, if you look closely, you'll see the expensive "commercial" solutions have exactly the same features as deshaker. Guess now we know who ripped off the open source software. I work on a Mac and was never able to find anything that really worked.
FOG in your camera! Yikes. Any temperature difference between the case and the camera inside is going to cause fog.
The best way I have found to get rid of it is to get some bags of desiccant and pop them in a small plastic bag. Pop your camera into the bag, inside its case, ensuring the case is open. Seal the bag. Leave over night so the air gets really dried out. Before you open the bag, seal the case. The air should be dry and ready and fog proof.
I use Canadian Tire 'Repcon II' windshield rain repellent on the outside of the lens as it causes water to bead and run off in the wind. Sometimes I do wipe with my finger as dried salt screws everything up when at Kook, Island View or even the Nat. On the inside I use skin-diving mask anti-fog solution on the case lens interior and the actual camera lens exterior. Fog's less but will still fog if you crash a lot (like me).
The best way I have found to get rid of it is to get some bags of desiccant and pop them in a small plastic bag. Pop your camera into the bag, inside its case, ensuring the case is open. Seal the bag. Leave over night so the air gets really dried out. Before you open the bag, seal the case. The air should be dry and ready and fog proof.
I use Canadian Tire 'Repcon II' windshield rain repellent on the outside of the lens as it causes water to bead and run off in the wind. Sometimes I do wipe with my finger as dried salt screws everything up when at Kook, Island View or even the Nat. On the inside I use skin-diving mask anti-fog solution on the case lens interior and the actual camera lens exterior. Fog's less but will still fog if you crash a lot (like me).