Personal View site logo
GH2 Flow Motion v2 - 100Mbps Fast Action Performance & Reliability for Class 10 SD cards
  • GH2 Flow Motion v2.02

    • Reliable 100Mbps peak performance in AVCHD 24H, HBR, FSH, SH, and MJPEG HD.

    • Exclusive 140Mbps turbo mode boosts peak bitrate to handle 80% Slow-Motion 24H mode.

    • Records reliably with Class 10 30MB/s cards, with 60Mbps file-spanning in 24L, FH, and H modes.

    • 95MB/sec SD cards support file-spanning in all video modes (except NTSC HBR 30p and FSH 60i).

    • Full support for all NTSC and PAL video modes and options, including ETC zoom mode.

    • In-camera playback of all AVCHD video files. (MJPEG HD videos not playable in-camera.)

    • Failsafe operation with any lens, in any video mode, under any type of shooting conditions.

    • Consumer-friendly auto-exposure features fully supported in 60Mbps 24L, FH, and H modes.

    • Fast Action 3-Frame GOP performance with B-frames visibly indistinguishable from I-frames.

    • Optimal motion picture quality consistently maintained in underexposed low-light conditions.

    Flow Motion v2 is the culmination of over three months of investigation into the core encoding parameters of the Panasonic GH2 AVCHD encoder. The goal of this project has been to produce a unified patch that combines failsafe reliability with consistent, high quality performance across the entire range of video modes and options provided by the GH2. These criteria include not only still-frame image quality, but frame-to-frame motion picture continuity as well, evaluated perceptually at 24, 25, 30, 50, and 60 frames per second. Rather than simply maximizing the encoder's peak bitrate, Flow Motion v2 is fine-tuned to produce optimal motion picture quality with minimal degradation from undesirable aliasing and digitizing artifacts. The result is an unmistakable improvement in video quality with no significant drawbacks, using Class 10 30MB/sec SD cards and virtually any lens compatible with the GH2.

    Functional Limitations of Stock GH2 Video Firmware

    Although it offers a wide variety of video modes and options, the GH2's stock firmware is restricted in both functionality and video bitrate. Thanks to the dedication of Vitaliy Kiselev, many of these limitations can be overcome through the custom firmware settings provided by PTool v3.65d. Flow Motion v2 is an integrated set of patches that enable the following extended features:

    • Selection among all supported interface languages.

    • Access to both PAL 25/50p and NTSC 30/60p frame rates.

    • Extended low-light exposure settings up to ISO 12800.

    • Removal of 30-minute recording restrictions in EU locales.

    • Enlargement of MJPEG videos to 1080p FHD frame size.

    • Pasadena Pulse Audio Patch V2 B2, thanks to Per Lichtman.

    Image Quality Shortcomings of Stock GH2 Video Firmware

    The GH2's stock firmware limits its AVCHD encoder to a peak bitrate of 24Mbps in 24H and HBR modes, and to 17Mbps in FSH and SH modes. In addition, it uses long-GOP recording sequences of 12-30 frames that produce only about two keyframes (I-frames) per second. Flow Motion v2 boosts the AVCHD encoder's peak bitrate to 100Mbps in all video modes and uses a short 3-frame GOP in all 1080p video modes (and a 6-frame GOP in 720p modes), that produce 8-10 keyframes per second. These improvements enable Flow Motion v2 to capture highly detailed, fast moving images with far more fidelity than the stock firmware's restricted bandwidth can accommodate.

    At a deeper level of operation, the GH2's AVCHD encoder uses built-in Quantization Tables designed to compress the video data as efficiently and compactly as possible. When shooting highly detailed subjects, quantization often produces undesirable rectangular artifacts ("macroblocking") which are then filtered by built-in Deblocking Tables. Unfortunately, the tables used by the stock GH2 firmware sacrifice image quality in favor of compression efficiency, producing consumer-grade results. In a further reduction of image quality, highly compressed P and B-frames are encoded with coarser quantization tables than I-frames, degrading frame-to-frame consistency within each GOP.

    Flow Motion v2 replaces the GH2's Quantization and Deblocking Tables with custom matrices, hand-tuned for each video mode, that are crafted to minimize macroblocking and digitization artifacts. This enables the encoder to make full use of its available bitrate to encode genuine image details rather than wasting bits attempting to correct macroblock encoding flaws. In addition, Flow Motion v2 applies equal levels of quantization to all types of frames, producing P and B-frames that are visually indistinguishable from I-frames.

    Below is an example of the digitization artifacts produced by the GH2's stock firmware, compared to results produced by Flow Motion v2. On the top is a 200% crop of a 24H mode frame grab from the unhacked GH2 AVCHD encoder. You can clearly see jagged macroblock encoding artifacts due to the stock firmware's inadequate bitrate. Below it is the same stream of water shot with Flow Motion v2 in 24H mode:

    image

    Support for GH2 Auto-Exposure Features

    Flow Motion v2 works reliably with the GH2's consumer-friendly auto-exposure features in both 24p and HBR video modes. However, in 720p SH video mode, auto-exposure operation may cause recordings to fail sporatically and the camera may need to be restarted. To avoid this pitfall, I recommend using Flow Motion's 60Mbps 1080i FH and 720p H video modes when using any combination of the following features:

    • P, A, or S exposure modes or when shooting in iA mode.
    • Auto-ISO mode.
    • iDynamic auto-contrast mode.
    • i.Resolution mode.
    • Motorized zoom lens operation.

    I've tested and confirmed these features to work reliably at 60Mbps in 1080i FH and 720p H video modes. The 60Mbps FH and H video modes also support 4GB file-spanning on 30MB/sec Class 10 SD cards, and produce excellent motion picture quality that is just a notch more compressed than Flow Motion's 100Mbps FSH and SH video modes.

    Flow Motion v2.02 Patch Settings File

    This zipped INI file can be used to apply complete patch settings to firmware loaded into PTool 3.65d. To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware v1.1 binary file for GH2. The settings contained in the Flow Motion v2.0 INI file will automatically be installed in the "F" button at the bottom of the PTool main window.

    Note that with the following PTool Settings File, you may at any time re-install the original Panasonic GH2 v1.1 firmware into the camera. You may also copy each patched or original firmware file to separate SD cards, and use them to quickly switch between patches as often as you like.

  • 1036 Replies sorted by
  • Flow Motion v2 - Minimization of Macroblock Artifacts

    A flowing stream of water can require unexpectedly high bitrates to encode with visually flawless image quality. To an AVCHD encoder, each wave contains a myriad of independent motion vectors that fluctuate in unpredictable patterns. An encoder that handles highly randomized motion gracefully, without producing noticeable digitizing artifacts, is well equipped for a wide range of subjects. Here is an unedited comparison of the unhacked GH2's AVCHD encoder in its highest quality 1080p 24H mode with Flow Motion v2:

    Unhacked GH2 in 24H Mode

    Flow Motion v2 in 24H Mode

    An unhacked GH2 actually looks pretty good on consumer-level equipment. For post-production grading or theater projection, however, magnification reveals unsightly macroblock artifacts. In the 200% crop frame grabs below, the upper image is from the unhacked GH2, while the lower image was produced by Flow Motion v2:

    image

    (I've also included unedited frame grabs at 100%, 200%, and 400% magnification below.)

    One of the major causes of AVCHD macroblock artifacts is the common industry practice of encoding P and B-frames with coarser quantization tables than are used in I-frames. This enables professional Blu-ray encoders to pack lengthy movies into optimally compact files for commercial distribution to end-users. For capturing original source footage, however, this encoding strategy can compromise motion picture quality with painfully visible artifacts of distinctly digital characteristics that cannot easily be corrected in post production.

    Macroblock artifacts not only look ugly, they can actually sabotage the encoder's best efforts to accurately encode P and B-frames. This is because the reference frames used as the basis for encoding P and B-frames are not the original images, but are instead decoded images reconstructed by the encoder's built-in Deblocking Filter. When those reference frames are contaminated with coarse macroblock artifacts, the encoder must then squander much of its available bitrate to suppress the propagated artifacts from reappearing in subsequent P and B-frames.

    Unlike DSLR's with hardware-based AVCHD encoders, the GH2's software encoder works under an additional constraint. While hardware encoders can use both 4x4 and 8x8 quantization matrices to encode individual macroblocks, the GH2 is limited to using only 4x4 matrices. This puts it at a disadvantage when encoding subtle low-detail gradients, which 8x8 matrices can render with higher quality at low bitrates.

    To compensate for these technical shortcomings, the GH2 needs significantly finer P and B-frame quantization tables that minimize macroblock artifacts and match the image quality of its I-frames. In addition, it requires significantly higher bitrates to utilize these tables at the finest practical levels of quantization. This is what the Quantization and Deblocking Tables developed for Flow Motion v2 are designed to accomplish.

    Wave GH2vsFM2-100.jpg
    1024 x 868 - 416K
    Wave GH2vsFM2-200.jpg
    1024 x 868 - 325K
    Wave GH2vsFM2-400.jpg
    1024 x 868 - 260K
  • Flow Motion v2 - Minimization of Gradient Banding

    Flow Motion v2 takes advantage of well-established perceptual properties of color vision to make optimal use of its available 100Mbps peak bitrate. The human eye responds differently to luma versus chroma details. High-resolution details in an image are primarily perceived by contrasts in luminance, regardless of their hue. This is the technical rationale for the AVCHD encoder's strategy of encoding chroma macroblocks at half the vertical and horizontal resolution as luma macroblocks (4:2:0 color depth). But while chroma details do not require high resolution, the eye is very sensitive to crudely encoded shading in gradual, low-resolution color gradients. An encoder that uses coarse chroma quantization tables may produce unsightly bands of distinct colors in what should be smoothly varying sky highlights and shadow details.

    To mininimize gradient banding, Flow Motion v2 uses custom quantization tables that are optimized differently for luma and chroma details. The luma tables emphasize high-precision quantization of the finest details in each luma macroblock. This suppresses the rectangular edge artifacts that afflict the low-bitrate unhacked GH2 encoder. Flow Motion's chroma tables, however, apply high-precision quantization to the low-resolution details in each chroma macroblock. This minimizes banding by preserving the subtle color shading of smooth gradients.

    With its generous 100Mbps peak bitrate, Flow Motion's custom quantization tables eliminate the unhacked encoder's need to use the built-in Deblocking Filter to suppress macroblock artifacts. Flow Motion instead configures this filter to smooth the transitions between low-detail macroblocks that are predominately composed of smooth gradients rather than sharp edges. This helps to ameliorate the inherent limitations of the AVCHD encoder's 4:2:0 color depth.

    Here is an example of a wide-contrast outdoor scene at dusk. It contains smooth gradients both in the subtle tones of the sky and in the reflected shadows on the surface of the lake. For a detailed comparison of encoding quality, I shot the scene in Flow Motion v2 1080p 24H mode, 1080p25 HBR mode, and 720p50 SH mode. The original GH2 MTS files are available for download from each video's Vimeo page:

    Flow Motion v2 1080p 24H:

    Flow Motion v2 1080p25 HBR:

    Flow Motion v2 720p50 SH:

    For a direct comparison of the still image quality of Flow Motion v2 1080p 24H mode and 1080p25 HBR mode, I captured unfiltered, 100% crop screen grabs of a frame at the same spot in the panning motion of each video. The upper image is in 24H mode, the lower is in HBR:

    image

    To further examine the encoding quality of the 1080p25 HBR video, I used Adobe After Effects CS5.5 to manipulate the gamma curve of the above frame grab. The middle image below shows the unaltered 100% gamma curve. In the upper image, lowering the gamma by 50% darkens the sky, but its gradients remain virtually free of banding. In the lower image, raising the gamma by 200% lightens the lake shadows, but their diffuse details remain smooth with virtually no macroblocking.

    Flow Motion v2 HBR mode - 50% gamma: image

    Flow Motion v2 HBR mode - 100% gamma: image

    Flow Motion v2 HBR mode - 200% gamma: image

    Placid Lake FM2 24H-HBR.jpg
    1024 x 868 - 219K
    Placid Lake HBR gamma 50.jpg
    1024 x 570 - 110K
    Placid Lake HBR gamma 100.jpg
    1024 x 570 - 134K
    Placid Lake HBR gamma 200.jpg
    1024 x 570 - 138K
  • GH2 AVCHD Encoder Failure Patterns

    Most DSLR AVCHD encoders have been implemented at least partially with dedicated encoding hardware to insure consistent image quality and performance in all video operating modes. This includes the Panasonic AF100, which uses a DSP implementation that delivers perceptibly better quality than the unhacked GH2 within the constraints of AVCHD's 24Mbps maximum bitrate specifications.

    As with all Panasonic G-series cameras, the GH2's AVCHD encoder is implemented entirely in software. While this helps reduce the manufacturing cost of the camera, it makes the encoder's real-time performance vulnerable to disruption by other demands that may be placed on the camera's CPU while shooting video. In particular, automated mechanisms such as OIS, dynamic auto-exposure, and continuous auto-focus require constant attention to changing conditions which may transiently undermine the encoder's real-time performance.

    With a fixed frame rate to maintain, the AVCHD encoder has but a limited amount of time in which to encode each batch of frames and write them out to the SD card. It must also work within the limits of the peak bitrate available to encode each frame. If at any time the data size or encoding time requirements of a frame exceed the encoder's limitations, it may resort to operating in a built-in low-quality Fallback Mode, which uses coarse quantization to quickly encode the frame before its time runs out.

    Although the GH2's software implementation allows the AVCHD's bitrate and image quality to be greatly improved, this also increases the hazards of the camera failing under demanding conditions. Unlike SD card write-speed errors that cause video recording to abruptly halt, Fallback Mode failures occur silently with no apparent disruption of the recording process. The degradation in image quality caused by Fallback Mode may not always be immediately noticeable, raising the possibility that these failures may insidiously creep into footage that otherwise appears to be recorded at the intended level of quality.

    Unfortuntely, Fallback Mode can occur even when shooting ordinary scenery with the GH2's unhacked 24Mbps AVCHD firmware. Here is an example shot in 1080p 24H mode with a Panasonic 45-200mm lens:

    At first glance this video looks fine, and it is difficult to spot which frames have been recorded with degraded image quality. In these cases, cbrandin's invaluable Stream Parser may be used to examine the encoding quality of each frame in detail. The Elementary Stream Decoder built into Stream Parser directly identifies frames encoded in Fallback Mode, and reports a numerical rating of each frame's quantization quality. Here is an extract of the Stream Parser report on the video above:

    image

    In the bar chart at the top of the report, each GOP begins with a red I-frame. In GOP's 2-4, a bitrate disruption can be seen which provokes the encoder to plunge into Fallback Mode in the following GOP's. The chart at the bottom lists the quantization factors used in each recorded frame, along with a quality rating under the "DC" column. In the "QST-High" column, each frame encoded in Fallback Mode is marked with an asterisk.

    The DC values of 26-39 used in Fallback Mode indicate a very coarse level of quantization, degrading the image quality of those frames. (Larger values indicate lower quality.) After the encoder recovers from Fallback Mode, it maintains significantly higher quality DC factors of 9-13, a reasonable level of quality to expect from the AVCHD encoder's 24Mbps maximum bitrate.

    Using custom rate control techniques, Flow Motion v2 is able to sustain peak bitrates up to 100Mbps with complete protection from Fallback Mode. It is designed to maintain consistently superior quantization quality over a broad range of shooting conditions, including extreme underexposure by up to two stops. In real-life shooting conditions, Flow Motion v2 encodes at DC values commonly ranging from 5-9, the finest levels of quantization the AVCHD encoder can produce before hitting rapidly diminishing improvements in perceptible image quality at DC values of 4 and below. The combination of excellent motion picture quality with efficient 100Mbps peak bitrate consumption in all video modes makes Flow Motion v2 one of the highest performance AVCHD patches developed for the GH2.

    Creek GH2 24H fallback StreamParser.jpg
    1024 x 868 - 286K
  • Please provide your suggested film settings for this patch: I have a big job this weekend and am very excited to try it.

  • @ LPowellLPowell 11:18AM.... thank you very much Lpowell. I'll start to test immediately...

  • @royfel I tested Flow Motion v2 using both Smooth and Nostalgic Film Modes. though it should work as intended with any film mode you prefer.

  • @LPowell

    To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware v1.1 binary file for GH2. The settings contained in the Flow Motion v2.0 INI file will automatically be installed in the "F" button at the bottom of the PTool main window.

    Want to remind that for long time PTool can install directly zip or plain ini patches from any folder.

  • For all of the hard work that has obviously gone into this, Thank you!

  • just done, Rokkor 50mm 1,4 - shutter 50, f2,8 iso 160, inside, on tripod, screenshot results,

    cinema 24p.PNG
    1274 x 639 - 124K
    720-50p.PNG
    1267 x 633 - 120K
    cinema 24p.PNG
    1274 x 639 - 124K
  • I'll be using this in pal HBR mode. Any ballpark ideas on how long I'll be able to shoot a single clip?

  • @LPowell

    Just downloaded and will be loading this up on my second GH2. I really liked your FM 1.1 but have since been using Sanity 5 for it's incredibly small files sizes and reliability.

    I'll try to do some side by side testing just for the heck of it, but I'm sure I'll probably just end up keeping one camera loaded with each.

    Thanks for all your hard work, all you developers (too many to name...) are a great bunch of guys for not only taking the time to sift through and experiment with all this data, but also for sharing it so freely with all the rest of us consumers. Hats off!

    Tony

  • Looking good! @ 24p (25mm 0.95)image

    1080 24p.PNG
    746 x 412 - 158K
    Flowmo v2 24p.png
    1920 x 1080 - 2M
    Flowmo v2 24p a.png
    1920 x 1080 - 728K
  • i also use sanity 5. Just make a small test, and I THINK that with your patch the video is brighter!!!? It catches more light on same conditions!!! ??? As i understand it is not span in HBR mode, right ?

  • I am totally blown away...
    Congrats @LPowell, you have found the holy grail............

    i did some quick shots to see what it do..
    And I could not believe it, so i checked, and checked and and and..... Really impressive!

    flow 2_ HBR pal.png
    1280 x 1024 - 2M
    flow 2_ 24p.png
    1280 x 1024 - 2M
    flow 2_ 720 pal.png
    1280 x 1024 - 2M
  • @matthere 1:44PM ...why is your result so much different to my 24p (1. and 3rd screen)

  • @LPowell I'm going to download it now but wanted to say thanks first. Special thanks for the write up!

  • First impression: W-O-W !!!

  • @Benibube Do you mean the streamparser (file/snapshot report) or the content? We are quite windy here and quite a bit of movement in the background of that shot. Wow on the IQ for sure!

  • @matthere 2:09PM ... I mean the bad streamparser result of my shots, comparing your clear/straight/perfect results..

  • @Lpowell.. whats the reason for so different streamparser results between @matthere's and mine ? (Iam talking about the file/snapshot)

  • The subject will have an effect, not sure what you had in your sights, but bit rate will vary, the more complex the scene you are shooting the greater the bitrate will be.. as for the clarity or straightness of the lines.. not sure on that one..

  • tested with my cheapest card ADATA class 10 16gb Quality very impressive, especially in low light where, as i;ve already said, it is brighter than the SANITY 5 that i use. Of course it gives me only about 25 minutes per 16gb. In MJPEG mode the time was only about 3minutes (empty 16gb card) is this normal??? Also, i notice that the autofocus is slower than SANITY 5 (kit 14-42)

  • @LPowell Will test this as B cam on a commercial shoot today. I have a quick question: what exactly do you mean when you wrote this line above:

    o Access to both PAL 25/50p and NTSC 30/60p frame rates.

    I assume you're referring to 720p50 and 720p60 respectively, right?

  • Thank you for your release @LPowell. All my respect for this 3 months of testing. These settings will be perfect for anything where the cam must not fail.

    Now I am asking myself how these settings play together with the matrixes driftwood developed over the last months. Is it save to combine FM 2.0 with VY Canis Majoris: 'Night' or 'Skin Tone Soft' matrices for example? If yes.. we could maybe create a file with all the matrices settings (only) so they can easily be added with ALT-Click to existing settings? Does this make sense?

  • @LPowell, Thanks so much for all the hard work on researching the encoder and for the informative description. Looking forward to testing this out.

This topic is closed.
← All Discussions