Quantcast Hybrid/Vapoursynth is crushing shadow detail? - digitalFAQ Forum
  #1  
12-29-2021, 04:43 PM
bradgranath bradgranath is offline
Premium Member
 
Join Date: Dec 2021
Posts: 11
Thanked 0 Times in 0 Posts
I am trying to use QTGMC to de-interlace some Video8 tapes, and having a problem with colors. I think colorspace, but I'm pretty inexperienced there, so who knows. Mebe you.

Background: I'm getting decent captures from my Osprey 260e connected with S-Video to a CCD-TRV108 with [EDIT], [TCB], and [DNR] all turned on. There's a very occasional tear at near the beginning of some scenes because the tapes were sometimes playback reviewed while shooting, and the tapes were never striped first, so the VTR TCB has a hiccup while it catches up and sorts things out, but there aren't a lot of these borders, and 99 percent of scenes are captured looking like they do on the the old tube TV with no issues. I don't really think this is relevant, but what the heck.

I'd like these to eventually be watchable on a 1080p display, so I'm working on establishing a workflow for deinterlace, upscale, and noise removal.

Hitting a snag at the first step.

I'm using the latest Hybrid package for MacOS from https://www.selur.de/downloads

The only thing I've checked is the checkboxes for:
Use QTGMC selected
Fast selected
Even selected
Bob not selected
OpenCL selected

