Stable 35Mbps low-light MJPEG patch with in-camera playback

Lpowell

Veteran
In an earlier post I detailed PTool settings for achieving stable MJPEG bitrates up to 30Mbps, producing high-quality videos which play back in-camera without read errors:

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

While those settings produced good results with decent indoor lighting, bitrates fell under 20Mbps in low light or highly detailed daylit scenes.

With the following settings I've optimized MJPEG encoding to produce a stable bitrate of 35Mbps across a broad range of illumination, from dim incandescence to shaded daylight. I've found this to be close to the highest MJPEG bitrate that can be reliably played back in-camera:

  • MJPEG E1 Quality = 150
  • MJPEG E1 Table = 86
  • MJPEG E2 Quality = 130
  • MJPEG E2 Table = 56
  • MJPEG E3 Quality = 115
  • MJPEG E3 Table = 26
  • MJPEG E4 Quality = 100
  • MJPEG E4 Table = 4

These settings work at the standard 720p/30fps MJPEG rate with the enhanced 4:2:2 color patch. I've recorded dozens of test videos on both Class 6 Transend and Class 10 SanDisk 16Gb SD cards without error.

In seriously underexposed conditions, I've recorded videos at 30Mbps with low noise and high contrast at ISO 800. Image quality also holds up well in highly detailed daylit foliage rendered without noticeable mud or smearing. While finer image quality can be achieved in brightly lit scenes via dramatically higher bitrates, I believe these settings produce near optimal quality without sacrificing in-camera playback.

I've published an easily installable settings file, combining my 40Mbps AVCHD High Reliability Patch with my 35Mbps MJPEG In-Camera Playback Patch, in the pinned Settings Sharing thread:

http://www.dvxuser.com/V6/showpost.p...80&postcount=5
 
Last edited:
Very nice! I'm going to try these out. Maybe you should put them in the stable settings thread.

Chris
 
JPEG thumbnails of 35Mbps MJPEG videos:

P1000633.jpg


P1000622.jpg


P1000643.jpg


P1000632.jpg
 
Last edited:
Just loaded them. Works inside ok. I'll test them outside on the lawn of card speed death in the morning.
 
These settings work at the standard 720p/30fps MJPEG rate with the enhanced 4:2:2 color patch. I've recorded dozens of test videos on both Class 6 Transend and Class 10 SanDisk 16Gb SD cards without error.

Very good news. I am convinced that although is wonderful to have the highest bitrates to play with these codecs won't perform if you overtax them. There has to be an optimum setting. Even if it is in the lower end of expectations. I would be very happy with a stable 30/35 Mbps, 4:2:2, 720p24 mjpeg to work with. Good job lpowell.
 
I ran several tests trying to optimize lpowell’s settings. However, I came to the conclusion that his settings are pretty much the limit of stability for 720p 4:2:2.

I tested the following settings and I found that anything greater than a 42 megabyte 10 second file(Approximately 36 mbit/sec) would fail playback in the camera. Lpowell’s settings produce a 42 megabyte 10 second file when I record the star chart at close range.

Q1 Q2 Q3 Q4 T1 T2 T3 T4

150 130 115 100 86 56 26 4
150 150 150 150 4 4 4 4
150 150 150 150 24 24 24 24

The idea behind the test was that if the maximum bit rate was stable with a higher T setting then it still should be stable with a lower T setting since the T settings are only supposed to affect the difference between the min and max. That appears to be incorrect because the files from the settings with T1-4 set to 4 were more than 1.5 times the files with lpowell’s settings.

The files from the settings where T1-4 was set to 24 were closer to files with lpowell’s settings. However, the star chart produced a 44 megabyte 10 second file. That was enough to prevent in camera playback. However, all other files played back ok.

I am going to try the settings below but I think that lpowell’s are pretty much the ideal if these don’t work. Great job lpowell.

Q1 Q2 Q3 Q4 T1 T2 T3 T4

150 150 150 150 86 56 26 4
 
I tested the settings below and they were completely stable as well. Nothing went above 42 megabytes for a 10 second file. It did bring all of the bit rates a little closer together though. Therefore, I think I will just stick with these settings.

Q1 Q2 Q3 Q4 T1 T2 T3 T4

150 150 150 150 86 56 26 4
 
