Bug 512578 - "Lossless" render option does not actually render lossless
Summary: "Lossless" render option does not actually render lossless
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 25.08.3
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-25 02:17 UTC by lras916
Modified: 2025-11-29 14:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
a short yuv444p sample highlighting the benefits of the 4:4:4 pixel format. (2.11 MB, video/mp4)
2025-11-25 02:17 UTC, lras916
Details
an even shorter bgra sample highlighting the benefits of the 4:4:4 pixel format. (2.57 MB, video/mp4)
2025-11-25 02:22 UTC, lras916
Details
observed vs expected result (28.82 KB, image/png)
2025-11-25 02:24 UTC, lras916
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lras916 2025-11-25 02:17:56 UTC
Created attachment 187141 [details]
a short yuv444p sample highlighting the benefits of the 4:4:4 pixel format.

SUMMARY
When working with yuv444p or bgra color format video (and likely other 4:4:4 formats), the rendered/exported output video is downsampled to the 4:2:2 chroma subsampling format, even though a "lossless" output preset was chosen.

STEPS TO REPRODUCE
1. Start a new project and insert either a yuv444p or bgra color format video onto the timeline. I have included sample videos in both formats as attachments. The bgra sample is just a few frames, due to the format not being compatible with h264 lossless compression. (The videos starting points are identical).
2. Go to the render page, and choose any of the 4 default presets under the "Lossless/HQ" folder.
3. Export the video and notice how the image has changed.


OBSERVED RESULT
Lossy chroma subsampling has been performed, giving the image a 4:2:2 look, and sometimes (depending on different variables) the color format has been converted to yuv422p. Some of the text in the video example has lost color, and the color is blurry.

EXPECTED RESULT
The exported video should look identical to the source, retaining the 4:4:4 color format characteristics. The input video in this example looks identical to the exported video.

SOFTWARE/OS VERSIONS
Windows: 11 Home 25H2 build 26200.7171

ADDITIONAL INFORMATION
I found that recreating one of these formats and adding the additional parameters "mlt_image_format=rgba" AND "pix_fmt=bgra" or "pix_fmt=yuv444p" (depending on whether the target bgra or yuv444p) solved the issue. While this is a workaround, I believe the exported video should be in one of these formats by default, since the current implementation of the lossless presets are by definition not lossless.
Comment 1 lras916 2025-11-25 02:22:51 UTC
Created attachment 187142 [details]
an even shorter bgra sample highlighting the benefits of the 4:4:4 pixel format.

it is just 5 frames because of the nature of it being lossless and in bgra format, making it huge on larger lenghts
Comment 2 lras916 2025-11-25 02:24:21 UTC
Created attachment 187143 [details]
observed vs expected result

I'm just adding this attachment so people can see how the issue looks without downloading the samples and going through with reproducing it.