Wikia

Magic Lantern Firmware Wiki

Bit rate

Talk18
321pages on
this wiki

AVC h.264 Bitrate control Edit

H.264 encoder works in two quality modes, selectable with mvrFixQScale(int16_t *).

  • VBR (QS57rytrure named mvr_config (dryos.h) or AJ_Movie_CompressionRate_struct (0x67BC in 550D). Some of these settings are only read when starting recording (like OptSize parameters) or continuously during recording (like QScale). Changing certain settings during recording will result in ERR70 (e.g. QSCale/CBR mode, or changing QScale by more than 1 step at a time).

Bit rate is adjusted in sub_FF1AAD00(width, fps, Sv) from CompressionRateAdjuster.c (550d/108).

When should I use bitrate control? Edit

ML Comp 24p CBR1.8 vs CBR1.0 rgb

Comparison: CBR1.8 vs CBR1.0, by PICMENTION

  • If you want to record more than 12 minutes in 4 GB, or if you have a slow card (Class 4 or Class 2), use CBR mode with a scaling factor less than 1, or QScale with low negative values (e.g. -4). For example on a 16 GB Card you can achieve over 200 min recording with qscale -1 (this has been a real testing with slow action sequence).
  • If you want to get fewer compression artifacts, you may try CBR mode with a scaling factor higher than 1. The difference is mostly visible if you do heavy color grading. [link needed] You will need a fast card to handle the high bitrates; cheap Class 10 Cards may not be fast enough for the high bitrate.

Note: increasing bitrate will not reduce other artifacts like moire and aliasing, neither will influence the chroma subsampling.

Available Bitrates in Magic Lantern Edit

CBR Edit

This mode uses (almost) constant bitrate, and therefore it's much more robust than QScale (less likely to stop recording due to sudden increase in frame complexity).

The exact bitrate achieved with CBR is still dependent on frame complexity. CBR implementation still uses QScale as backend, and this parameter is limited to -16...+16. In particular, when the scene does not contain too many details, QScale will reach -16 and the actual bitrate can be much lower than the one requested. This happens in the CBR 3.0x test below. If the requested bitrate is higher than your card can handle, recording will stop as soon as frame complexity increases.

In Magic Lantern, you can set a scaling factor for the default bitrate. CBR 1x is identical with firmware default setting.

The following bitrate tests were done by DorianVasco with Bitrate Viewer, on a test scene on the desk without a lot of movement.

CBR-0,1

CBR-1,0

CBR-2,0

CBR-3,0

QScale (VBR) Edit

This mode is constant quality, variable bitrate (VBR). You can set QScale value from -16 to +16, and lower numbers will result in higher bitrates.

The exact bitrate varies a lot with frame complexity, and there is no direct relationship between QScale and the actual bitrate.

You will see a birate meter near the recording dot (550D/60D/500D). Use it to see the actual bitrate, which is displayed as:

  • instantaneous (for last second)
  • average (for the entire movie)

Note that unexpected changes in frame complexity may increase the bitrate to very high values, and the camera will stop recording.

In many cases, QScale settings around -8 will give results close to the default bitrate.

Cards Edit

dSD cards (for 550D / 60D / 600D / 500D / 1100D) Edit

Card Max bitrate
(without recording stopping)
Notes
Sandisk SDHC Extreme Pro 45MB/s CBR 1.4x, 60-65 Mbps [1] [2] One of the fastest cards available, but write speed is limited by a small buffer in the camera according to our card benchmarks.
Transcend Class 10 SDHC CBR 1.3x, 55-60 Mbps [3] Very good budget option [4] [5] [6] but you need to re-format it periodically [7]. Tested on 550D and 60D.
Transcend Class 10 UHS 45MB/s

CBR 1.4x (60-65 Mbps) , Global Draw On + audio enabled


CBR 2.8x (135-145 Mbps), Global Draw Off + audio disabled ||Tested on 550D

Samsung SDHC Plus class 6 CBR 1.3x (55-60 Mbps), Global Draw On with audio enabled
CBR 1.8x (75-80 Mbps), Global Draw Off with audio disabled

Tested on 600D [8].

Sandisk SDHC Extreme Pro 95MB/s CBR 1.5x, Global Draw On with audio enabled.
CBR 2.4x, Global Draw Off with audio disabled
Tested on 600D
Sony Expert SDHC 94MB/s

CBR 3.0x, HDR on (1280x720), audio disabled || Tested on 600D


max CBR 2.3x (1920x1080) 30fps, audio disabled (101.6 Mbps) on Sony Expert SDHC 8Gb || Tested on 60D

Microcenter 32GB C10 SDHC 15MB/s "120Mbps"
T3i-Micro32GBC10
These CBR values worked fairly well. Created motion to push qscale to -16 and fill the buffer. It topped out at 75%. Higher values resulted in video stop <30".

CF cards (for 5D Mark II / 50D) Edit

Card Max bitrate
(without recording stopping)
Notes
Sandisk Extreme UDMA 60MB/s CBR 160%, 75-80 Mbps [9]
Transcend CF UDMA 600x 87MB/s CBR 150%, 65-70 Mbps [10]

Test firmware Edit

  • For 5D2 2.0.8: Download it from this ml-devel post. It only contains QScale control.
  • For 5D2 2.0.4: use AJ 5.6 or later Download
  • For 550D, 60D and 600D: use the Unified version of Magic Lantern. QScale option may not be available in the menu because it's not reliable.

Test videos Edit

Around Wikia's network

Random Wiki