Shotcut Export fails to reach my target bitrate when exporting to libx264 or libx265

I have a small TIFF image sequence animation, 8MB per image. The sequence is 6 images in total. I’m doing some exports and I came across some problems while exporting.

With the Quicktime Animation profile, I get a very good quality export, about 58Mb/s bitrate for a 1080p 24fps video.

However, I also need an H264 or H265 mp4 export that’s smaller, with a bitrate of about 30Mb/s. The problem is that regardless of the settings, I cannot get a bitrate higher than 17Mb/s for H265 and 11Mb/s for H264. At this point, I feel like my hardware isn’t suited for the current version of the software (I’m on 20.04.12), but can someone look at the settings I’ve entered to see if I haven’t screwed up something there?

I’m sharing images of my settings:

Sorry for the awkwardly glued screenshots, I’m new and must work with the limitations of noobness.

Codec > Buffer size is too small. Do you really need to use constant bitrate? Probably not, but if so you should increase that. I cannot tell you exactly what it needs to be because it depends on the device or channel that demands constant bitrate and its requirements specification. That is why I asked. If you are unsure you need it, consider Average Bitrate. Otherwise, if you insist on using constant but do not know what you need for buffer size, increase it until the seconds value in () reaches near 1.000s.

I changed it to Average Bitrate, but it still outputs a very low bitrate on H265, somewhere around 13Mb/s.

While 13 Mb/s is lower than your goal it is not “very low” for H.265. It also depends on the frame rate and the complexity of the images and motion. There might be x265 defaults that need overriding as well, but I do not have any further suggestions. Maybe someone else can.

If I’m tracking this right, there are 6 pictures played over an undisclosed period of time (guessing around a minute total with narration?), which means very little motion on screen.

I’m pretty sure GOP 0 is invalid and will default to 250. In this scenario, x264/265 only need to encode the picture once, and the rest of the frames will be P-frames that basically say “make no changes to the last frame” which takes very few bits. This is what makes these codecs so efficient. For video this static, it probably doesn’t need a full 30Mbps to do a great job. There isn’t enough movement to chew up higher bitrate.

This is in total contrast to QuickTime Animation. That codec is lossless, extremely inefficient at that, and all-intra, meaning a total reencoding of every frame rather than saying “reuse the last frame”.

Basically, if your export looks good as-is, then it is good.

Actually, it is treated same as 1, from the export log:
x265 [info]: Keyframe min / max / scenecut / bias: 1 / 1 / 0 / 5.00

Bummer, that’s what I get for guessing while I’m mobile and not at a computer to test it. :flushed:

To the OP, the general idea still stands. QuickTime Animation is lossless with inefficient compression. H.265 is lossy with very efficient compression. If the export file sizes are different by a factor of four, that is somewhat within reason.

As Dan said, the buffer size is too small. There’s also the option of adding minrate=30M and maxrate=30M to the Other tab, but this has potential to waste bits if they aren’t needed. A lower minrate could be useful.

There’s also the option of doing constrained VBR, which might be the best of both worlds for you… highest quality with bitrate cap.

This topic was automatically closed after 90 days. New replies are no longer allowed.