Personal View site logo
Make sure to join PV on Telegram or Facebook! Perfect to keep up with community on your smartphone.
ST: MJPEG Encoder team
  • This one is easy.

    Anyone with systematic approach can participate.

    I need very stable MJPEG settings (for table) from default bitrate up to highest possible (4-5 steps):
    a) 720p mode
    b) 720p upscaled to 1080p
    c) 720p upscaled anamorphic
    d) 480p upscaled
    e) 480p upscaled anamorphic
  • 36 Replies sorted by
  • EDIT: Now that PTool 3.62d supports MJPEG frame widths greater than 1920 pixels wide, the GH2 can be patched to support 2x anamorphic adapters natively in 4:3 VGA video mode. For 1.33X anamorphic adapters, HD mode provides native support as well. Videos shot in the following anamorphic frame sizes with the appropriate anamorphic lenses will be played back at the correct aspect ratio, and will not require post-production stretching:

    HD 720p mode:
    1.33x aspect ratio: 1920x810

    VGA 480p mode:
    2.0x aspect ratio: 2160x810

    Standard non-anamorphic modes:

    HD 720p mode:
    1.0x aspect ratio: 1920x1080

    VGA 480p mode:
    1.0x aspect ratio: 960x720
  • @LPowell

    All I want is one anamorthic mode for 720p and one for 480p, not many.
  • EDIT: see post above for recommended standard and anamorphic MJPEG frame sizes.
  • @LPowell

    Most users do not have any anamorphic lenses at all.
  • @Vitaliy

    For this test can we vary Q and T or just T?
  • @mpgxsvcd

    You can vary anything in Q and T :-)
  • Is this work to determine which MJPEG resolution presets are available in the release candidate of PTools? If so, I hope we see a range of settings to cover every type of anamorphic lens from 1.33x to 2x :)
  • Vitaliy_Kiselev
    >Most users do not have any anamorphic lenses at all.
    thank you
    most users want no anamorphic lenses ;)
  • @EOSHD
    I don't understand your question.
  • Thank you M-Team!
  • I haven't finished all of my testing yet. However, I have discovered a few interesting things. They are below.

    1. Upscaling improves resolution upto a point. For example if you upscale 640x480 by 2x to 1280x960 it will have greater resolvable resolution. However, upscaling 720p to 1080p does not improve resolvable resolution. It appears that the MJPEG mode has a maxim resolution that is somewhere around 720p. Upscaling past that does not improve things. However, upscaling to that can be beneficial.

    2. ISO has a significant impact on stability for MJPEG. You can record at ISO 160 all day with settings that produce 180+ mb/sec all day. Try recording in S mode in a dark room with Auto ISO on. It will push the noise really high and anything above about 110 mb/sec will fail.

    3. Using T = 4 for T1 through T4 will always produce failures with really high bit rates and high ISO shots.

    4. Q1 = 900 was the highest I could go for 1080p upscaled videos. However, this was with lower ISOs. It will fail with higher ISOs with that setting.

    Here are the settings I am using so far for high bit rate with stability. Remember these are all upscaled resolutions. The settings can go much higher for lower resolutions and lower ISOs. I wanted to get the highest resolutions out of the way before I tested the lower ones.

    1920x1080 with the 720p setting(This setting will record for all ISO 3200 and below shots. It only fails if you force the camera to go above ISO 3200. The files are usually around 110 mb/sec

    Q1-Q4 = 650,550,450,350
    T1-T4 = 4,12,24,32


    1280x960 with the 640x480 setting

    Q1-Q4 = 800,700,600,500
    T1-T4 = 4,12,24,32
  • Using the settings below produced the highest completely stable bit rates for 1080p that I could get(bit rate was just over 90+ mb/sec). There is no in camera playback with these settings of course.

    Q1-Q4 = 600,500,400,300
    T1-T4 = 4,12,24,32

    If anyone can get these settings to produce a write failure please let us know.
  • @mpgxsvcd Very interesting results with ISO-dependency. I'll see if I can break my 100Mbps GH2 1080p MJPEG patch at high ISO settings. On the GH1, I strongly suspected that all entries in Table 4 were set to 1, i.e. no quantization at all. In MJPEG terms, this is overkill and will produce suboptimal compression. In some GH1 patches, I set T4 to 4 to throw as much bitrate as possible at the murkiest areas of the image. Since the GH2 appears to have much better low-light performance than the GH1, using Table 4 on the GH2 may run the risk of overemphasizing fine detail noise.

    EDIT: Tested 100Mbps 1080p MJPEG patch @ ISO 3200, using PappasArts test chart. 12 trials, zero failures. Hits MOV file size limit at 1.85GB after recording for 2:45. Average bitrate was about 95Mbps. Here's the MJPEG settings:

    E1 Quality=400
    E1 Table=24
    E2 Quality=200
    E2 Table=36
    E3 Quality=175
    E3 Table=48
    E4 Quality=150
    E4 Table=4

    I tuned the four Table settings to produce a consistent bitrate of 90-100Mbps across a wide range of exposure levels. Note the use of Table 4 in E4 rather than E1. This patches the encoder to use Table 4 as a last resort at the lowest quality setting, rather than starting off with Table 4 at the highest quality setting.
  • Cool Stuff LPowell. I didn't know about using E4 = 4. Was this testing done with the GH1 or the GH2?
  • Using E4 T = 4 worked. I was able to increase the Quality level a bit and still maintain stability. Great tip. Thanks LPowell.
  • so E4 table was good at 4. What about E1 table E2 table E3 tables? Should we use LPOWELL's tables with PMGXSVCD's Qualities?
  • @cosimo

    So far it looks like the settings below produce the highest bit rate 1920x1080 MJPEG without any write failures.

    Q1-Q4 = 600,500,400,300
    T1-T4 = 12,24,32,4
  • @ishvar
    This is strike team topic, not MJPEG questions topic.
  • @mpgxsvcd - These setting are producing amazing low-light results, shadow quality. I wonder if 1920/1080, while not producing higher res than 720, is producing a better grain feel at 1080.
  • Is anyone else messing around with mpgxsvcd's setting's with 3.62?

    Q1-Q4 = 600,500,400,300
    T1-T4 = 12,24,32,4

    If not, please do try! Incredible.
  • I have done some testing with the new MJPEG resolution settings(ie: greater than 1080p). Here is what I have found so far.

    1. 2048x1152 was the highest resolution I could use without any write errors with my Transcend Class 10 SD card. I compared it to a similar still taken from a 1080p AVC-HD file and the difference in resolvable resolution is obvious. It is not that the 2048x1152 looks bad. It just doesn’t look any better than the 1280x720 MJPEG file.

    2. Using very high resolutions greatly reduces the Quality setting that you can use. I was having stability issues even with the relatively modest settings below.

    400 12 300 24 200 32 100 4

    3. 1792x1344 was the highest resolution I could get to be stable for the 480p MJPEG upconvert. It actually made the 480p mode look good. However, it still did not appear to have more than about 700 lines of vertical resolution. However, I haven’t been able to accurately test the resolvable resolution with a rez chart yet so that number is just an estimate.

    In my opinion setting you should just leave the 720p resolution alone and increase the 480p resolution till it is between 700 and 800 vertical pixels. Anything more than that and you are just risking stability issues. If you stick with those resolutions then the settings below should be stable for decent class 10 cards.

    600 12 500 24 400 32 300 4

    The 1080p AVC-HD file is there now.
    2048x1152 MJPEG from 720p.png
    2048 x 1152 - 4M
    1080p AVC-HD.png
    1920 x 1080 - 3M
  • @mpgxsvcd Thanks for reporting the results of your testing. Perceived resolution will always be a limited by the optical resolution of the lens filtered through the camera's optical low pass filter (OLPF) and then digitized and downsampled from the image sensor. While we don't have resolution measurements for the GH2, the BBC has tested the AF100 and concluded that its effective resolution is about 750 lines. If we assume the GH2 performs similarly, this 750-line optical resolution will set a limit on the perceivable resolution of higher digitized resolutions.

    In most cases, it's preferable to resample an image to the desired resolution after all post-processing has been done to the image in its original resolution. However, in this case, the MJPEG encoder degrades the precision of the color data in the process of converting it from RAW 12-bit RGB data into 8-bit YCC in 4:2:0 color depth. For that reason, it is preferable to program the camera to scale the image to the desired resolution before it is degraded by the MJPEG encoder. While the difference in image quality may not be readily perceivable in most cases, as long as the encoder has adequate bitrate to encode the image at high quality, it will in no case be worse.

    As you've determined, however, SD card write-speed issues impose a limit on the maximum bitrate that can be made available to the MJPEG encoder. With the GH1, I found that high vertical resolutions (up to 1080) were less stable than high horizontal resolutions (up to 1920). If this is also the case with the GH2, it may turn out that MJPEG resolutions higher than 1920x1080 are primarily useful for producing horizontally stretched aspect ratios for use with anamorphic adapters.
  • > If we assume the GH2 performs similarly, this 750-line optical resolution will set a limit on the perceivable resolution of higher digitized resolutions.

    AF100 and GH2 are two different beasts in this regard
    AF has very strong AA filter placed before high resolution sensor.
    GH2 AA filter is made for full sensor resolution.
    So, factual resolution is limited by sensor mode.

    If in the future we'll understand how to use 4Mp 40fps mode it can be very interesting to look at the results.
  • Here is a sample video that shows 720p slow motion along with 1 clip of 4mp 40 FPS. The 4:3 clip is obviously the still image clip. I rendered the video to 1080p and the stills clips really don't look that much better than the 720p clips. I bet that would change if I rendered to 4K instead. I don't have an editor that can do that though.