Shotcut keeps exporting highly compressed lossy X.264 videos

I am having an issue with the Shotcut video export. I am trying to export a lossless x.264 video. I selected the x.264 profile under lossless and made sure quality was set at 100% for Quality Based VBR,

I am using a GTX 1080 as my hardware encoder. Despite the above settings, it still exports a highly compressed 3 hour 1080p video that is 2.5 gigs in size when it’s supposed to be several hundred gigs in size.

Could anyone kindly let me know what I am doing wrong? I even tried uninstalling and reinstalling shotcut, and it’s still doing this.

Don’t use the hardware encoder when doing lossless. Many GPUs don’t support lossless encoding.

EDIT: Although, if your chip is GP104 series, it should support lossless encoding. So that’s odd.

1 Like

Does this mean the file size is smaller than expected? Or does it mean the visual quality is poor?

Note that the H.264 preset uses GOP 25 instead of being all-intra, which can often bring the file size down significantly with no quality loss.

See:

In order to do lossless with NVENC you need to add to add to Export > Other an additional line (not on the same line as anything else)
vtune=lossless

2 Likes

Smaller than expected and poor visual quality

That was it. Setting it to 99% fixed it which isn’t true lossless but now I get what the problem is. Also the person below you has another suggestion: for lossless I need to add “vtune=lossless” to other in advanced settings.

So I was able to accomplish my export at the quality level I wanted. Thank you again @Austin and @shotcut. Shotcut is awesome and a great tool in my amateur stereography pipeline!

1 Like

@Austin and @shotcut

I’m running into trouble again. For the problem in this thread, it was initially solved for the project I was working on when I set quality to 99%. It gave me a very lightly compressed 110 gig 3 hour movie file that I could then feed into my neural network for further processing. And I did. It might not have been truly lossless from a data standpoint, bit visually speaking it was good enough with file sizes that were large (100 gig+) not unwieldly.

Now I am working on a new project in Shotcut.

But now when I set quality to 99% with same settings, it’s giving me a much more tightly compressed 12 gig file which I don’t want.

The only difference I did, is I set the video mode when I started the new project as 1080p and 23.976000 instead of setting the first file I import dictate resolution and framerate. The inconsistency of the export is driving me nuts. I just want a massive 100gig video file in the export as this is not a final cut.

Is the content of the video files very different? For instance, live action video may create large files. But cartoons and PowerPoint presentations will create extremely small files even though the visual quality is still perfect. It’s just because some types of content are easier to encode than others. If you use the Measure Video Quality tool or any other VMAF tool to compare the original to the Shotcut export, are the scores within 6 points? If so, the encoding is visually lossless and the file size is immaterial. File size is a very poor and unreliable metric for video quality.

2 Likes

The content is quite similar. vtune=lossless and 100% quality however does seem to do the trick and let me export true lossless files which I can then further process with my neural net. The file size is around 100 gig which is pretty easy to manage still. There is clearly still lossless compression happening which I have no issue with since that’s how stuff like zip and rar files work too.

I am not sure why before I was able to output a 110 gig video file at 99% quality.

I do love Shotcut either way though. Really nice to work in and frequent updates.