Variable framerate auto-converted video has too much bitrate

What is your operating system?
Windows 10 64-bit

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
20.10.31 64-bit

Can you repeat the problem? If so, what are the steps?

  1. Try to add a variable framerate video but with low/medium bitrate (in my case 11956kbps data rate / 12052 total bitrate)
  2. A prompt asks you to choose the quality. Choose any quality including the lowest, medium/good.)

In my case, after choosing the lowest conversion quality, the resulting file had 49799kbps data rate / 50309kbps total bitrate - almost 5 times higer.
The size of the converted file was 4 times larger.

Shotcut should not make the auto-conversion bitrate much higher than original, especially if the lowest conversion quality is selected from 3 levels.

Note - the VFR is between 29.57 and 30.47, average 29.99. Not much variability here.

The VFR conversion routine uses libx264 CRF 11 rather than specifying a bitrate. Reasons for this:

  • Re-encoding a low bitrate file into another equally low bitrate file can produce enormous generational loss. This is mitigated by using significantly higher bitrate for the conversion.

  • Input files could range anywhere from DVD resolution to 8K. CRF 16 would look fantastic at 8K but less fantastic at DVD resolution, hence the overcrank to CRF 11 since low-resolution inputs are common.

  • The converted video must survive one more generation of loss while going through the export process, so it needs to retain more detail than usual.

  • Detecting the bitrate of the source file is actually extremely difficult. For instance, Netflix encodes at different bitrates per camera shot in order to maximize savings, so there is no single bitrate that would gracefully apply to the entire video.

One of the goals is to do minimal harm to the user’s video. Perhaps a little more resolution-dependent logic could be baked in to change CRF according to resolution, but bitrate-dependent logic is not a robust strategy due to generational loss at lower bitrates. CRF mode is very good at using whatever bitrate it needs to cause minimal harm.

Here’s the conversion routine in source code if interested:

1 Like