I think I will just stick with these settings:

Q1 Q2 Q3 Q4 T1 T2 T3 T4
150 150 150 150 86 56 26 4
Setting all Q1-4 patches to 150 should produce stable videos. However, low-light bitrate will be reduced below 30Mbps and image quality will suffer. Compare these two JPEG thumbnails:

Q1-4: 150 130 115 100; T1-4: 86 56 26 4; 422 color
Measured Bitrate: 30Mbps; Estimated Quality Factor: 90; Compression Ratio: 23:1
P1000646.jpg


Q1-4: 150 150 150 150 ; T1-4: 86 56 26 4; 422 color
Measured Bitrate: 24Mbps; Estimated Quality Factor: 90 Compression Ratio: 28:1
P1000648.jpg
 
Last edited:
Setting all Q1-4 patches to 150 should produce stable videos. However, low-light bitrate will be reduced below 30Mbps and image quality will suffer. Compare these two JPEG thumbnails:

Q1-4: 150 130 115 100; T1-4: 86 56 26 4; 422 color
Measured Bitrate: 30Mbps; Estimated Quality Factor: 90; Compression Ratio: 23:1


Q1-4: 150 150 150 150 ; T1-4: 86 56 26 4; 422 color
Measured Bitrate: 24Mbps; Estimated Quality Factor: 90 Compression Ratio: 28:1

I thought the Q values determined maximum bit rate and the higher the value the higher the maximum would be? All of the testing that I have done has shown that setting the 4 Q values to the same number will give you a higher bit rate than making the Q values decrease. Have you not had the same experience?

The files I tested were slightly larger when I used all four Q values equal to each other.
 
I thought the Q values determined maximum bit rate and the higher the value the higher the maximum would be?
It appears to be a bit more complicated than that. I suspect the Q values set internal bitrate levels that determine which of the specified JPEG lookup tables (T values) are used. However, the Q values are obviously not scaled in Mbps and I don't have even a rough formula for how they factor into a video's measured bitrate.
 
It appears to be a bit more complicated than that. I suspect the Q values set internal bitrate levels that determine which of the specified JPEG lookup tables (T values) are used. However, the Q values are obviously not scaled in Mbps and I don't have even a rough formula for how they factor into a video's measured bitrate.

So is it not correct when Ptool says higher Q values = better quality?

Thanks for all of your help by the way. Your settings are excellent for both stability and quality.
 
Tested settings today and happy to report all went well. No card write errors and all clips played back in camera using class 6 cards. All clips reported in low-20's to mid-30's Mbit range. About a 5-10 Mbit improvement over factory settings. Noise is still there but noticeably reduced. I still think the AVCHD stuff looks better and cleaner but it's nice to finally have an improved, stable MJPEG. I never could get the high bit rate MJPEG even close to reliable, making it useless to me.

As a side note, would these settings work with 24 fps? Would there be a bit rate reduction? 24 fps is more useful to me but I have heard it is just dropping frames. Not much on the boards about it as everyone seems to be testing at stock 30 fps.

Thanks.
 
Easy... In PTool use "B" settings for class 6 cards, "C" settings for class 10 cards, "D" settings (not in PTool but 60,62,70) if you have the sooper dooper Sandisk or Panasocic class 10 $$$ cards. ...and do not, repeat, do not check Native 24p/25p. A ton of people have reported total success with these settings.

Chris
 
i have 58,66,73 set with 24pn and gop 12 /sandisk extreme III class 10 16gb ..for me its 90-95% stable..and im fine with that..
 
Here are thumbnails comparing MJPEG 720p/30fps @ 33Mbps to AVCHD 720p/29.97fps @ 17Mbps. The latter bitrate is comparable to a 59.94fps AVCHD video @ 34Mbps. I used PTool "C" settings to record the AVCHD video.

MJPEG keyframe:
MJPEG_0668.jpg


AVCHD keyframe:
AVCHD_0008.jpg


MJPEG keyframe @ 500% magnification:
MJPEG_0668x5.jpg


AVCHD keyframe @ 500% magnification:
AVCHD_0008x5-1.jpg
 
Last edited:
Lpowell,

Can you add your settings to the "Stable Settings" thread. Several people have confirmed that they are 100% stable. Great job by the way.
 
Back
Top