Saturday, March 24, 2012

GF2 Video Hack - superb quality! (updated on 12/3/2012)

For a camera that takes DSLR grade pictures, why it produces poor video that's not even lower resolution than iPhone 4S? Because Panasonic crippled its software to make sure you can't buy a $300 camera with $$$$ video performance.

Now you can unleash GF2's full potential with Vitaliy Kiselev's firmware hack and my patch. First, follow the instructions on this page:

Then download and apply my patch (updated on 5/9/2012, please do not post the download link but this blog):

Now go shoot some video and be amazed! If you are happy with the result, don't forget to donate to VK, I did. Or watch this youtube for what to expect from your "new" gf2:

You might want to read my other GF2 blog on AWB and picture tweaks, because most of them apply to video for warm colors and good details.

More details on this patch:

This patch is inspired by two GH2 patches: LPowell's Flow Motion and Balazer's Cake.

The key features are:
  • All I/P/B frames are the same quality. You know, Panasonic uses worse quality for P and B frames.
  • Use GOP tables to control max average bitrate, much better than frame limit and fallback etc., for optimal quality and stability.
  • GOP 6, I-B-B-P-B-B-I. I always feel 15/12 is way too long but 3 is too short and cannot take the advantage of B frames.
  • Reliable 4GB file spanning - non-interrupted recording.
  • Video plays fine in camera (except 720p) and on computer.
  • No compatibility issues with video editing software.
Fully tested, no crash yet even under the extreme conditions such as fast panning from very dark to very detailed, very bright areas. Average bitrate is about 45mbps, which is higher than the new Canon 5D III can offer in I/P/B mode. Class-4 SD cards work fine, but class-10 is recommended for reliable 4GB spanning (for longer than 10 minutes of non-interrupted shooting). BTW, now you can get a 32GB class-10 SD for only $17, to get you 2 hours recording even after this patch (again, 5D III is limited to 30 minutes at a time).

[update 3/28/2012] The latest patch is setf.ini (download link above): the numbers in GOP tables are more proportional to the original. After some comparison to the 33mbps/AQ4 patch and stock, the significant differences are: my patch produces more contrast and saturated colors, more like and better than 100mbps MJPEG. The 33mbps/AQ4 patch is more like the stock: pale. Resolution is the same, all are about 800 lines. My patch also outputs constant bitrate at 44mbps (not much variation, within 41mbps to 48).

[update 4/9/2012] The new patch is seth.ini (download link above): much higher bitrate limit (128mbps vs. 99), higher actual max bitrate (46mbps vs. 44, more closer to broadcast standard 50mbps), much taller I frames (700 vs. 500), much more reliable 4GB spanning and even more stable. More samples can be found on youtube:

Note: so far all the published samples have not used this latest patch yet, but very close. They were filmed when I was modifying my patch and testing it in fields. If you are going to modify my patch, be careful, a small change may result into big differences. Basically I've done my tweaks in very detail, for example, if you change top limit from 43000 just a little bit higher to 44000, you may experience recording failure once after several days and 4GB spanning no longer be guaranteed. Another example is the "Other Modes Top/Buttom Setting", they affect 1080i and 720p too! And if you change bitrate from 128 mbps to 112 or 144, everything will be totally different: if higher, you simply waste memory card for less stability; if lower, IQ goes down.

By default, GF2 does not use B frames for 720p; so it won't play the 720p video that has B frames as done by my patch. This is the only imperfection of my patch, but a good trade-off for IQ and you can still view the thumbnail and do delete on the camera.

[update 4/12/2012] Down to 96 mbps bitrate limit without top and bottom limits. So far no failure yet and love the contrast. All modes, 1080i60, 720p60, 1080i50 and 720p50, are fully tested. Unless I'll see a failure, this is the last update for this patch.

[update 4/29/2012] In several days of shooting, I got one abnormal stop with the last patch. The error message I saw on the screen was something like "Recording stopped due to card speed...". The recorded video is still there, nothing lost. Therefore I made another more conservative patch, seta.ini. So far so good, after more than a week.

[update 5/9/2012] Revised the 96 mbps version with proper limits and GOP numbers to be more stable without losing quality. I think I have finally got everything done right. I usually use Smart Cutter 1.4.8 to cut and join my footage, then recompress it to 8 mbps in Pazera Free MOV to AVI Converter, before upload to youtube. Both of these video tools tended to crash; so I had to use VideoReDo TVSuite V4 to remux before recompressing. Now I no longer need remux.

P.S.: My G3 hack should work for GF2 and should be better IQ, more stable and reliable 4GB spanning.


  1. [update 5/9/2012] Revised the 96 mbps version with proper limits to be more stable without losing quality.

    1. I think I have finally got everything done right. I usually use Smart Cutter 1.4.8 to cut and join my footage, then recompress it to 8 mbps in Pazera Free MOV to AVI Converter, before upload to youtube. Both of these video tools tended to crash; so I had to use VideoReDo TVSuite V4 to remux before recompressing. Now I no longer need remux.

  2. Thanks for your work! In your previous 4/29/2012 version there was a visible issue with some videos I got :( To see the problem, simply dl my ZIP archive from here:

    Gonna test this new patch :)

    1. Tobapuw:

      Yes I speak a little Pycckuu Rzuk. I downloaded and watched your video but did not see any problem. As you shot it in 25 fps (PAL), some player/decoder/monitor will show garbled bottom.

      Any way, the 4/29 patch is not so good, too conservative.

      Your video, the apartment, street and people, bring me some very good old memories! I grew up in a big factory built by Russian engineers in the 50s, the environment looks very similar to your video.

    2. Well, it seems "Русский Язык" is the correct spelling :-D

      So with your hardware & software the first 5 frames are as sharp as the next frames? I know that the goal of AVC encoding is to produce great results for human eye in motion, not in still frames (as MJPEG, for example). But in this case quality degradation is too obvious... In video encoding terms I should call this effect as "encoder's scene change blindness". For example, with x264 encoder you can adjust this setting (scene change detection), but it seems that's not the case with GF2's :(

      Upd.: I've just captured the similar clip in the same place with NTSC setting, and there's no problem. Very strange... So I'm gonna use NTSC instead :)

    3. That patch is conservative, i.e., narrow limit on bitrate. The first few frames can have high bitrate, but once the encoder find out that the bitrate exceeds the limit, it'll use a much lower bitrate, resulting into lower image quality. You may use the GH13 Stream Parser to check this problem - the first few I-frames are very tall but soon flat out.

  3. Sorry, but i cant understand how do you put in 25p the camera, what i need to change??! I install your Patch, but i dontw know what kind of REC MODE i need to use! when i look the poperties in windows, is 30FPS or 59FPS but never 25FPS!

    1. You select PAL as Video Out in the settings on your GF2. Then FSH mode will be 1080i50. Most video editing software such as PowerDirector 10 will recognize it as 1080p25.

  4. Hi, sorry to bother you but I think you can help me.I want to put some stabil patch for my gf2, but I am very afraid of bricking my camera. I read that some people bricked their camera when they were patching. Is it possible you could wrote very simple step by step instruction how to do it safe way? I know I should used genuine battery fully charged, but I am not sure exactly what to do. Vitalis personal view page is very confusing, totally not user friendly :(


      And you should use that ini.

  5. Excellent...

    With Regards,

  6. Hi, and thanks for sharing your efforts! I had some questions about the gf2 and gf1, I've been looking at either getting a Nikon J1 or grabbing either a gf2 or gf1 but I had a few questions that I could find already answered online. I really appreciate any help possible. I've seen online where its possible to get a live-view output from the gf2, I was wondering: Is it possible with the GF1 to get HDMI liveview, without the LCD turning off and is it possible to turn off the OSD (On screen displays) to get a clean HDMI output? Also, is there anyway to set the GF1 to get past the 29 minute limit?

  7. Bonjour, à tous j'offre et partage des codes Free Wifi Code Orange et SFR chaque semaine pour vous connecté a internet dans toutes la france

    Mon site de partage ▄︻̷̿┻̿═━一

    free wifi identifiant gratuit

  8. Hello, download file link not working... could you help me for obtain? Thanks in advance!!! Regards