Multiple machines workflow, different results

Hey there. I got a rather simple question regarding optimizing my Shotcut/melt workflow to increase efficiency.

I have my main rig running Windows (9950X 16 Core) to edit and export video projects. Sometimes I have multiple videos to be edited an exported the same day and as I have the opportunity of using a well specced ubuntu server running a 5950X 16 Core CPU I started copying the files over the network while editing to start the export job remotely using ssh and melt so I can edit and export the second video right after at the main rig.

While this is working quite well for comparison I started to run the same export on both computers while using h265 WQHD with the same settings on both machines as export target. The resulting video files were sized 1.5GB and 1.7GB. While this is not the worst thing in the world it still upsets me that the 5950X environment is producing less efficient video files. Both are running without GPU acceleration, so there should be no interference by GPU codecs.

I installed melt through apt-get, so it may not be the latest version you could directly build yourself from the git repository. But when I do it screws up my other update processes due to unmatching requirements.

Does someone have similar problems or suggestions for practical solutions? :slight_smile:
Thx!

I would guess this is a major factor. The official releases of Shotcut are built with the latest x265 source. The repository version will often be much older. Do you have the option of unpacking an official Shotcut tarball and running melt from there?

Grasping at straws a little, there could theoretically be an efficiency difference due to the supported instruction sets of the different CPUs. x265 has some pretty aggressive assembly optimizations to take advantage of extensions like SSE, AVX, etc. If one CPU supports an extension that the other CPU does not, then the first CPU may be able to achieve better compression.

1 Like

Great suggestion, I will test that for sure!

Sound like solid reasoning. The CPUs differ in the capability to use AVX-512 instructions but this has to be actively enforced for x265 to be taken into account according to some other ffmpeg related thread. I guess using a local version of shotcut to get the same melt version as on the desktop will show clear results if it’s a difference in soft- or hardware. I will report my findings, thx :slight_smile:

I can’t speak to x265 since I don’t use it much, but the SVT-AV1 encoder has huge optimizations for AVX512. I wouldn’t be surprised if x265 took advantage of that difference as well.

It seems to be this way. It tested the same project export mlt file on my server with the melt version 7.33.0 of the latest shotcut release which runs fine out of the box in comparison to the system-installed 7.22.0.

The file difference compared to my Ryzen 9 9950X main rig still remains an 0.2 GB which is around 15% of the whole file size.

While I am far from being an expert in encoder/codec functionality I asked a few LLMs if AVX-512 does make a difference in file size and always got the answer that it speeds up video encoding but should not influence the resulting file size that much.

I will try to investigate further, perhaps I’ll find something else and if not I may just be that AVX-512 difference :slight_smile:

EDIT:
Asked Gemini at last and the answer sounds as reasonable as your assumption:

The 15% difference in file size means the encoder on the AVX-512 machine is finding a more efficient compression path (smaller file) or a less efficient one (larger file) while still adhering to the target CRF quality level.

Furthermore Gemini suggested for similar file size to disable AVX-512 instructions (which will obviously lead to the bigger file size) to get similar file size. Alternatively I should try using 2pass ABR encoding with minimal visual differences since there comes a target filesize with it.

The 15% file size sounds way too big for just having access to AVX-512, that’s as huge as a jump from x264 to x265 and AVX512 should mostly affect speed. I mean sure, maybe it finds some more efficient paths but not 15% more efficient.

Are you using the exact same preset on both exports? Maybe one of them has a different CRF or some other encoder setting. You can right click → View log on the export job on both PCs and roughly compare the first ~10 lines of the output (especially the Rate Control line). There’s also a line in there that shows if AVX512 is used.

That being said definitely don’t disable avx512. IF you really want a specific file size you should use the average bitrate mode which will force the encoder to fit into a certain size (as opposed to target a certain quality depending on what’s in the original video).

I am sure. I start the job at shotcut and copy the job-xml into a file to the other pc which then starts melt with the given export. The only thing I have to edit in the xml are the file paths for the source files.

I think the 15% could have to do with the kind of video I am encoding since it’s a fixed frame video (I use a gopro 4k60fps for sports recordings while having a static frame of the whole court exporting to WQHD / FHD), so there is a lot of static image that could benefit a lot from better compression.

I don’t intent to throw away results of modern CPUs. I just have a guilty conscience encoding on the less efficient machine now :wink: I don’t need a specific file size. I was just wondering about the different results, but thanks for the suggestion.