#1  
02-08-2024, 08:50 PM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
On my journey bringing DV and Hi8 tapes of home video into the devices of today, I never considered converting the color matrix on the DV AVI files and HuffYUV Hi8 captures from rec.601 to rec.709. I haven't tried adding it to my Avspmod script with ColorMatrix but I have been struggling with color irregularities developing by the time the file is brought into Final Cut Pro as a ProRes 422 file. In a nutshell here's my workflow.

DV Tape (original camera)->Firewire->WinDV->saved as .avi file

or Hi8...

Hi8 Tape (original camera)->SVideo/R+L RCA Audio->PCIx capture Card->Vdub 1.9.1 HuffYUV2.1.1 capture as .avi file

What I have been doing with those files was use an avspmod script to convert it to something usable in Final Cut Pro for editing and touching up of the video. In that script I took these steps (I can post the script if there are questions)...

1) QTGMC "fast" to deinterlace
2) Crop out the overscan (different sizes, Hi8 I take more, only a touch for the DV)
3) Resize to 960x720 (Mainly for larger number of pixels to give Neat Video Denoiser more data)
4) Vdub saving the file as ProRes 422 to import to FCPX for editing. I chose ProRes because it's what FCPX converts the files to anyway, so save a step.

If I take a screenshot of Both the original and ProRes 422 videos on the same frame, the ProRes color looks deeper and maybe a bit more muddy (highs blown maybe and shadows crushed? haven't compared them on the histogram yet). So, here we are. Should I be, and do any of you make it a regular practice of converting the color matrix going from SD to HD video? Can this possibly be affecting the video difference (I can post jpegs on demand)? And would you like to perhaps share a good generic avspmod script for accomplishing this flow I've hopefully effectively explained.

You all have been very helpful so far, can we keep the train rolling?

B
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
02-09-2024, 02:09 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,280
Thanked 540 Times in 499 Posts
960x720 does not make any sense at all, It does more harm than leaving the native resolution alone, If you must, resize to 1440x1080, this is compatible with all current and future display panels as it is a multiple integer and no processing needed to display it other than simple line doubling.

https://www.youtube.com/@Capturing-Memories/videos
Reply With Quote
  #3  
02-09-2024, 06:27 AM
cbehr91 cbehr91 is offline
Free Member
 
Join Date: Sep 2013
Posts: 134
Thanked 20 Times in 18 Posts
I only upscale videos for web posting, not "just because".

To convert from SD to HD colorspace I use ColorMatrix in Avisynth ( ( ColorMatrix(source=2,dest=0) )
Levels conversion can be tricky in my experience. If your levels look overly contrasted you can run ColorYUV(levels="PC->TV") or vise-versa to scale to full range, but that can lead to blown out whites and crushed blacks. You can also add the string outputFR=true to ColorMatrix instead of ColorYUV, but again I caution it can lead to overly contrasted levels. That being said, to my eyes a lot of DV camera footage has had overly high black level (blacks look a lighter shade of dark grey).
Reply With Quote
  #4  
02-09-2024, 08:22 AM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
Quote:
Originally Posted by cbehr91 View Post
I only upscale videos for web posting, not "just because".

To convert from SD to HD colorspace I use ColorMatrix in Avisynth ( ( ColorMatrix(source=2,dest=0) )
Levels conversion can be tricky in my experience. If your levels look overly contrasted you can run ColorYUV(levels="PC->TV") or vise-versa to scale to full range, but that can lead to blown out whites and crushed blacks. You can also add the string outputFR=true to ColorMatrix instead of ColorYUV, but again I caution it can lead to overly contrasted levels. That being said, to my eyes a lot of DV camera footage has had overly high black level (blacks look a lighter shade of dark grey).
It wasn't a resize for no reason, I spelled out in the post my reasoning. Thanks for the advice on ColorMatrix cbehr91, I'll start playing with that. Is there a difference between ColorMatrix(source=2,dest=0) and ColorMatrix(mode="Rec.601->Rec.709")? Is it simply 2 different ways of accomplishing the same task? Also, the color difference I was seeing wasn't between the PC and TV, it was the original DV file and the converted ProRes 422 file on the same PC.
Reply With Quote
  #5  
02-09-2024, 09:56 AM
cbehr91 cbehr91 is offline
Free Member
 
Join Date: Sep 2013
Posts: 134
Thanked 20 Times in 18 Posts
Quote:
Originally Posted by BmacSWA View Post
Is it simply 2 different ways of accomplishing the same task? .
Yes. Same.

Quote:
Originally Posted by BmacSWA View Post
Also, the color difference I was seeing wasn't between the PC and TV, it was the original DV file and the converted ProRes 422 file on the same PC.
It sounds like something you don't want is getting changed in your DV to ProRes conversion, or the colors could be changing as a result of the chroma subsampling conversion from 4:1:1 to 4:2:2. I'm not a Mac person, and I've never encoded files to ProRes, so I don't know how customizable settings like colorspace is in the encoding settings in VirtualDub.

Last edited by cbehr91; 02-09-2024 at 10:16 AM.
Reply With Quote
  #6  
02-09-2024, 10:06 AM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
Quote:
Originally Posted by cbehr91 View Post
Yes. Same.

It sounds like something you don't want is getting changed in your DV to ProRes conversion, or the colors could be changing as a result of the chroma subsampling conversion from 4:1:1 to 4:2:2. I'm not a Mac person, and I've never encoded files to ProRes, so I don't know how customizable settings like colorspace is in the encoding settings in VirtualDub.
I did just add ColorMatrix (mode"rec.601"->"rec.709) after AVISource in my script after adding the .dll to Avisynth+ and it worked, but now I seem to have a 3rd color version. The reds are more vibrant than both the DV or original ProRes, but the darks are closer to the DV. I suppose I can encode to something else and see what I end up with. I do believe it's a combination of 411 to 422 and 601 to 709 which I'm only at about 50% understanding. It's not a huge deal, just looking for a tightened up converting process so I'm not tempted to come back at a later date and do it all over.
Reply With Quote
  #7  
02-09-2024, 02:37 PM
cbehr91 cbehr91 is offline
Free Member
 
Join Date: Sep 2013
Posts: 134
Thanked 20 Times in 18 Posts
Another thought I had is asking which processing mode in VirtualDub do you use when you convert your DV files to ProRes (under the Video tab)? Full processing mode might be unnecessarily converting your video from 4:1:1 to RGB before you export to 4:2:2. VD should let you simply convert your file using Fast Processing mode. If you get an error, try Normal Processing.
Reply With Quote
  #8  
02-09-2024, 02:52 PM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
Quote:
Originally Posted by cbehr91 View Post
Another thought I had is asking which processing mode in VirtualDub do you use when you convert your DV files to ProRes (under the Video tab)? Full processing mode might be unnecessarily converting your video from 4:1:1 to RGB before you export to 4:2:2. VD should let you simply convert your file using Fast Processing mode. If you get an error, try Normal Processing.
Not getting errors, but I am using full processing mode. I just assumed I'd do it the same way as the Hi8 and VHS. I'll give it a try and see what happens.

Quote:
Originally Posted by cbehr91 View Post
Another thought I had is asking which processing mode in VirtualDub do you use when you convert your DV files to ProRes (under the Video tab)? Full processing mode might be unnecessarily converting your video from 4:1:1 to RGB before you export to 4:2:2. VD should let you simply convert your file using Fast Processing mode. If you get an error, try Normal Processing.
Just an update, Fast processing gave me an error, Normal works fine with a very similar color output as Full encoding. What's a rule of thumb I should follow using Full processing vs Normal processing?
Reply With Quote
  #9  
02-09-2024, 05:35 PM
cbehr91 cbehr91 is offline
Free Member
 
Join Date: Sep 2013
Posts: 134
Thanked 20 Times in 18 Posts
Take a look at VirtualDub's documentation. You really should only use Full Processing Mode when utilizing VirtualDub's internal filters.
Reply With Quote
  #10  
02-10-2024, 01:19 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 396
Thanked 75 Times in 68 Posts
Quote:
Originally Posted by latreche34 View Post
960x720 does not make any sense at all... 1440x1080...is a multiple integer and no processing needed to display it other than simple line doubling.
720x3=2160
Reply With Quote
  #11  
02-10-2024, 01:58 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,280
Thanked 540 Times in 499 Posts
Quote:
Originally Posted by traal View Post
720x3=2160
I think you forget something, 480 to 720 yikes, severe damage due to rounding errors. Even 480 to 1080 is not recommended, It is just the base of all future resolutions, do it right and forget it. Tell me one good thing can come out of converting from 720x480 to 960x720 you can't get if converting from 720x480 to 1440x1080 in terms of quality?

It's clear the OP is not aware of how math is calculated during resizing, most newbies treat screen resolution as painting canvas, so you can zoom in and zoom out without consequences, that's not how it works in reality, I've already answered your silly argument of 720x3 before when the damage has already been done during the resize.

Quote:
Originally Posted by CaptureGuru View Post
3) Resize to 960x720 (Mainly for larger number of pixels to give Neat Video Denoiser more data)
My less destructive suggested resolution is for the exact same reason and more resizing ratio for less rounding errors.
Reply With Quote
  #12  
02-10-2024, 03:31 PM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,610
Thanked 2,458 Times in 2,090 Posts
Quote:
Originally Posted by CaptureGuru View Post
...
I fail to see what's so amusing here.

Sometimes upsizing before NR is valid, even required. It depends on factors. I would not wholesale do it, but I would equally not dismiss it.

Software workflow matters.

Quote:
Originally Posted by latreche34 View Post
I think you forget something, 480 to 720 yikes, severe damage due to rounding errors. Even 480 to 1080 is not recommended, It is just the base of all future resolutions, do it right and forget it. Tell me one good thing can come out of converting from 720x480 to 960x720 you can't get if converting from 720x480 to 1440x1080 in terms of quality?
It's clear the OP is not aware of how math is calculated during resizing, most newbies treat screen resolution as painting canvas, so you can zoom in and zoom out without consequences, that's not how it works in reality, I've already answered your silly argument of 720x3 before when the damage has already been done during the resize.
My less destructive suggested resolution is for the exact same reason and more resizing ratio for less rounding errors.
I don't think the argument is silly. I wouldn't even classify it as an "argument".

This is a topic that always amuses me. There are folks online that insist I'm some sort of over-the-top perfectionist, because I rightfully poo-poo their cheap capture hardware choices (as it yield crap quality for them). But when it comse to some of these higher-level discussions, the peanut gallery is nowhere to be found.

I'm just not anal about colorspaces and resolutions, in post-capture settings.

Yes, we need to acquire as much as we can from the tape. But all of the software workflow is determined by ... well .... the software! And I'm not referring to some $50 Chinese junkware, but Premiere, FCP, etc. We have to fit into their confines, and realizing our local CPU/etc/hardware is a factor.

I'm not really for, or against, 960x720, 1440x960, and whatever.

I'm also neutral on how many times the resolution is changed, as sometimes 2-3 scaling processes at required from the post-ingest file to the delivery file.

Sometimes the dogma online doesn't even match what happens in studios, and those videos are sometimes held up as the gold standard of processing.

You simply must test, check, vet, and make the best decisions. There's no one correct answer. Most times, "less is more". Sometimes "more is more".

There are many bad/wrong answers, which is obvious from you see the bad/wrong video output. But choices on colorspace conversions, resolution up/downsizng, etc, should be invisible to near-invisible when done correctly.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #13  
02-10-2024, 04:53 PM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,280
Thanked 540 Times in 499 Posts
Maybe I misunderstood the snarky smile

LS edit: CaptureGuru is now banned, posts deleted. This is a forum for helping others, not snarky/smartass comments that offer no help to the conversations.

Last edited by lordsmurf; 02-10-2024 at 05:00 PM. Reason: Edited. -LS
Reply With Quote
  #14  
02-11-2024, 10:20 PM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
Ok latreche32, I’m interested to hear how you would take 720x480 and 1) go from rectangular to square (ie 4x3) 2) crop out the right, left and bottom “overscan” then 3) upscale it acceptably to a larger resolution. I’d welcome your thoughts.

