40Mbps AVCHD High Reliability Patch

Lpowell

Veteran
Reliable In-Camera Playback Patch - updated for PTool 3.55d and above

As you've no doubt heard, PTool 3.55d and above have liberated all previously unhackable versions of GH1, GF1 and G2 cameras. In addition, PTool now provides several new patches that I've been able to incorporate into the Reliable In-Camera Playback Patch, making it more versatile than ever.

To make use of these new features, download the latest version of PTool from the following link:

http://www.gh1-hack.info/ptool3d.zip

Version 2 of the Reliable In-Camera Playback Patch supports the following features:

* Works on all Panasonic GH1, GF1, and G2 cameras, both hacked and unhacked.

* Switchable between NTSC and PAL modes, in all interface languages.

* No 30-minute AVCHD time limit, all compatible batteries supported.

* In-camera playback available in all video modes.

* 40Mbps FHD mode - AVCHD 1920x1080 24p/25p video (interlaced) - GH1 only

* 40Mbps SH mode - AVCHD 1280x720 50p/60p video (progressive)

* 35Mbps HD mode - MJPEG 1280x720 30p video in 4:2:2 color (4:2:0 color on G2)

* 30Mbps VGA mode - MJPEG 960x720 30p video (iPad-compatible) - GH1 only

Origins of the Reliable In-Camera Playback Patch

Thanks to the efforts of many diligent testers, the remarkable potential of the GH1's AVCHD encoder has been stunningly exposed. Once you see for yourself the image quality the camera can produce when given an adequate bitrate, the miserly 17Mbps the GH1 was initially shackled with seems absurd. Not even the 24Mbps maximum bitrate dictated by the AVCHD standard comes close to what's really needed to produce high quality HD video. It's become apparent that these bitrate restrictions were not imposed by inherent hardware or software limitations of the camera, but were the result of arbitrarily chosen technical specifications. The H.264 standard on which Panasonic and Sony based their AVCHD codecs allows bitrates up to ten times as high.

Using the fastest Class 10 SDHC cards available, AVCHD bitrates of over 60Mbps have been achieved by the GH1 in numerous test cases. Unfortunately, these tests have also revealed that the camera is prone to sporatic recording failures when operated at the highest practical bitrates. While it's obvious that the GH1 can do much better than 17Mbps, what's not clear is how far its performance can be boosted without sabotaging its reliability.

With recent enhancements to PTool by Vitaliy Kiselev, along with cbrandin's invaluable GH13 Stream Parser, many of the flaws and pitfalls of the AVCHD codec have come to light. Here are some of the most important findings:

* The "rogue frames" that appeared to plague native 24p videos were shown to be nothing but a myth by cbrandin.
* My own tests, as well as many others', have convinced me that native 24p recording cannot be made bulletproof.
* In many cases, write speed failures are not caused by SD card limitations, but by codec buffer overflow errors.
* Codec peak bitrate can significantly exceed average bitrate with both the B and C settings suggested by PTool.

Guided by these considerations, I've developed an AVCHD patch that works reliably with Class 6 SDHC cards and higher. This patch produces a peak bitrate in high-detail scenes that matches the 44Mbps average bitrate of the PTool C settings. Compared to the average 32Mbps bitrate of the B settings, this new patch produces typical bitrates of around 40Mbps on sharp-focus, highly-detailed scenes.

In short, this patch combines the average bitrate of the C settings with the reliability of the B settings.


I've coupled this AVCHD patch with my 35Mbps MJPEG In-Camera Playback Patch:
http://dvxuser.com/V6/showthread.php?t=215624


*** WARNING ***

These settings require the most recent version of PTool 3.55d or higher.

Download PTool here: http://www.gh1-hack.info/ptool3d.zip


Reliable In-Camera Playback Patch Settings File:

I've combined the 40Mbps AVCHD High Reliability Patch with my 35Mbps MJPEG In-Camera Playback Patch in a downloadable PTool INI file. With this file, you can install the complete Reliable In-Camera Playback Patch with a single click of the "J" button in PTool.

To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware for either GH1 v1.32, GF1 v1.22, or G2 v1.1. The settings contained in the INI file will automatically be installed in the lower row of buttons in the PTool main window.

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

Attachments

Last edited:
Sample thumbnails from 40Mbps AVCHD videos