Not doing any other processing right now (I was earlier, but stripped it all out for troubleshooting, and it's still happening.

The container is AVI, and video is processed to FFvHuff

But the shadows look like this!
Screen Shot 2021-12-29 at 2.06.50 PM.png

Original:
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


It's got something to do with video levels, and digital colorspaces, but I'm not sure where to start.


Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
12-29-2021, 05:02 PM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
Post a segment of your video to better understand and do some experiment...

A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
  #3  
12-29-2021, 07:14 PM
bradgranath bradgranath is offline
Premium Member
 
Join Date: Dec 2021
Posts: 11
Thanked 0 Times in 0 Posts
Original: sample.avi
After going through Hybrid: sampleQTGMC.avi

Why is the filesize cut in HALF? That doesn't seem like it should be possible unless I'm really screwing up somewhere.

I'd much prefer to cut the huffing all together since they're a pain in the neck for file interchange, none of my NLE's will read them, and I have storage galore, but I can't figure out how to get Hybrid to output uncompressed AVI files.



Last edited by bradgranath; 12-29-2021 at 07:29 PM.
Reply With Quote
  #4  
12-30-2021, 05:45 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
If you see problems with your Hybryd flow, it must be related to it, so double check your settings. Using a GUI like Hybryd is not easy, because some processing on the video can be hidden or not managed by the user.
I do not use Hybrid, so I am not familiar with its options and cannot help here, sorry.

Some preliminary remarks:
  • The sample size is 640x480, it should be 720x480
  • The sample codec is HuffYUV_MT, it should be HuffYUV
  • The color format is unknow to me, because I used FFmpegSource to open the file, it should be YUY2.
  • Your card captures in the range 16-XXX, so any black < 16 is not captured. However I do not see spikes at Y=16, not sure if it is ok or if the capture is missing something
  • There are spikes in the middle of U and V channels, do not know why
The video shows halo. If possible remove any sharpening at hardware level in the player, otherwise add a dehalo filter in the processing, because the halo will be enhaced in post-processing:
halo.png

The levels and histogram on captured video looks ok, and in the range 16-230:
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.

sample_step1a.png

The histogram on your processed video shows an expansion to 0-235, thus you see darker areas. You can compensate for that with Levels() at the end of the processing according to your taste:
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


I quickly run a not optimized avisynth script to deinterlace, denoise and upscale, and I do not see a level problem. The histogram of the final video is narrower than yours:
sample_step1b.png

Here a comparison between sample.avi resized and video processed, compressed to mp4 for upload size reason. A bit of plastic look and halo on video processed because not optimized script:
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


Here a comparison between sampleQTGMC.avi resized and video processedd, compressed to mp4 for upload size reason:
sampleQTGMC_step1b.png

For final delivery you can compress to h264 using ffmpeg in a command line:
Code:
ffmpeg.exe -i input.avs -c:v libx264 -aspect 4:3 -c:a aac output.mp4
or upload your processed 1400x1080 HuffYUV file to Youtube without prior compression.

Used script:
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community.


Edit: your deinterlaced file is at the same framerate as the original, so not sure anymore what you wanted to achieve...


Reply With Quote
The following users thank lollo2 for this useful post: RobustReviews (12-30-2021), ThumperStrauss (01-24-2022)
  #5  
12-30-2021, 06:56 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
I added a bit of HDRAGC with

Code:
hdragc(corrector=0.5)
and the result comparison to previous processing is here (red chroma noise also highlighted):
compareX_sample_yt_yt_hdragc.mp4

cfr.jpg


Reply With Quote
  #6  
12-30-2021, 02:20 PM
bradgranath bradgranath is offline
Premium Member
 
Join Date: Dec 2021
Posts: 11
Thanked 0 Times in 0 Posts
HuffYUVMT: VirtualDub with Filters Pre-loaded + HuffYUV [DOWNLOADS]

Quote:
Originally Posted by lordsmurf
Why Huffyuv? What is Huffyuv ?

Aside from VirtualDub, the only thing you may need/want to actually install is the Huffyuv codec (for most systems) or Huffyuv-Multithreaded (for dual-core and quad-core computers).

Read more: VirtualDub with Filters Pre-loaded + HuffYUV [DOWNLOADS]
My capture system has dual quad core CPUs, so I use HuffYUV-Multithreaded. Though honestly Huffyuv gives so much hassle on playback, I’ve just been capturing uncompressed YUV. I compressed this sample to get it small enough to upload. Can upload a shorter one uncompressed.

720 vs 640:
OK, I admit, I’m waaaay down the rabbit hole at this point, but we’re talking about the horizontal dimension right? It’s already showing the overscan on the left side, and the PAR is correct and not distorted. Are you saying it’s cutting the video signal off the right side? Or that I should be capturing non square pixels? This is Video8 not Digital8 iiiif that makes a difference?

Deinterlaced is at the same frame rate:
Er, wasn’t this captured at 59.98i and I am trying to output 29.97p, or have I greatly misunderstood what QTGMC is doing?

Halos:
Preeeeetty sure I’ve got that all turned off/down as far as it will go, but will double check. Maybe is the [DNR] in the Sony?

Quote:
The histogram on your processed video shows an expansion to 0-235, thus you see darker areas. You can compensate for that with Levels() at the end of the processing according to your taste:

Read more: http://www.digitalfaq.com/forum/newr...#ixzz7GYzSr22D
Can you help me understand this part better? Are you saying that’s what happened to the original video, and now that data is lost/clipped in the processed video? Or that I encoded it differently; the detail is still there and but my player doesn’t know what to do with extended levels and just throws them out?
Reply With Quote
  #7  
12-30-2021, 03:14 PM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
Quote:
My capture system has dual quad core CPUs, so I use HuffYUV-Multithreaded. Though honestly Huffyuv gives so much hassle on playback, Iíve just been capturing uncompressed YUV. I compressed this sample to get it small enough to upload.
If I unsertand correctly you capture uncompressed and output HuffyYUV_MT. There is no need to capture uncompressed, you should capture lossless with (original) HuffyYUV.

Quote:
OK, I admit, Iím waaaay down the rabbit hole at this point, but weíre talking about the horizontal dimension right? Itís already showing the overscan on the left side, and the PAR is correct and not distorted. Are you saying itís cutting the video signal off the right side? Or that I should be capturing non square pixels? This is Video8 not Digital8 iiiif that makes a difference?
Well, I thinks you should capture at 720x480, because analog SD PAR is 4/3. Then your SAR (storage aspect ratio) will be 720/480=3/2 and your PAR (pixel aspect ratio)=DAR/SAR will be 4/3*2/3=8/9 (non square pixel, because PAR is not 1).
A reference file (PAL, replace 576 with 480): http://www.arachnotron.nl/videocap/d..._cap_v1_en.pdf

Quote:
Deinterlaced is at the same frame rate:
Er, wasnít this captured at 59.98i and I am trying to output 29.97p, or have I greatly misunderstood what QTGMC is doing?
For a true interlaced video like yours you should use a bobber deinterlacer (at double frame rate). Following is a PAL example, same for NTSC with different numbers:

interlaced frames video, 25 frames (50 fields) per second (25 frames i)
frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8
A..........C..........E.........G................. ........................................(field 0) even lines
b..........d..........f..........h................ .........................................(field 1) odd lines
PAL50Ii --> field 0 and field 1 are even and odd lines of "camera" frames taken at different time [true interlaced video]


[Bob interpolates the missing scanlines to make progressive frames]
QTGMCdeinterlaced [frame count is doubled]
frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8
A..........B'..........C..........D'.........E.... .....F'.........G..........H'..........(field 0) even lines
a'..........b..........c'..........d..........e'.. ......f..........g'..........h..........(field 0) odd lines
x' and X' represents scanlines interpolated from X and x

Quote:
Can you help me understand this part better? Are you saying thatís what happened to the original video, and now that data is lost/clipped in the processed video? Or that I encoded it differently; the detail is still there and but my player doesnít know what to do with extended levels and just throws them out?
I am saying that the video levels are fine (given the characteristics of your card), and something is happening in your Hybrid processing (where I cannot help) expanding the levels and creating dark areas.

It does not happen when processing your video with a "standard" AviSynth filtering. If you add a bit of more processing (hdragc) you can improve a bit the overall look; here a final comparison between original video and full processed video:
compareX_sample_org_yt_hdragc.mp4

If you do not wish to move to standalone AviSynth, try to debug your Hybrid settings. Maybe some user with experience on Hybrid can help here, or ask direct to Selur on his forum. He's a very nice person!


Reply With Quote
The following users thank lollo2 for this useful post: RobustReviews (01-03-2022)
  #8  
12-31-2021, 04:04 AM
bradgranath bradgranath is offline
Premium Member
 
Join Date: Dec 2021
Posts: 11
Thanked 0 Times in 0 Posts
I will ask Selur
Reply With Quote
  #9  
01-01-2022, 10:46 PM
bradgranath bradgranath is offline
Premium Member
 
Join Date: Dec 2021
Posts: 11
Thanked 0 Times in 0 Posts
Scratch that - I found the "Show Vapoursynth Script" button in Hybrid and checked to see what it was doing in the background. Turns out: a whole bunch of unnecessary color-space conversion. Commented it all out and ran it myself in the terminal and ffmpeg is outputting the correct levels.

Weird. Works for me, though.

Also:
Quote:
A reference file (PAL, replace 576 with 480): http://www.arachnotron.nl/videocap/d..._cap_v1_en.pdf
Holy Guacamole, that was extremely useful. I've got the Osprey 260e capturing at 720x480 now, and got the horizontal delay corrected to the VTR so that the overscan is centered and minimized now. Bonus, also found the procAmp controls. Thank you!
Reply With Quote
  #10  
01-03-2022, 08:12 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
Well done

A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
  #11  
02-09-2022, 02:51 AM
Selur Selur is offline
Free Member
 
Join Date: Feb 2022
Posts: 18
Thanked 8 Times in 6 Posts
Quote:
Turns out: a whole bunch of unnecessary color-space conversion.
Normally Hybrid should only add color space conversions if necessary, so it would be nice if you could share some details about this so I can reproduce this and fix it in Hybrid.

Cu Selur
Reply With Quote
  #12  
02-09-2022, 03:24 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
Welcome Selur! Nice to have you here

A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
  #13  
02-09-2022, 03:39 AM
Selur Selur is offline
Free Member
 
Join Date: Feb 2022
Posts: 18
Thanked 8 Times in 6 Posts
Thanks!
Hopefully bradgranath can give some feedback regarding the unncessary color space conversions.

Cu Selur
Reply With Quote
  #14  
02-09-2022, 05:18 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 265
Thanked 56 Times in 51 Posts
Quote:
Originally Posted by lollo2 View Post
I do not see spikes at Y=16
I do. It's a small spike to the left where luma slopes down to 0, but it doesn't make it all the way down before Y=16 because of the spike.
Reply With Quote
  #15  
02-10-2022, 02:19 AM
lollo2 lollo2 is online now
Free Member
 
Join Date: Mar 2013
Location: Italy
Posts: 515
Thanked 153 Times in 133 Posts
Correct, there is a peak. But we normally call a pattern "spike" if it is much higher than the average profile. And in this case if you look to the histogram of the OP processed video, there is no sign of crushed levels.

Once the OP posts is procedures as requested, we'll understand what happened inside his flow.

A channel on S-VHS / VHS capture and AviSynth restoration https://bit.ly/3mHWbkN
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Light sources in VHS whites out detail shane7951 Capture, Record, Transfer 4 09-06-2021 01:40 PM
VapourSynth + QTGMC Deinterlace + Hybrid FAQ for macOS ELinder Restore, Filter, Improve Quality 0 03-16-2020 09:01 AM
Less exposure/more detail with regular VCR than pro S-VHS VCR? history1 Capture, Record, Transfer 33 03-14-2020 07:41 AM
QTGMC deinterlace = lost detail? bakerie Capture, Record, Transfer 7 03-04-2020 10:35 AM
H.264 vs. MPEG-4 retains detail better? premiumcapture Encode, Convert for streaming 8 09-15-2014 09:53 AM

Thread Tools



 
All times are GMT -5. The time now is 02:29 AM