B
Reply With Quote
  #15  
02-12-2024, 12:55 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,280
Thanked 540 Times in 499 Posts
First off, the correct aspect ratio for non square SD originated from tape formats is 704:480 (NTSC), So any crop you do it has to be based on this ratio, few lines off is okay, But before you do any cropping you have to de-interlace first to avoid reversing the field order.
So when you finish de-interlacing and cropping to your desired frame, all you have to do is resize to 1440x1080, That's it, All the proportions will line up perfectly, as long as the ratio is based on 704:480 or close enough (I personally don't go more than 5 pixels/lines per side). I do it in AvsPmod in one process as follows:

Code:
AviSource("C:\Users\User\Videos\Captures\FileName.avi")
AssumeBFF()
QTGMC(Preset="Faster")
Crop(X1, Y1, -X2, -Y2)
LanczosResize(1440, 1080)
Reply With Quote
  #16  
02-15-2024, 09:58 AM
BmacSWA BmacSWA is offline
Premium Member
 
Join Date: Jun 2022
Location: Michigan
Posts: 34
Thanked 4 Times in 4 Posts
Ok, the resize to 1080 from SD has sunk in. The way I see it, 720x480 capture NTSC rectangular equates to 720x540 square, then resizing by a multiple of 2 is 1440x1080 Crystal clear. Now, the 704x480 has me a little off. Is that just what you end up with removing the black bars on the side? I've been keeping the 4:3 ratio and my script for DV looks like this...

