Edit/Export I444/rgb24 Gameplay shot in OBS Studio as mp4 yuvj444

I have been trying to Edit/Export I444/rgb24 gameplay footage which was shot in OBS Studio 28.0.1 and saved as full range colour in yuvj444 format using the ffmpeg h264 software codec in a matroska container.

After hours of experimenting with different configurations and using the mlt_image_format=rgb24, color_range=jpeg, pix_fmt=yuvj444, pix_fmt=yuv444, or pix_fmt=rgb24 extensions in the Other tab of the Export File option, as wall as switching between jpeg and broadcast colour ranges, it has been impossible to obtain anything better than 4:2:2 subsampled output despite Shotcut reading the source as yuvj444 and the re-encoded/edited file as rgb24, yuv444, or yuvj444 in the editor Properties tab. While the files are saved as 4:4:4 the actual content has been sub-sampled by Shotcut as either 4:2:2 or 4:2:0.

I have confirmed the original OBS Studio recorded files are 4:4:4 subsampled and the colours are exactly the way they look in-game.

I am using SMPlayer and VLC Player to play back the files at 100% full resolution 720p60, no rescaling at all, as other players can only read mpeg4 if it’s encoded in 4:2:0 format (hardware decoding using Nvidia GTX 970).

I have tried encoding the raw unedited footage from the Timeline, directly from the Playlist, and directly from Source and still I can get no better than 4:2:2 output.

I can only conclude that either,

A) Shotcut is decoding the perfect untainted yuvj444 encoded input file which OBS Studio created from the original gameplay and subsampling it as 4:2:2 thereby smudging and washing out all the colours, especially the r, g, and b primaries which are used in the onscreen displays, huds and overhead information tags (thus making them mostly unreadable), even from the raw files before they event touch the Timeline or any processing is applied at all.

Since ffmpeg is the codec that SM Player and VLC Player both use to decode perfect RGB footage from the original files I doubt ffmpeg can be the source of the subsampling unless it has been told to subsample in 422 format by Shotcut to begin with.

The video display window on Shotcut seems to only be able to display the footage using 420 subsampling despite Shotcut being able to save it as 422. Also the window does not scale properly when set to 100% in Editor mode. Instead the pixels become smudged as if they are being resampled for no reason. When set to Player mode and set to 100% only then is 720p footage pixel accurate except for the colour bleeding caused by the 420 subsampling. How can the display window be set to 444/rgb24?

or

B) After decoding the files Shorcut is processing them in some way before they reach the encoder, even without being placed on the Timeline, which causes them to be subsampled as 422 and is ignoring every command I have placed into the Other tab which should be telling it not to do that.

These are the results I have been able to obtain.

  1. Using the libx264rgb codec the saved footage is always subsampled to 4:2:2 format before being saved as rgb24, with or without including any or all of the following commands, mlt_image_format=rgb24, color_range=jpeg, pix_fmt=yuvj444, pix_fmt=yuv444, pix_fmt=rgb24, in any order or combination with each other or without or without the default commands in the other tab.

I can only presume that all the additional commands are being ignored or over-ridden since the output file encoding is rgb24 not yuvj444 or yuv444 as it was commanded to be set, as stated by Properties of the encoded file read back by Shotcut.

  1. Using the libx264 codec the default output is 420 with no additional commands. With the additional, mlt_image_format=rgb24, color_range=jpeg, or pix_fmt=yuvj444, commands the output can be set to yuvj444 or yuv444 but the file which is produced is always sub-sampled as 4:2:2. Worse still the 4:2:2 output produced by Shotcut using this codec appears to be partly washed out compared to the stronger colours produced by the libx264rbg codec despite those also being sub-sampled to 4:2:2.

  2. using huffyuv the output file is always sub-sampled to 4:2:0

  3. using ffv1 the output file is always sub-sampled to 4:2:0

Is Shotcut capable of outputting a un-sub-sampled 4:4:4 rgb24 file at all?

Is there even a single video editor which exists that can even do this?

I know DaVinci Resolve claims to be able to process everything without subsampling it but the free version cannot read any of the mp4/mkv 444 encoded files I have recorded using OBS Studio. Either it only decodes the audio if the container is .mp4 or it displays a red screen saying the source is offline if using .mkv and only decodes the audio. With this kind of behaviour I am doubtful the Studio version of DaVinci Resolve can read this files either. Also neither version seems to be able to save a file in h264 format as yuvj444 or yuvj444, even with version 18. You’d need to use a codec such as ProRes or other propitiatory Apple format to do that which would result in a file size of over a terabyte for an hour of footage, which is totally ridiculous since 6000kbps is perfectly capable of good quality at 444 sub-sampling for 720p60 gameplay.

Why I can find no software that can edit 444 footage I don’t know since after over 20 years of digital television and movie making everything should be capable of this by now, including full jpeg colour range. Unless you are using very low bitrates h264 is more efficient at encoding full range colour and needs no sub-sampling to obtain better perceptual quality than sub-sampled video. 4:4:4 should be the default format for every video editor, production, and distribution.

When can we see Shotcut do all processing in rgb24 and allow files to be edited and saved without any colour sub-sampling as yuvj444, yuv444 or rgb24 directly?

If there is a setting that I have missed which will allow Shotcut to do this can you please tell me?

That is not really possible unless you use the hidden, unsupported, experimental GPU effects. The reason is because everything is done on CPU, and it is too slow to transfer the uncompressed full depth, full frame rate video over the bus to the GPU RAM. Well, that and because I did not program another option or pathway, and you get what I give you.

That is because you are assuming the old information you read here or elsewhere is still correct, but things change…

mlt_image_format=rgb24

is no longer correct since several version. It is now simply “rgb” but we do not know what version you are using.

color_range=jpeg

Since a few versions there is now a Color range in the Video tab. It sets color_range to “pc” but “jpeg” works too. This has no affect when using RGB for output if you choose that using pix_fmt.

Is Shotcut capable of outputting a un-sub-sampled 4:4:4 rgb24 file at all?
When can we see Shotcut do all processing in rgb24 and allow files to be edited and saved without any colour sub-sampling as yuvj444, yuv444 or rgb24 directly?

If you use the new correct value for mlt_image_format, it should be fine if you avoid using YUV-only filters such as all of the Old Film and Reduce Noise ones. Also, you can skip using the pix_fmts with ‘j’ in them as they are not used anymore for encoding will full range.

Here is a link to a reply with a list of things that are YUV-only to avoid: GoPro, full color range and pix_fmt=yuvj420p -- what to hope for and what to avoid? - #2 by shotcut

1 Like

Thank you very much for your help. Setting mlt_image_format=rgb solved the problem with version 22.06.23!

Using Shotcut I can now export 444 video even from the timeline in i444 format using libxh264 and libxh264rgb, which is something nothing else does, just as long as I don’t use a video dissolve/crossfade when editing clips together, which results in the colour being subsampled to i422 which creates a blurred almost unreadable mess for any in-game text and is extremely distracting since it also flickers when the colour floods out of the letters and back in again. Other than that I don’t know of any other software that can export 444 video using the h264 codec which therefore makes it the best video editing software that I know of just for that ability alone.

Thanks for developing Shotcut and hopefully someday it will have the ability to apply effects in full rgb format without sub-sampling or CPU limitations.

1 Like

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