Sample thumbnails from 40Mbps AVCHD videos

Here are sample thumbnails exported from FHD AVCHD videos taken with my 40Mbps AVCHD High Reliability Patch. (Thanks to Ian-T and thisisapocalypse, who pointed out that the first set of thumbnails I uploaded were blurred.) These frames have been cropped in Photoshop to fit within a browser page, and saved as Quality-12 JPEG images. The original images were FHD 1920x1080 frames.

Dandelion in Field of Grass
00136.jpg


Rusty Wall Hanging
00137.jpg


Mailbox Surrounded by Foliage

00126q.jpg


Flower Arrangement

00125.jpg
 
Last edited:
So this is 60i, right? Does mud trigger at this high of a bitrate?

And are you saying 24P, even with a SanDisk Extreme Class 10, cannot be used reliably, regardless of settings? Basically, I'd be curious to see if there can be a similar project for 24P with the best SD cards available.
 
I'm personally convinced that the sporatic frame errors in Native 24p videos that occur particularly in high-detail static shots are not caused by SD card write-speed limitations. Peak and average bitrates aren't always excessive during these errors and I have seen them just as often while testing Class 10 SD cards as with Class 6 SD cards. I was unable to find any combination of patch settings, regardless of the bitrate or SD card Class, that would produce absolutely reliable Native 24p recordings.
 
Last edited:
Haha, no I don't see any mud there.

So I guess if 24P is out for now, can a class 10 card reliably pump some extra bitrate from 60i versus what you have here?
 
So I guess if 24P is out for now, can a class 10 card reliably pump some extra bitrate from 60i versus what you have here?
Perhaps, though I've yet to identify a reliable Class 10 bitrate that a Transend Class 6 card can't handle as well. I'll be getting Patriot and Lexar Class 6 cards next week to test as well.

The problem with taking advantage of Class 10 bitrates is that the AVCHD codec is forced to operate much closer to its internal safe limits. Since the codec is not very robust, it can fail suddenly without any gradual indication of a problem developing. That makes it very difficult to insure that your tests have safely ruled out any possibility of failure.
 
40Mbps is the typical bitrate I've observed. The patch's peak bit rate is set at 44Mbps, compared to the original codec's 17Mbps.
 
Not even the 24Mbps maximum bitrate dictated by the AVCHD standard comes close to what's really needed to produce high quality HD video. It's become apparent that these bitrate restrictions were not imposed by inherent hardware or software limitations of the camera, but were the result of arbitrarily chosen technical specifications.

With a better encoder, 24mbps is quite sufficient for HD video. And while hardware limitations were not the reason for the 17mbps bitrate of the GH1, they were the cause of the crappy results at 17mbps.

Those 'arbitrarily chosen' technical specs of AVCHD are actually a good thing. Think about how much more R&D will go into encoder quality when they are forced to limit the bitrate. Without the bitrate limit, companies would've got away with using crappy encoders and boosting the bitrate, like Canon has done with their DSLR's. Then we would've ended up with a bunch of average camcorders which are all incompatible with certain media, software, etc. Unfortunately the stock GH1 had neither a quality encoder or a high bitrate - which is why it's so great that we can now use ptool and use whatever settings we like, such as those you've generously provided here!
 
Thanks to the efforts of many diligent testers, the remarkable potential of the GH1's AVCHD encoder has been stunningly exposed. Once you see for yourself the image quality the camera can produce when given an adequate bitrate, the miserly 17Mbps the GH1 was initially shackled with seems absurd. Not even the 24Mbps maximum bitrate dictated by the AVCHD standard comes close to what's really needed to produce high quality HD video. It's become apparent that these bitrate restrictions were not imposed by inherent hardware or software limitations of the camera, but were the result of arbitrarily chosen technical specifications. The H.264 standard on which Panasonic and Sony based their AVCHD codecs allows bitrates up to ten times as high.

Using the fastest Class 10 SDHC cards available, AVCHD bitrates of over 60Mbps have been achieved by the GH1 in numerous test cases. Unfortunately, these tests have also revealed that the camera is prone to sporatic recording failures when operated at the highest practical bitrates. While it's obvious that the GH1 can do much better than 17Mbps, what's not clear is how far its performance can be boosted without sabotaging its reliability.

With recent enhancements to PTool by Vitaliy Kiselev, along with cbrandin's invaluable GH13 Stream Parser, many of the flaws and pitfalls of the AVCHD codec have come to light. Here are some of the most important findings:

* The "rogue frames" that appeared to plague native 24p videos were shown to be nothing but a myth by cbrandin.
* My own tests, as well as many others', have convinced me that native 24p recording cannot be made bulletproof.
* In many cases, write speed failures are not caused by SD card limitations, but by codec buffer overflow errors.
* Codec peak bitrate can significantly exceed average bitrate with both the B and C settings suggested by PTool.

Guided by these considerations, I've developed an AVCHD patch that works reliably with Class 6 SDHC cards and higher. This patch produces a peak bitrate in high-detail scenes that matches the 44Mbps average bitrate of the PTool C settings. Compared to the average 32Mbps bitrate of the B settings, this new patch produces typical bitrates of around 40Mbps.

In short, this patch combines the average bitrate of the C settings with the reliability of the B settings.


40Mbps AVCHD High Reliability Patch:

Patches for End Users
. Wrapper
.. Native 24p/25p: unchecked
. AVCHD Compression
.. Video Bitrate FHD/SH: 41000000
.. Overall Bitrate: 43000000
. AVCHD GOP Length: unchanged

Patches for Testers
. AVCHD Compression
.. Preset bitrate: 180
.. Preset bitrate 2: 180

While I've subjected this patch to a wide variety of challenging tests, I'm hoping others will try it under severe conditions as well. PappasArts' test charts have been very helpful in this regard, and the patch should routinely record them for any desired length of time, in both FHD and SH modes.

With my own GH1, I've combined this AVCHD patch with my 35Mbps MJPEG In-Camera Playback Patch:
http://dvxuser.com/V6/showthread.php?t=215624

I believe this combination delivers consistently superior image quality with rock solid reliability.



What is your setting for LIMITING BITRATE?
 
I apologize, and I don't mean to be a jerk....but I do not like those images. They look funny to me. I understand that you cropped them but I'm not sure if it's noise or just lack of detail. I've seen some extraordinarily sharper looking images come from this camera so I'm not sure if I'm convinced. Great efforts however.
 
I have to agree with Ian, these stills are not a good representation of your setting. I have installed them to test and on a PAL cam. the bitrates are a little lower than what you reported but that is understandable. However i couldn't make it fail with manual lenses and class 6 card. The images i got are fine, no mud. I'll be doing some more comparisons tomorrow.

If your original stills are better than you posted (and i've no doubt they are) can you redo them or even post in full size.

Thanks for doing this ipowell.

Rambo
 
Last edited:
I apologize, and I don't mean to be a jerk....but I do not like those images. They look funny to me. I understand that you cropped them but I'm not sure if it's noise or just lack of detail. I've seen some extraordinarily sharper looking images come from this camera so I'm not sure if I'm convinced. Great efforts however.

Agreed, these pix look soft to me.
 
I hope that lpowell will post original full resolution pictures .. because these pictures are little bit weird... Or maybe there was some problem only in this particular situation .. Anyone tested it on own GH1?
I will test these settings later this evening ..
 
I apologize, and I don't mean to be a jerk....but I do not like those images...
No, you're right, thank you for using your eyes critically and spotting my late-night mistake. I did the 24p pulldown incorrectly and wound up rendering 29.97p MOV files from the original 59.94i MTS files. I'll reprocess the files tonight and post updated thumbnails.

I should also have made it clear that to build this patch, you need to use the current version of PTool. This version no longer needs or includes patches for "Limiting Bitrate" or "Remove Encoder Limits". Unfortunately, the latest updates to PTool have all been marked with the same version number, so you may need to download it again to be sure you have the latest.

I've also tested Native 24p and 60i FHD recordings with GOP lengths of 12 and lower. While I didn't see any in-camera failures, I found cases where an occasional GOP would contain a sequence of truncated P-frames following a normal I-frame. These cases were rare, and the only visible effect they have on a video is to cause it to appear to pause for a handful of frames. Nevertheless, I felt the modest benefits of reducing GOP length somewhat were not worth the loss of reliability.

EDIT: I've uploaded newly exported thumbnails to the second post in this thread.
 
Last edited:
Back
Top