SetFilterMTMode("QTMGC", 2)
AVISource("Type_Filename_Here.avi", audio=true)
#ConvertToYUY2()
#Start with no convert line above, if error YUY2, if still error YV12
AssumeBFF()
QTGMC(Preset="Fast", EdiThreads=3)
Crop(4,0,-4,-6)
BilinearResize(1440, 1080)
Prefetch(7)

Hi8 is...

SetFilterMTMode("QTMGC", 2)
AVISource("Type_Filename_Here.avi", audio=true)
#ConvertToYUY2()
#Start with no convert line above, if error YUY2, if still error YV12
AssumeTFF()
QTGMC(Preset="Fast", EdiThreads=3)
Crop(8,0,-8,-12)
BilinearResize(1440,1080)
Prefetch(7)

I'm only taking 16 off to remove the bars, 8 a side. Are you saying to be the proper NTSC shape I need to remove 8 on each side? that makes the proper NTSC frame?

Also I just noticed Bilinear, I've actually been using Spline64resize. Do you prefer Lanczos? I haven't tried it.

Appreciate your advice, B
Reply With Quote
  #17  
02-15-2024, 10:21 AM
lordsmurf's Avatar
lordsmurf lordsmurf is offline
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,610
Thanked 2,458 Times in 2,090 Posts
720x480 is 3:2 storage AR (SAR)
720 is padded, 704 active

So crop to 704x480, which is still a SAR

But for VHS/etc analog tape conversions, you have head-switching noise to contend with, at least 10 pixels at bottom, at least 2 on top, and possibly even some left/right that are not the padded 704>720 narrow pillarbars. Mask is best, 4:3 cropping less ideal. If you crop, AR and geometry quality gets hit.

If you were to drop it to 640x480 (4:3 AR) -- do not do this! example only! --
and then double it
you'd have 1280x960 (4:3 AR)
but of course that's not video standard to anything

If you were to resize 3:2 704x480 to 4:3 720x540 (a 1:1~4:3), then you can double it to 1440x1080
Pad black bars left/right for 1920x1080

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
  #18  
02-15-2024, 11:39 AM
latreche34 latreche34 is offline
Free Member
 
Join Date: Dec 2015
Location: USA
Posts: 3,280
Thanked 540 Times in 499 Posts
Quote:
Originally Posted by BmacSWA View Post
I'm only taking 16 off to remove the bars, 8 a side. Are you saying to be the proper NTSC shape I need to remove 8 on each side? that makes the proper NTSC frame?
If you are not going to do further cropping then yes, as LS said, crop to 704, mask the junk around and resize to 1440x1080 or pad to 1920x1080.

If you are going to crop and not mask however, you don't need to crop to 704 first, you do one time cropping to your desired frame edge while respecting the aspect ratio of 704:480, I'll give you an example:

Lets say there are 8 pixels junk on the left, 10 on the right, 4 on top and 6 at the bottom of the frame, So you have 720-8-10=702 pixels and 480-4-6=470 lines. if you just resize based on this resolution your aspect ratio will be screwed up because 702x470 is not a standard ratio 702/470=1.49 does not equal 704/480=1.46.
You have 3 options here:
- Crop to a clean frame and lose some of the active contents, So 470x(704/480)=690 pixels (rounded to the nearest even number). So you get 690x470 (1.46), 12 pixels of lost active contents. Resize this directly to 1440x1080 and you're done.
- Crop to the nearest clean edge, means one side will be clean, the other will have some junk left, So 702x(480/704)=478 lines (rounded to the nearest even number). So you get 702x478 (1.46), 8 extra lines of junk will be still visible. Resize this directly to 1440x1080 and you're done.
- A compromise crop, where you combine both approaches, without leaving any junk visible by altering slightly the aspect ratio, So instead of losing 12 pixels of active contents you can decide to lose 6 pixels only, So you crop to 696x470 and resize this directly to 1440x1080 and you're done.

This last approach is what I use most of the time, the aspect ratio error is not noticeable at all, I did a lot of experimenting with different contents and could not notice it, In the example above it is 1.17% off, Up to 3% off is acceptable.

If you go back to the CRT TV era and think about how much overscan was thrown away from the frame you'll be shocked, It's like more than 20 pixels all around, So compared to the first option where you lose 12 pixels on one dimension only is nothing, Most tape contents are formatted to be viewed that way accounting for that massive overscan, Even consumer camcorders have overscan on the viewfinder already so that when viewed on TV nothing is lost, So you don't have to worry about losing some of the active area to have an exact aspect ratio if you so choose the first option.
Reply With Quote
  #19  
02-15-2024, 03:47 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 396
Thanked 75 Times in 68 Posts
Or resize the cropped 702x470 video directly to 1466x1080, square pixels. I used the following formula:

Code:
dest_x = (10/11) * (cropped_x/cropped_y) * 1080
In this case:

Code:
dest_x = (10/11) * (702/470) * 1080 = 1466
For PAL, use the following formula:

Code:
dest_x = (12/11) * (cropped_x/cropped_y) * 1080
If you prefer 1440 pixels across, then crop again afterwards. Or plug 1440 into dest_x and solve for cropped_x to figure out how much to crop before resizing.

Last edited by traal; 02-15-2024 at 04:05 PM. Reason: Crop again if desired.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Color streaks, washed out color on VHS? Roob2000 Capture, Record, Transfer 5 07-24-2020 06:37 AM
Questions on YUV to RGB conversion & using Color Tools histograms stevevid Restore, Filter, Improve Quality 0 03-03-2019 07:57 PM
HDMI matrix switcher for home use? TimKrisp Videography: Cameras, TVs and Players 1 12-13-2017 06:20 PM
Color calibrating your monitor? (Seeing "true" color of your video captures) baywatch242000 Project Planning, Workflows 4 04-09-2014 01:30 PM
DV color space harmful to analog color quality? Verify? DeXeSs Capture, Record, Transfer 6 06-27-2010 01:48 AM

Thread Tools



 
All times are GMT -5. The time now is 10:01 AM