UPDATED to Version 2! INI files for the latest version of PTool ready for download
As you may have heard, the latest version of PTool 3.56d and higher have liberated all previously unhackable versions of not only the GH1, but the GF1 and G2 cameras as well. In addition, it provides a variety of new patches that I've been able to incorporate into the Fast Action 3-Frame GOP 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
The Fast Action 3-Frame GOP Patch is ideally suited for the GF1 and G2 cameras' hardware capabilities. The NTSC version of these cameras produces native 720p30 video streams in both AVCHD SH mode and in MJPEG HD mode. This patch boosts the peak bitrate of both video modes to over 50Mbps and in SH mode uses a remarkably short 3-frame GOP-size, recording 10 key frames per second. (This 3-frame GOP is used in PAL AVCHD SH mode as well, recording at 720p25.) Using such a high density of key frames enables the Fast Action 3-Frame GOP Patch to maintain excellent image quality while tracking rapid moving objects.
In addition, all GF1 and G2 cameras may now be freely switched between NTSC and PAL video modes, and all available user interface languages. This patch also enables Manual-exposure video modes, third party batteries, and eliminates 30-minute recording limits in AVCHD modes.
For version 2 of the Fast Action 3-Frame GOP Patch, I've prepared a choice of two INI settings files that differ only in the settings for the MJPEG 30p modes:
* For use with standard lenses, the standard patch will produce two types of MJPEG videos:
HD mode: 1280x720 HD videos with peak bitrates up to around 60Mbps (in 4:2:2 color on the GF1).
VGA mode: 960x720 iPad-compatible videos, with peak bitrates up to 30Mbps.
* For use with anamorphic lenses, the anamorphic patch supports two different squeeze ratios:
HD mode: 1920x810 videos optimized for 1.33X anamorphic adapters, with peak bitrates up to around 60Mbps.
VGA mode: 1920x720 videos optimized for 2X anamorphic adapters, with peak bitrates up to around 50Mbps.
Fast Action 3-Frame GOP Patch Settings Files:
These zipped INI files can be used to apply complete patch settings to firmware loaded into PTool 3.56d. To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware for either GF1 v1.22 or G2 v1.1. The settings contained in the INI file will automatically be installed in the "I" button at the bottom of the PTool main window.
Note that with the following PTool Settings Files, you may at any time re-install the original Panasonic 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.
View attachment LPowell - Fast Action 3-Frame GOP Standard Patch v2.zip
View attachment LPowell - Fast Action 3-Frame GOP Anamorphic Patch v2.zip
Read on for updated background information on these patches:
A Question of Standards
One of the inexplicable oversights in the AVCHD standard is the absence of any native 30fps non-interlaced HD recording formats. (To be precise, it would be 29.97fps to conform to the NTSC frame rate.) In the USA, 30fps progressive video is better suited than 24fps or 60fps for encoding into Progressive Segmented Frame 60i format for both NTSC broadcast and online video hosting purposes.
For the NTSC GF1 and G2 cameras, Panasonic created a revised "AVCHD-Lite" format which encodes 720p30 video into a non-interlaced 720p60 wrapper by duplicating each native frame. While this enables the GF1 and G2 to match the frame rate of the GH1's native 720p60 AVCHD mode, it needlessly duplicates each 30p video frame. Fortunately, Vitaliy Kiselev's PTool provides an optional "720p59.94fps->29.97fps" patch to convert the GF1 and G2 720p60 AVCHD mode into native 720p30 video, without loss of video data (the GF1 and G2 sensors record natively at 30fps).
When PTool's 720p30 patch is used on the NTSC GH1, however, it actually reduces the GH1 sensor's native frame rate from 60fps down to 30fps. As with the patched GF1 and G2, this produces native 720p30 videos in SH mode instead of the stock 720p60 videos. For videos destined for NTSC conformance, 30fps is a more convenient recording format than 60fps. In PAL mode, the 720p50 AVCHD mode is likewise converted to produce 720p25 videos.
How to Want What You Get
With these considerations in mind, I set out to optimize the patched 720p30 AVCHD video mode for the highest reliable bitrate. I also wanted to reduce the number of P-frames in each GOP (Group of Pictures) in order to improve the encoder's ability to record fast action sequences without muddying the details. 720p60 AVCHD videos have a GOP-length of 30 frames, recording a key frame only once every half second. In addition to undermining the encoder's action tracking ability, a 30-frame GOP produces choppy results when scrubbing through the video stream in a post-production editor. So long as you can maintain an adequate bitrate, the shorter the GOP-length the better.
In past attempts to optimize 720p30 AVCHD, I was stymied by the puzzle of how to maintain a usable 1080p24 AVCHD mode for the GH1 at the same time. When you use PTool to reduce 720p60 AVCHD down to 720p30, the encoder's bitrate drops by almost half. If you then attempt to increase the 720p bitrate, the 1080p bitrate is boosted too high and becomes unreliable. There was no way to adjust the two bitrates separately.
Recently, however, Vitaliy added two new patches to PTool that were suggested by cbrandin for use in his research on stabilizing Native 1080p24 recording. While these patches did not produce a reliable solution for Native 24p, they provided independent adjustments of 720p and 1080p encoding modes. Working on some rather speculative hunches, I managed to use the patches on optimized tweaks of PTool's "C" settings to simultaneously boost 720p30 bitrate while stabilizing 1080p24 bitrate safely below the point where buffer overflow causes sporatic recording failures.
Not the Only Bits that Rate
What was even more impressive was discovering that I could optimize 720p30 video down to a remarkably short 3-frame GOP-length, without even a hint of instability. This produces a key frame every tenth of a second, combining fast action tracking with over twice the compression efficiency of the 720p30 MJPEG encoder. For highly detailed scenes, use of optimized "C" settings produces average bitrates of around 50Mbps with peak bitrates up to 55Mbps, for both 720p30 SH and (on the GH1) 1080p24 FHD modes. Since there are now only half as many frames in 720p videos as before, boosting the 30fps bitrate to 50Mbps produces compression quality comparable to what would be produced by 100Mbps at 60fps. I believe this is the highest reliable AVCHD bitrate that remains safely within the write-speed capabilities of Class 6 SD cards and higher. In addition, AVCHD videos produced by this patch are reviewable via in-camera playback.
While the GH1 1080p24 FHD mode is still confined within a 60i wrapper to maintain stability, this 50Mbps AVCHD patch produces consistently higher average bitrates than my Reliable In-Camera Playback Patch. The 1080p24 FHD mode is not quite as reliable, however, when used with an auto-focus lens in AFS rather than Manual-Focus mode. For well-lit, extremely detailed subjects (e.g. foliage), I'd recommend using a half-shutter press to get focus-lock, then switch the GH1 to MF mode just before pressing the video button. (This applies only when using auto-focus lens in 1080p24 FHD mode. I've found 720p30 modes to be absolutely reliable under all operating conditions.)
On the MJPEG side, I've paired this 50Mbps AVCHD 3-Frame GOP Patch with my previously published 60Mbps MJPEG 4:2:2 Color Patch:
http://dvxuser.com/V6/showthread.php?t=216238
While it does not produce MJPEG videos that can be viewed in-camera, I believe the 60Mbps average bitrates of this patch's MJPEG videos are close to the highest that can be reliably recorded on Class 6 SD cards. Particularly in low-light situations, I've found this 60Mpbs MJPEG patch to maintain considerably higher bitrates than the AVCHD encoder, along with higher quality 4:2:2 color depth (on GF1 cameras) for post-production grading purposes.
Full Speed Ahead
The Fast Action 3-Frame GOP Patch v2 is compatible with both GF1 and G2 cameras, and is switchable between NTSC and PAL modes. My thanks once again go to Vitaliy Kiselev, for his pioneering work on PTool, and to cbrandin for his invaluable Stream Parser tool.
*** WARNING ***
Unfortunately, there is a reliability issue with using short GOP-lengths in the AVCHD encoder. Under extremely dim illumination, video bitrate can fall below 5Mbps. If this condition persists for longer than about seven seconds, the AVCHD encoder may terminate the recording, leaving a zero-length file. This malfunction can occur with any AVCHD patch that uses a reduced GOP-length, and the only known way to guard against it is to make sure your subject is adequately lit at all times.
The Fast Action 3-Frame GOP Patch will not work properly with previous versions of PTool. The best way to insure that you have the latest PTool release is to download it directly from the following link:
Download PTool here: http://www.gh1-hack.info/ptool3d.zip
Fast Action 3-Frame GOP Patch Settings Files:
These zipped INI files can be used to apply complete patch settings to firmware loaded into PTool. To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware for either GF1 v1.22 or G2 v1.1. The settings contained in the INI file will automatically be installed in the "I" button at the bottom of the PTool main window.
Note that with the following PTool Settings Files, you may at any time re-install the original Panasonic 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.
View attachment LPowell - Fast Action 3-Frame GOP Standard Patch v2.zip
View attachment LPowell - Fast Action 3-Frame GOP Anamorphic Patch v2.zip
As you may have heard, the latest version of PTool 3.56d and higher have liberated all previously unhackable versions of not only the GH1, but the GF1 and G2 cameras as well. In addition, it provides a variety of new patches that I've been able to incorporate into the Fast Action 3-Frame GOP 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
The Fast Action 3-Frame GOP Patch is ideally suited for the GF1 and G2 cameras' hardware capabilities. The NTSC version of these cameras produces native 720p30 video streams in both AVCHD SH mode and in MJPEG HD mode. This patch boosts the peak bitrate of both video modes to over 50Mbps and in SH mode uses a remarkably short 3-frame GOP-size, recording 10 key frames per second. (This 3-frame GOP is used in PAL AVCHD SH mode as well, recording at 720p25.) Using such a high density of key frames enables the Fast Action 3-Frame GOP Patch to maintain excellent image quality while tracking rapid moving objects.
In addition, all GF1 and G2 cameras may now be freely switched between NTSC and PAL video modes, and all available user interface languages. This patch also enables Manual-exposure video modes, third party batteries, and eliminates 30-minute recording limits in AVCHD modes.
For version 2 of the Fast Action 3-Frame GOP Patch, I've prepared a choice of two INI settings files that differ only in the settings for the MJPEG 30p modes:
* For use with standard lenses, the standard patch will produce two types of MJPEG videos:
HD mode: 1280x720 HD videos with peak bitrates up to around 60Mbps (in 4:2:2 color on the GF1).
VGA mode: 960x720 iPad-compatible videos, with peak bitrates up to 30Mbps.
* For use with anamorphic lenses, the anamorphic patch supports two different squeeze ratios:
HD mode: 1920x810 videos optimized for 1.33X anamorphic adapters, with peak bitrates up to around 60Mbps.
VGA mode: 1920x720 videos optimized for 2X anamorphic adapters, with peak bitrates up to around 50Mbps.
Fast Action 3-Frame GOP Patch Settings Files:
These zipped INI files can be used to apply complete patch settings to firmware loaded into PTool 3.56d. To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware for either GF1 v1.22 or G2 v1.1. The settings contained in the INI file will automatically be installed in the "I" button at the bottom of the PTool main window.
Note that with the following PTool Settings Files, you may at any time re-install the original Panasonic 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.
View attachment LPowell - Fast Action 3-Frame GOP Standard Patch v2.zip
View attachment LPowell - Fast Action 3-Frame GOP Anamorphic Patch v2.zip
Read on for updated background information on these patches:
A Question of Standards
One of the inexplicable oversights in the AVCHD standard is the absence of any native 30fps non-interlaced HD recording formats. (To be precise, it would be 29.97fps to conform to the NTSC frame rate.) In the USA, 30fps progressive video is better suited than 24fps or 60fps for encoding into Progressive Segmented Frame 60i format for both NTSC broadcast and online video hosting purposes.
For the NTSC GF1 and G2 cameras, Panasonic created a revised "AVCHD-Lite" format which encodes 720p30 video into a non-interlaced 720p60 wrapper by duplicating each native frame. While this enables the GF1 and G2 to match the frame rate of the GH1's native 720p60 AVCHD mode, it needlessly duplicates each 30p video frame. Fortunately, Vitaliy Kiselev's PTool provides an optional "720p59.94fps->29.97fps" patch to convert the GF1 and G2 720p60 AVCHD mode into native 720p30 video, without loss of video data (the GF1 and G2 sensors record natively at 30fps).
When PTool's 720p30 patch is used on the NTSC GH1, however, it actually reduces the GH1 sensor's native frame rate from 60fps down to 30fps. As with the patched GF1 and G2, this produces native 720p30 videos in SH mode instead of the stock 720p60 videos. For videos destined for NTSC conformance, 30fps is a more convenient recording format than 60fps. In PAL mode, the 720p50 AVCHD mode is likewise converted to produce 720p25 videos.
How to Want What You Get
With these considerations in mind, I set out to optimize the patched 720p30 AVCHD video mode for the highest reliable bitrate. I also wanted to reduce the number of P-frames in each GOP (Group of Pictures) in order to improve the encoder's ability to record fast action sequences without muddying the details. 720p60 AVCHD videos have a GOP-length of 30 frames, recording a key frame only once every half second. In addition to undermining the encoder's action tracking ability, a 30-frame GOP produces choppy results when scrubbing through the video stream in a post-production editor. So long as you can maintain an adequate bitrate, the shorter the GOP-length the better.
In past attempts to optimize 720p30 AVCHD, I was stymied by the puzzle of how to maintain a usable 1080p24 AVCHD mode for the GH1 at the same time. When you use PTool to reduce 720p60 AVCHD down to 720p30, the encoder's bitrate drops by almost half. If you then attempt to increase the 720p bitrate, the 1080p bitrate is boosted too high and becomes unreliable. There was no way to adjust the two bitrates separately.
Recently, however, Vitaliy added two new patches to PTool that were suggested by cbrandin for use in his research on stabilizing Native 1080p24 recording. While these patches did not produce a reliable solution for Native 24p, they provided independent adjustments of 720p and 1080p encoding modes. Working on some rather speculative hunches, I managed to use the patches on optimized tweaks of PTool's "C" settings to simultaneously boost 720p30 bitrate while stabilizing 1080p24 bitrate safely below the point where buffer overflow causes sporatic recording failures.
Not the Only Bits that Rate
What was even more impressive was discovering that I could optimize 720p30 video down to a remarkably short 3-frame GOP-length, without even a hint of instability. This produces a key frame every tenth of a second, combining fast action tracking with over twice the compression efficiency of the 720p30 MJPEG encoder. For highly detailed scenes, use of optimized "C" settings produces average bitrates of around 50Mbps with peak bitrates up to 55Mbps, for both 720p30 SH and (on the GH1) 1080p24 FHD modes. Since there are now only half as many frames in 720p videos as before, boosting the 30fps bitrate to 50Mbps produces compression quality comparable to what would be produced by 100Mbps at 60fps. I believe this is the highest reliable AVCHD bitrate that remains safely within the write-speed capabilities of Class 6 SD cards and higher. In addition, AVCHD videos produced by this patch are reviewable via in-camera playback.
While the GH1 1080p24 FHD mode is still confined within a 60i wrapper to maintain stability, this 50Mbps AVCHD patch produces consistently higher average bitrates than my Reliable In-Camera Playback Patch. The 1080p24 FHD mode is not quite as reliable, however, when used with an auto-focus lens in AFS rather than Manual-Focus mode. For well-lit, extremely detailed subjects (e.g. foliage), I'd recommend using a half-shutter press to get focus-lock, then switch the GH1 to MF mode just before pressing the video button. (This applies only when using auto-focus lens in 1080p24 FHD mode. I've found 720p30 modes to be absolutely reliable under all operating conditions.)
On the MJPEG side, I've paired this 50Mbps AVCHD 3-Frame GOP Patch with my previously published 60Mbps MJPEG 4:2:2 Color Patch:
http://dvxuser.com/V6/showthread.php?t=216238
While it does not produce MJPEG videos that can be viewed in-camera, I believe the 60Mbps average bitrates of this patch's MJPEG videos are close to the highest that can be reliably recorded on Class 6 SD cards. Particularly in low-light situations, I've found this 60Mpbs MJPEG patch to maintain considerably higher bitrates than the AVCHD encoder, along with higher quality 4:2:2 color depth (on GF1 cameras) for post-production grading purposes.
Full Speed Ahead
The Fast Action 3-Frame GOP Patch v2 is compatible with both GF1 and G2 cameras, and is switchable between NTSC and PAL modes. My thanks once again go to Vitaliy Kiselev, for his pioneering work on PTool, and to cbrandin for his invaluable Stream Parser tool.
*** WARNING ***
Unfortunately, there is a reliability issue with using short GOP-lengths in the AVCHD encoder. Under extremely dim illumination, video bitrate can fall below 5Mbps. If this condition persists for longer than about seven seconds, the AVCHD encoder may terminate the recording, leaving a zero-length file. This malfunction can occur with any AVCHD patch that uses a reduced GOP-length, and the only known way to guard against it is to make sure your subject is adequately lit at all times.
The Fast Action 3-Frame GOP Patch will not work properly with previous versions of PTool. The best way to insure that you have the latest PTool release is to download it directly from the following link:
Download PTool here: http://www.gh1-hack.info/ptool3d.zip
Fast Action 3-Frame GOP Patch Settings Files:
These zipped INI files can be used to apply complete patch settings to firmware loaded into PTool. To use, unzip the INI file into the same folder as the PTool application. Launch PTool and load the firmware for either GF1 v1.22 or G2 v1.1. The settings contained in the INI file will automatically be installed in the "I" button at the bottom of the PTool main window.
Note that with the following PTool Settings Files, you may at any time re-install the original Panasonic 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.
View attachment LPowell - Fast Action 3-Frame GOP Standard Patch v2.zip
View attachment LPowell - Fast Action 3-Frame GOP Anamorphic Patch v2.zip
Last edited: