Vegas 13. Weird color shift.

james-s5985 wrote on 3/3/2017, 12:33 PM

Hello guys, stumbled upon a problem here.

Here is my source files specs

Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 9.06 GiB
Duration                                 : 1 h 53 min
Overall bit rate                         : 11.4 Mb/s
Writing application                      : Lavf56.30.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 9 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 53 min
Bit rate                                 : 11.3 Mb/s
Width                                    : 1 280 pixels
Height                                   : 694 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Variable
Frame rate                               : 23.976 (24000/1001) FPS
Minimum frame rate                       : 23.810 FPS
Maximum frame rate                       : 24.390 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.530
Stream size                              : 8.95 GiB (99%)
Writing library                          : x264 core 142 r2431+42 c69a006 tMod [8-bit@all X86_64]
Encoding settings                        : cabac=1 / ref=9 / deblock=1:-3:-3 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / fade_compensate=0.00 / psy_rd=0.80:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=18.0000 / qcomp=0.60 / qpmin=0:0:0 / qpmax=69:69:69 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=4:0.75 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0

 

If I render it out with sony avc codec on native source file resolution - it comes out identical as source.

If I render it out with the same codec and same settings but on different resolution 1280x720 or 1080p - it comes out with shifted colors.

If I render with Mainconcept codec on any resolution - it comes out color shifted all the time. I have to apply Level Fx to adjust picture.

Here is specs for Sony avc rendered 1280x694 clip

Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/isom)
File size                                : 8.63 MiB
Duration                                 : 3 s 3 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 24.1 Mb/s
Encoded date                             : UTC 2017-03-03 14:52:25
Tagged date                              : UTC 2017-03-03 14:52:25

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.2
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=2, N=12
Muxing mode                              : Container profile=High@4.0
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3 s 3 ms
Bit rate mode                            : Variable
Bit rate                                 : 24.0 Mb/s
Maximum bit rate                         : 26.0 Mb/s
Width                                    : 1 280 pixels
Height                                   : 694 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.125
Stream size                              : 8.58 MiB (99%)
Language                                 : English
Encoded date                             : UTC 2017-03-03 14:52:25
Tagged date                              : UTC 2017-03-03 14:52:25

 

And here are specs for same clip but rendered with 1280x720 resolution

Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (mp42/isom)
File size                                : 8.91 MiB
Duration                                 : 3 s 3 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 24.9 Mb/s
Encoded date                             : UTC 2017-03-03 14:49:48
Tagged date                              : UTC 2017-03-03 14:49:48

Video
ID                                       : 2
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.2
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=2, N=12
Muxing mode                              : Container profile=High@4.0
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3 s 3 ms
Bit rate mode                            : Variable
Bit rate                                 : 24.8 Mb/s
Maximum bit rate                         : 26.0 Mb/s
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 1.120
Stream size                              : 8.86 MiB (99%)
Language                                 : English
Encoded date                             : UTC 2017-03-03 14:49:48
Tagged date                              : UTC 2017-03-03 14:49:48

 

I made a compartion picture to show you how color shifts depending on resolution, codec and same level fx applied.

 

Clips are being viewed in MPC-HC, and inside Adobe Premier preview window. However if I put these clips back to Vegas timeline - they look identical in preview screen.

I need vegas to render files properly with same color as source.

Comments

Marco. wrote on 3/3/2017, 1:20 PM

It looks like as if the players decode the files differently while the files actually all have same color. Besides different players use different video level management, some also interpret different color spaces. And what your demo pictures above show, really looks like a color space decode mismatch.
It may be the players take their color space base from the frame size instead of reading the file based color space information (which is same for both original and resized media rendered from Vegas Pro).

I analyzed two of the pictures you posted in the other forum before. And after having them imported into Vegas Pro what I found is:

If you do a 601-to-709 channel blend conversion in Vegas Pro to your original sized picture, colors look exactly same.
Or –
If you do a 709-to-601 channel blend conversion in Vegas Pro to your resized footage, colors look exactly same, too.

