60Mbps MJPEG Class 6 SD Card Patch

Lpowell

Veteran
Panasonic recommends Class 6 or higher SD cards for capturing HD video with GH1 and GF1 cameras. However, many users have reported success with recording videos on Class 6 cards at far higher bitrates than the maximum 17Mbps supported by the unpatched MJPEG encoder. In the course of developing my 35Mbps MJPEG In-Camera Playback Patch, I experimented with bitrates well over 50Mbps, though of course videos with such high bitrates would not play back in camera. (More details here: http://www.dvxuser.com/V6/showthread.php?t=215624 )

High bitrates can deliver near flawless MJPEG image quality, and in situations where in-camera playback is not required, obtaining maximum usable bitrates from Class 6 SD cards is highly desirable. Unfortunately, it has been difficult to identify reliable MJPEG settings that are safe from sporatic and unpredictable recording errors.

Fortunately, Tom's Hardware recently completed performance tests of a wide range of SD cards, from Class 4 to Class 10. The results of their record speed tests can be found here:

http://media.bestofmicro.com/F/F/178107/original/sdhc-transfer-write.png

The slowest of the Class 6 cards had a minimum write speed of 8.4MBytes per second, equal to 67Mbps. Reserving a 10% headroom margin for safety, I concluded that Class 6 SD cards should be capable of recording video at a mean bitrate of 60Mbps.

In order for a high bitrate to deliver superior image quality, the quantization tables used by the MJPEG encoder must record fine-grain details with a high degree of precision. Recent research lead by modulr has shown that JPEG Quality Levels up to 100 can be achieved with Class 10 SD card bitrates over 70Mbps:

http://dvxuser.com/V6/showthread.php?t=215785

A number of JPEG image quality studies have shown, however, that Quality Levels above 95 are rarely distinguishable from the original image:

http://en.wikipedia.org/wiki/JPEG#Sample_photographs

JPEG Quality Levels approaching 100 are especially desirable for preserving subtle details in low-light images. In my experience, with well-lit, complex scenes, Quality Level 90 and above produces near flawless images, even at high magnification. In order to produce optimal bitrates for low-light images, the Quality Levels of highly detailed images must be constrained to keep their bitrates below 65Mbps.

After some experimentation, I've arrived at the following MJPEG patch settings for 720p @ 30fps in 4:2:2 color mode. This has consistently produced images with Quality Level 90-100 at bitrates very close to 60Mbps:

  • MJPEG E1 Quality = 280
  • MJPEG E1 Table = 4
  • MJPEG E2 Quality = 250
  • MJPEG E2 Table = 10
  • MJPEG E3 Quality = 225
  • MJPEG E3 Table = 24
  • MJPEG E4 Quality = 200
  • MJPEG E4 Table = 48
With this patch, file compression ratio is around 6:1, with a typical MJPEG recording duration of 4 minutes per take. The bitrate will naturally drop with extremely dark or overexposed images, as Quality Level approaches 100. The maximum bitrate I've seen was close to 64Mbps with Quality Level 90.

On the AVCHD side, I've paired this 60Mbps MJPEG Class 6 SD Card Patch with my 50Mbps AVCHD 3-Frame GOP Patch:

http://dvxuser.com/V6/showthread.php?t=222791
 
Last edited:
Sample thumbnails from 60Mbps MJPEG Class 6 videos

Sample thumbnails from 60Mbps MJPEG Class 6 videos

Here are full-size thumbnail images from 60Mbps MJPEG videos recorded on Class 6 Transend 16MB and 4MB SD cards. I have also tested Class 10 SanDisk 16MB SD cards, with no errors encountered on any of the cards.

Smooth Gradient Flower Arrangement (Quality Level 98, Compression Ratio 6.2:1):
P1000905.jpg


High Detail Foliage (Quality Level 94, Compression Ratio 5.8:1):
P1000936.jpg


Extreme Low-Light Chrome Briefcase (Quality Level 100, Compression Ratio 8:1):
P1000899.jpg
 
Last edited:
hi I have a question: I have hacked my gh1 and shoot only in 24p native with acvhd. I have not tried to shoot with mjpeg mode yet.
will putting these settings that you have here affect my shooting in acvhd mode? Or will this only affect the mjpeg mode if/when I set my camera to shoot in that mode?

thanks
 
I know the card speed issue has been discussed quite a bit already, but anyway here´s my latest experience.

I used to have a class 4 16GByte sandisc xtreme II card. It was easily fast enough to be used in the unhacked Gh1. Now that I hacked the GH1 I bought two 8 GByte sandisc xtreme III (30MB/s) cards. Then I tested all three of them and guess what: they´re all exactly equally fast @ 15Mb/s sustained.

Bummed me out.
 
I'm going to try this out for use in low light. We'll see how it goes! I'm combining this with AVCHD C settings. Other than:

MJPEG E1 Quality = 280
MJPEG E1 Table = 4
MJPEG E2 Quality = 250
MJPEG E2 Table = 10
MJPEG E3 Quality = 225
MJPEG E3 Table = 24
MJPEG E4 Quality = 200
MJPEG E4 Table = 48

Are there any other settings that need to be changed for this MJPEG patch? Since you don't have a settings file for just this patch.
 
I tried these settings in my GH1 and I got extremely unreliable results. Card speed errors occurred frequently, on scenes that should not have been detailed enough to trigger such errors.
 
Back
Top