Why MAGIX AVC/MP4 encoder changes the color of the original video?

ZsPalfi wrote on 10/10/2023, 8:12 AM

Hi,

I'm using Movie Studio 17 with the included MAGIX AVC/MP4 encoder (Windows 10, ASUS Dual GeForce® RTX™ 3050 OC GPU).

However, I have observed that MAGIX AVC/MP4 encoder changes the color tones of the original video in the output. This a frame from my original video, and the result of the encoder after rendering (the soft color tones are lost, and the second frame is more contrast):

I thought the reason is that the original video is YUV 4:2:2, but the MAGIX made only YUV 4:2:0 output. However, I tried the MainConcept MPEG-2 encoder also, where I can force to output YUV 4:2:2 as well, but the result is same wrong.

I used these settings:

Note: the colors are good and unchaged with WMV encoder...

Is there any idea why the colors are changed in the output and how I can avoid?

Thanks,
Zsolt

Comments

j-v wrote on 10/10/2023, 9:14 AM

Do you see the same when you choose "Mainconcept AVC" at the encoder mode of your used template?

Last changed by j-v on 10/10/2023, 9:25 AM, changed a total of 1 times.

met vriendelijke groet
Marten

Camera : Pan X900, GoPro Hero7 Hero Black, DJI Osmo Pocket, Samsung Galaxy A8
Desktop :MB Gigabyte Z390M, W11 home version 23H2, i7 9700 4.7Ghz,16 DDR4 GB RAM, Gef. GTX 1660 Ti with driver
561.09 Studiodriver and Intel HD graphics 630 with driver 31.0.101.2127
Laptop  :Asus ROG Str G712L, W11 home version 23H2, CPU i7-10875H, 16 GB RAM, NVIDIA GeForce RTX 2070 with Studiodriver 561.09 and Intel UHD Graphics 630 with driver 31.0.101.2127
Vegas software: VP 10 to 21 and VMS(pl) 10,12 to 17.
TV      :LG 4K 55EG960V

My slogan is: BE OR BECOME A STEM CELL DONOR!!! (because it saved my life in 2016)

 

ZsPalfi wrote on 10/10/2023, 9:37 AM

Yes. I already tried it, and the result is same wrong.

I also tried an interesting scenario. I thought maybe the double YUV color space conversion (once in the original video, second in the rendering) causes the issue. So, just for a test, I saved one frame from the original video as png, and I created a new project where I added this one simple png. After rendering with the Magix encoder, the colors were changed. This proves me, not the source color space is the issue, but the encoder changes the colors because of some reasons.

ZsPalfi wrote on 10/10/2023, 12:19 PM

I don't know. I have only MovieStudio 17 license... 😀

However, my next try was to add the encoder's output to an empty MovieStudio project to see what happens. The colors are fine again in MovieStudio's preview window, even though the "wrong" output was loaded.

So my conclusion: not the encoder, but the decoder ruins the colours in VLC (I'm using this player) and in Chrome (it can also play mp4 files). I found an interesting page about the VLC: https://wiki.videolan.org/VSG:Video:Color_washed_out/ Basically it is speaking about the opposite direction, but maybe relevant to my issue.

I still don't understand the root cause, but I assume it is related somehow to the "color range limited (16-235) or full dynamic range (0-255)" topic (I don't know what is these). @lan-mLMC: Is this what you hinted in your previous comment? Maybe does MovieStudio 17 use limited range and the VLC plays back the video on full range?

Greg-Kintz wrote on 10/10/2023, 5:06 PM

MP4s can be a bit messy as the format allows for either full range (0-255) or studio range (16-235) levels. And most MP4 encoders themselves are typically agnostic on level settings, meaning they simply encode whatever you feed into it.

That being said, most software players and youtube expect a 16-235 encoded MP4 and for playback expands it back to 0-255. So if an MP4 is encoded already encoded at full range the playback will slightly clip the peaks and crush the blacks.

The Fix..? For me when using Vegas: Under the "project properties out" in the FX tab, add the "levels" plugin. In the preset of the that plugin select the "Computer RGB to Studio RGB" preset. Render out and you should be good to go. ..Just remember to have this plugin disengaged when grading and when exporting to traditionally full range output formats to maximize all of the available bits. (AVI, ProRes, etc)

 

ZsPalfi wrote on 10/10/2023, 5:59 PM

@Greg-Kintz Thank you for your feedback. It seems your suggestion works for me as well. So based on your explanation I think the MAGIX AVC/MP4 encoder's output is "full range", but VLC assumes it is "studio range", so it modifies the colors... I will set this output filter only just before rendering, not to disturb me during the video edit. I just worry a little bit if doesn't this output filter causes an other color issue, because a "studio range" is considered as a "full range" and transformed to "studio range" once more? My understanding this is a double color range compression, so I feel some color values may be lost...

Greg-Kintz wrote on 10/10/2023, 6:34 PM

I'm glad it worked for you. If it helps, think of studio range levels as a slight compression encode/decode format: Slightly compressed for encoding but always meant to be decompressed on playback to full range.

 

If you want complete verification of the process, take that new studio range encoded mp4 back into your (full range) timeline. Drop it underneath the project you had rendered it from. Then add the "levels" FX plug in, but this time add the levels plugin just to that clip. And this time set it to "studio RGB to computer RGB" which essentially decompress the studio range levels back to full range.

If everything was done correctly the rendered mp4 clip should now match the levels of the original project in the original project above it.

john_dennis wrote on 10/10/2023, 6:46 PM

@ZsPalfi 

If you really think anxiety about the levels that your viewers see will keep you up at night, here's some light reading that applies to Vegas Pro versions prior to 18. I'm not sure about Movie Studio.

https://www.vegascreativesoftware.info/us/forum/vegas-pro-levels-last-and-final-1--120319/

I'd recommend upgrading to Vegas Pro 21 and stop worrying about it.