Lossless not lossless or just applied scaling that I do not want?

(I’m new to the application and forums, and apologize if the question has been asked before --even though I couldn’t find the solution in the forums myself).

I have retro-game gameplay footage (lossless) that I’d like to edit with Shotcut, and maintain the pixel perfect quality throughout the editing and to the output. Could someone look at my settings and see why the output is not like the input, despite me setting the same output-size as the input size and specifying h.264 with crf=0 (GOP and B-frames settings does not seem to matter in this case)? It seems like Shotcut shrinks the visual vertical area in output. Why? How to fix?

all.png

(if you zoom in, you will see that the output from the “test5.mp4” is not sharp and 16 colors only, like original)

BTW: I don’t care about the file-size at this point

How to get result, just as the original? Appreciate any pointers on how to achieve this :slight_smile:

Closeup:

Just from a quick observation you frame rates are different, and the same with the color space.
2021-09-05_13-26-29
Not sure what your Video Mode is set to.

There are lossless export presets.
It is very possible to get a bad export once you enter Advanced and change settings.
shotcut_2021-09-05_13-42-28

Thanks for replying. I will look more into these differences. Need to learn what must be set as identical values, and what does not need to :slight_smile:

Awesome! Thank you so much! A lot of information here. By using a custom video mode, I can set it exactly as the input file (res, fps, aspect ratio, scan mode and color space). Or so it seems. This fixes that scaling issues. But I still have issues with color bleed or blending of colors, even in lossless export (100% quality). Like this:

The game character should ideally have sharp edges. One red color, one orange as the input.

The Timeline will “not accept” all values in my custom video mode. In Video mode I have set fps to be:

59.922744

But the timeline still lists 59.940060 in “Properties”. Could this be the reason for the blur? I’m no expert, but it sounds strange as the blur/bleed is also present around things that are “static” across many frames in the video.

That is due to chroma subsampling, which is common in YUV color spaces. I have explained that in much detail here before, which you can search for. You can avoid that by switching to a RGB color space but many players will not handle it. If you ultimately will share the video using a web service like YouTube it will do that too, and you will have no control over it.

UPDATE: You can make the lossless/H.264 preset export in RGB by choosing it and then Export > Advanced > Codec > Codec = libx264rgb.

No, but there is a quirk that causes this fraction problem. 60000/1001 is a very common frame rate - even more common than 60 - that is commonly referred to as 59.94 although you can see it is not exactly that value. There is a heuristic in the code perhaps we should remove that says if you entered 59.9… then assume you meant 60000/1001 which rounds to 59.94006. You can workaround this by editing the <profile> tag of the MLT XML project document in a text editor. This logic was changed in the export panel code but not in the Custom Video Mode dialog. It should be coerced to 60000/1001 only when you enter 59.94006. I will fix that for the next version.

Here you can see how it looks after the fix

Thank you again! I read your linked articles. Some of it out of my knowledge area - or at least in a way that I wouldn’t know how to work around things in Shotcut.

UPDATE: You can make the lossless/H.264 preset export in RGB by choosing it and then Export > Advanced > Codec > Codec = libx264rgb.

A perfect practical thing for me to test. Result is different. Edges appear to the viewer as crisper, sharper, but this time, we have a different-looking artifact:

Used these settings
image

image

Any further tips on how to avoid these artifacts as well? :slight_smile:

(BTW: In the case that a video would end up on youtube or the like, I realize that there is no way escaping lossiness at that final point, but my idea was to keep things lossless all up till the last step, and also make sure that the final format is in the best suited format. Size is still of no, or minor, concern)

I see a difference in input and output for format + color range.

Output (is it looks when added to Shotcut playlist afterwards):
image

Input:
image

Can this explain things?

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