Log in

View Full Version : Color issues with upscale


Sleepysonic
18th August 2014, 15:31
Hi. I'm having some issues with colours being too bright when I upscale and output losslessly.
I'm just testing with a random 40 second clip I took off my capture card for now.

My goal is: take a 720x576 50i 16:9 video, and convert it into a 1280x720 50p 16:9 video.

I want the output to look EXACTLY like it would look if i resized the original clip with windows media player to 1280x720. So with default (bob?) deinterlacing, and upscaling.

The reason for this is because
1. Youtube does not support 576p (only 480p or 720p)
and
2. Youtube does not support frame rates higher than 30fps unless the video source is 720p. I want it to run at 50 frames per second.

The output colours come out fine if I don't do any upscaling. I originally wanted to use Handbrake but that does not support upscaling.
In VLC and Super as soon as I upscale to 720p, the colours turn brighter.

Here is a prntscreen comparison. first one is the original colours, 2nd is what the colour turns into. http://imgur.com/wZz4cl3,HlNRKFL#0

Please help? :( I don't think this is a colourspace issue since it reproduces the right colours when I don't upscale.

ChiDragon
19th August 2014, 03:38
Probably Rec.601 vs Rec.709 color decoding. I believe for YouTube HD you will have to transform your clip into Rec.709 (using Avisynth's ColorMatrix plugin, for example).

TheSkiller
19th August 2014, 14:25
Probably Rec.601 vs Rec.709 color decoding.It is 100% for sure exactly that. I can tell that error from a glimpse as long as there's a deep red somewhere.


I believe for YouTube HD you will have to transform your clip into Rec.709 (using Avisynth's ColorMatrix plugin, for example).Indeed, the colorimetry needs to be rec.709 for YouTube. Upon playback via Flash in browsers rec.709 is always assumed for conversion to RGB (pretty dumb, yes), resulting in wrong colors if the source used rec.601. YouTube doesn't ever touch the colorimetry, hence it also never converts non-rec.709 videos to 709 even if the flags would suggest it's needed.

So it's the uploader's task to ensure uploaded videos use rec.709 colorimetry (even for SD uploades, <720p!).



This fixes the error:
ColorMatrix(mode="Rec.601->Rec.709", clamp=0)


Edit:

2. Youtube does not support frame rates higher than 30fps unless the video source is 720p. I want it to run at 50 frames per second.YouTube generally just started to present some videos in >30 fps and it's for HTML5 video rendering only, so while it makes sense to upload in 50 fps, you should know that a version where every other frame is dropped (resulting in 25 fps) is what currently most viewers will get to watch from a 50 fps upload.

hello_hello
19th August 2014, 14:29
I'm not aware of an encoder GUI which can convert the colours unless it's an Avisynth based program. Maybe someone else knows of one. Even then it's probably not a function built into the GUI as such, you still need to do it manually by modifying an Avisynth script yourself. Vidcoder is an alternative GUI for HandBrake and it does upscale, however I don't think it has an option for converting the colours.

When YUV video is converted to RGB on playback a specific "formula" is used. Standard definition and high definition use slightly different methods. That's why the colours look different. They're not being altered when you re-encode, but they are being converted to RGB differently on playback, as mostly the method used for converting to RGB is based on the video's resolution.

You could correct the colours when upscaling using MeGUI. It might have a bit of a learning curve but it's pretty versatile. Upscaling is disabled by default but it can be enabled, although the option is hidden away in the AVS Profile Configuration. The colormatirix plugin resides in MeGUI's avisynth_plugin folder and can be use to convert the colors correctly when upscaling, but you'd need to manually add the colour conversion to the script MeGUI creates for encoding the video. Something like:

LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(mode="Rec.601->Rec.709", clamp=0)

The above probably doesn't make a lot of sense if you've not used Avisynth before. If you're interested, have a play with setting up an encode using MeGUI (start with the File/Open menu and follow the prompts). The principle isn't any different to other GUIs (you apply cropping and resizing and de-interlacing etc using a preview). If you need help finding the option to enable upscaling or adding the correct colour conversion to the script MeGUI creates, post back.

MeGUI's "full frame rate" deinterlacing is "Yadif with Bob". It's the same as Handbrake's "Bob" de-interlacing, as far as I know. Later on, when you're more comfortable with MeGUI and Avisynth, you might want to try something even better. ;) http://avisynth.nl/index.php/QTGMC
There's some small Yadif vs QTGMC de-interlacing samples here (http://forum.videohelp.com/threads/354092-Converting-video-frame-rates?p=2225116&viewfull=1#post2225116).