So the easiest way for you to correct in a way the players will work as expected, is to pre-correct via an appropriate channel blend ajustments (I'm struggling through my brain getting the right order – I think your pre-correction then should be a 709-to-601 correction).

james-s5985 wrote on 3/3/2017, 3:05 PM

Thank you for your response Marco.

Where I can get correct numbers for FX preset? or is there something other you are talking about?

I took numbers from other thread on this forum. Picture looks good but only until I compare to source and non-resized clip - it is still not perfect.

Marco. wrote on 3/3/2017, 3:49 PM

I'll post a download of a demo project later or tomorrow.

Be sure to use an 8 bit project when applying such color space conversion.

marc-s wrote on 3/3/2017, 4:49 PM

FYI: Most codecs rendered out of Vegas will not display proper levels when brought into other editors like Premiere. One of the exceptions I've found is: Sony MXF. If I want to do further work in Premiere or After Effects I render out as Sony MXF HD422.

james-s5985 wrote on 3/3/2017, 6:52 PM

.vmw vmv9 codecs deliver absolutely correct colors without fx adjustments on every resolution but makes picture blurry. 🙀🙀 what a joke

Marco. wrote on 3/3/2017, 7:16 PM

Which states my guess.

Musicvid wrote on 3/3/2017, 9:05 PM

See if this makes a difference:

Use mp4box to change the source codec ID (major brand) from isom to mp41.

Might be a vestige from a picky Vegas bug that goes waaay back in time. Or, simply encode your source with a more current mp42 codec.

It is highly unlikely that going from 601 to 709 would have any effect at all on the reds; it's more likely something to do with the V1 -> V2 conversion step.

Marco. wrote on 3/4/2017, 4:12 AM

See this VP13 demo project. Pic of original source is on upper track, pic of resized source on lower track (keep in mind these are screenshots from james-s5985 from an external player, not Vegas' internal preview).
I applied the Channel Blend FX on both tracks with different color space conversions but deselected the FX on the upper track, so only the 709-to-601 conversion on the lower track is working.

james-s5985 wrote on 3/4/2017, 5:46 PM

None of your suggestions helped, guys. However I managed to get proper resized picture through VP+frameserver+virtualdub. I am new to encoding and had to try again and again.

Here is what I did.

Project had to be 32bit.

frameserver transport set to YUY12.

First I tried Lagarith lossless codec in default RGBA mode - it got me colorshifted video. Then I switched to YV12 - It made perfect color video. Then I tried to resize with leterbox - color stayed the same, but for some reason it blurres just a bit picture - sharpness filter fixes the problem however. Why does it do blur in first place?

Finally I found x264 codec with default settings( it converts to YUV 4.2.0 by default) - It gives perfect resized and non resized picture.

Let's say problem is solved, but I would like someone to summarize new information and answer why vegas's default codecs act so weird - maybe there is some way to render that video in vegas properly with sony avc or mainconcept? Also note that source file is 1280x694 and might be it adds up to problem, some algorithm might be bugging as of because If want to resize image without letterbox and keep the aspect it gives 1920x1041 - codecs round up it to 1920x1042.

 

By the way I found out vegas can do x264, so frameserver is not needed, however virtual dub has superior sharpness filter.

 

 

Musicvid wrote on 3/4/2017, 9:16 PM

I'm sure you know by now that Vegas preview levels are not playback levels with yuv encoding...

 

james-s5985 wrote on 3/6/2017, 12:33 PM

I've solved blurring problem. My intel HD video card has "hidden" settings I had to turn off - they were ones who did blur.

However I still have 1 issue I can not understand. I work with Sony Vegas 13 - it's preview window shows more redish colors than source file played in MPC-HC vlc quicktime, and if render clip with sony avc or mainconcept avc - vegas delivers exact same redish colors(played in MPC-HC) like in it's preview window. At the same time if I render with x264 - final video(played in MPC-HC) has the same colors as in source video played in MPC-HC. Why is that?

 

When I drop other video into the same project on the same timeline - it looks in vegas preview as in source played in player and as final render played in player no mather what codec I used to render clip out - all sony, mainconcept and x264 - deliver same color! Why??

james-s5985 wrote on 3/6/2017, 1:18 PM

I solved all questions. The problem was that vegas read 1280x694 as SD rec.601 and 1280x720 as HD rec.709 - players read all files as rec.709. Resizing source to 1280x720 prior import to vegas made vegas read and render it as players do.