Hello people. i just find a tricky thing with UTvideo which i dont understand the cause. I have done some gameplay recordings with UTvideo in OBS-studio which uses UTvideo ffmpeg implementation. These videos are not important, were just test for see how color works.
So lets start, i recorded the first video with UTvideo RGBA. I reencoded that video with ffmpeg libx264 which i need to inform "yuvj420" to keep fullrange without conversion, if i dont add the "j" colorspace then ffmpeg convert to limited range and other encoders like Megui too. So i send the x264 fullrange video to Youtube but Youtube just convert the colorspace to limited.
The odd now is the second video which i recorded with UTvideo YUV420+OBS fullrange, and colorspace becomes equally to the first RGBA video in fullrange. So here when i reencode with ffmpeg i dont need to inform its fullrange and output become fullrange anyway. So i send this file to youtube and it keep fullrange after Youtube reencode.
Is there some idea why RGBA reencoded video keep repassing limited range information ahead for next encoding? I dont get it, shouldnt RGBA maintain fullrange? What i doing wrong?
+ Reply to Thread
Results 1 to 10 of 10
-
-
"Range" concept doesn't really apply to RGB/A, because it's always 0-255 if you're using 8bit/channel
Youtube clamps full range YUV videos that are flagged as full range (0-255 YUV becomes 16-235 Y, 16-240 U, V in the youtube re-encoded video) . If you pass full range content unflagged, the YT re-encode will be full range. This is bad because distribution formats should never use full range - it won't look right on 99% of display setups
Youtube always re-encodes and never uses RGB (it's always re-encoded as YUV, whether it's using VP9 or h264) -
I know they reencode. So what you mean is than i should always record YUV at limited instead fullrange and consider fullrange to limited conversion normal when reencoding from RGB to YUV?
But if i want the RGB source to become fullrange in conversion to YUV, is there a way to convert it to YUV fullrange without flagging it? If i not flag fullrange it become limited range in reencoding..
On my monitor limited colors looks too washed out so i dont like that much, but considering other displays can have worse results lets accept it. -
Not necessarily. You can record RGB, but you need to control the conversion correctly including the matrix. The end distribution result should always be normal range YUV. Most display setups are not configured to display full range YUV correctly
But if i want the RGB source to become fullrange in conversion to YUV, is there a way to convert it to YUV fullrange without flagging it? If i not flag fullrange it become limited range in reencoding..
But to answer your question , your YUV full range wasn't flagged in the 2nd case in your 1st post. The content is full range, but not flagged . That's why YT will not clamp it.
Did that make sense?
In your first case , you converted RGB to full range YUV, but it's flagged as full range too when you use -pix_fmt yuvj420 . Because it's flagged, YT "sees" the flag (it never scans actual content, only looks at flags), the re-encoded video is clamped to normal range . The other problem you might to have is if you did this conversion in ffmpeg and are using HD, you will be using rec601 (wrong matrix for HD) so colors will be "off" . There are ways now in ffmpeg to use proper colormatrix conversion and range with -vf scale (in_color_matrix, out_color_matrix, in_range, out_range), and VUI parameter flags with -x264opts
In your second case, it uses full range content, but was unflagged. So youtube re-encodes the same full range content but doesn't not clamp because it doesn't see the flag. However it will look "wrong" for 99% of people because it's full range YUV . I don't know what matrix OBS uses to convert the orignal RGB to YUV420 for UT. If it allows UT to do it it will be using Rec601 (wrong for HD) . If it converts prior to UT video it might be using Rec709 or 601 or something else .
When the wrong matrix is used (e.g. 601 vs 709), the colors will look shifted slightly .
When the levels are wrong (standard range displayed as full range, or full range displayed as standard range) , the levels and contrast will be off .
On my monitor limited colors looks too washed out so i dont like that much, but considering other displays can have worse results lets accept it. -
About display colors you're right, i leave NVIDIA video playback at limited range somehow, changing back to 0-255 improved colors from 16-235 video.
I keep OBS with 709 always so i dont know if even in that setting it cause some matrix conversion in UTvideo recording since OBS uses ffmpeg for recording.
FFmpeg make some wrongs colormatrix conversion "automatically" for some file types. For UTvideo RGBA encoding i need to put that "-vf colormatrix=bt601:bt709" to keep right colormatrix output. That problem happens for some YUV input files with FFmpeg. -
-vf colormatrix is the old workaround for RGB=>YUV 709 conversion that was used a few years ago. It produces noticably lower quality, especially on thin graphics/ edges. For example in video games, the HUD displays, counters will have more chroma aliasing using -vf colormatrix ; text will be less crisp
Everything should be done with -vf scale now. It has many parameters/switches and is more flexible, you can specify matrices, ranges, you can even change the algorithms used (e.g. lanczos). For simple RGB=>YUV420 using 709 you would use
https://ffmpeg.org/ffmpeg-filters.html#scale-1
Code:-vf scale=w=-1:h=-1:out_color_matrix=bt709 -pix_fmt yuv420p
Last edited by poisondeathray; 28th Feb 2017 at 11:45.
-
listen close to what pdr has to say. he is rarely, if ever, wrong. i am only replying because there is a lot of good info in this thread, and i want to be able to find it again easily.
-
Firstly thanks for all information and help, much appreciated.
I now perceiving how i was misinformed by my wrong video Graphic settings. The UTvideo which was recorded with YUV+OBS fullrange has darken colors than the UTvideo RGBA now with right colors. Is that the sign of bad color conversion for the YUV version? For what i see UTvideo YUV should be encoded with limited range. -
One thing that is usually pretty certain is RGB should always look correct in all players. It's usually multitude of different possible RGB<=>YUV conversions that cause unexpected results
But it also depends on how you are viewing it, decoding it, renderer etc... There are multiple points where the failure or discrepancy could occur. When you "see" something, it has been converted to RGB for display. There are numerous methods of converting YUV to RGB, so you can get very different results depending on how the decoding and renderer is set up
OBS conversion from RGB to YUV could be a problem (or if it's sending RGB, then UT Video will convert to YUV with Rec601). But 601 vs 709 don't change the levels or contrast (black and white point are the same), just the colors shifted slightly
Assuming all the steps preceding the conversion to UT YV12 were correct, you need to view full range YUV with a full range matrix (ie full range YUV needs to use the correct full range matrix to convert to RGB for display) ie. Your viewing method might expecting limited range (recall earlier I said most playback setups are not expecting full range YUV) . That is the most common and likely scenario . Full range content displayed as limited range will look too "contrasty" - ie. the opposite of washed out. Your decoding chain needs to know that the video data is full range and has to decode it as full range. UT Video doesn't convey range metadata flags, so recieving software has no way of knowing either the content or flags . (UT has separate fourcc's for 601 and 709, but that's a separate issue from full vs. limited range)
Assuming that is what is actually occuring, you would need to convert to limited range for final distribution formats. So one might question the value of recording full range YUV in the first place. RGB is clearly the "best" quality wise because it's same as original, not subsampled, but the "cons" is it compresses more poorly so larger filesizes. YUV compresses better. YV12 is subsampled 4:2:0 (color information is cut in half width, half height) , but that's usually the final distribution format too. It usually depends on factors such as what sorts of manipulations are you are doing in between, or if you need a very high quality version
Many people find avisynth is a useful tool , because you can specify matrices and versions to/from RGB, YUV . You can "see" exactly what you have by specifying the conversion(s). avspmod is nice for this, because it's the closet thing to a GUI, with a preview - so you can diagnose exactly what is going on -
I just make some tests to confirm, for UTvideo YUV420 in OBS if i choose limited range it play at same as RGBA color range. If i use fullrange for UTvideo YUV420 the levels become darken when reproducing.
I play the video with MPC-HC (EVR-CP,madvr) and Windows Media player and all of them show same wrong results with darken(contrasty) levels for YUV fullrange.
When i reencoding the UTvideo YUV420 fullrange with ffmpeg i need to specify the input is fullrange to avoid it glitching levels of the output like the source. In any case i think UTvideo YUV would be better recording directly with limited level to avoid these issues.
I'm not professional or manipulating content which need some type of perfect colors so i dont need the RGB colors, YUV is fine for my usage since its going to YUV distribution anyway. I just want to avoid wrong conversions.
Thanks for all good information and time spent.Last edited by chummy02; 28th Apr 2017 at 03:49.
Similar Threads
-
Colorspace questions
By -Habanero- in forum Newbie / General discussionsReplies: 4Last Post: 15th Apr 2015, 21:07 -
Incorrect colorspace conversion?
By Mephesto in forum RestorationReplies: 2Last Post: 4th May 2014, 19:40 -
keep colorspace with mencoder
By marcorocchini in forum Newbie / General discussionsReplies: 0Last Post: 18th Apr 2014, 13:15 -
Premiere Pro + UTVideo = Editing problems
By imagoth2004 in forum Newbie / General discussionsReplies: 0Last Post: 16th Feb 2014, 07:04 -
lagarith - premiere - lagarith (without colorspace conversion)
By codemaster in forum EditingReplies: 10Last Post: 1st May 2012, 12:26