#1  
04-18-2023, 02:00 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
Cross posted from another forum.
Long time lurker here.

I have a video capture. I'm going to try to upload a few seconds of video. (*Going to have to cut it down to meet the 99MB file requirement)
The problem: You'll see the video "flashes" a few times during playback and I'm unsure why.

Here is my process.

I have my vcr connected to a Panasonic DMR-ES15 in-line as a kind of video stabilizer, substitute for a time based corrector.

I capture using a USB-Live 2 and I use HuffyUV codec to obtain a lossless .avi capture using AmarecTV.
My capture looks decent (to me).
From there, I have this little script I made in AVIsynth+. I am self taught, going through the forums here.
I open this script in VirtualDub (or Virtualdub 2) and save the video also using Huffyuv codec, 4:2:2 YCbCr (YUYV, YUY2) pixel format.

I was using this script:

SetFilterMTMode("QTGMC",2)
FFMPEGSource2("F:\amarectv310\captures\stvhs1.avi" ,atrack=1)
ConvertToYV12()
AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=3)
BilinearResize(720,540)
Prefetch(1)

this deinterlaced the vhs capture and improved the picture.
Sometimes, it worked beautifully. Other times, the audio would get out of sync.
From reading other forums, I think FFMpegSource2 was dropping frames, causing the audio to get out of sync.
My computer is old, 32-bit operating system Windows Vista (Pentium Dual CPU)

I realized, I was capturing an AVI, so I adjusted the script as follows. This is the one I used which produced the "flashing" video.
Except for the flashing, I'm pleased with the results. But, hoping the group can provide some helpful info to help a newbie out. Thank you.


SetFilterMTMode("QTGMC",2)
AVISource("F:\amarectv310\captures\stvhs1.avi")
ConvertToYV12()
AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=3)
BilinearResize(720,540)
Prefetch(1)

I have since changed the script to
ConvertToYV12(interlaced=true).

I feel like Iím really close on this, but just trying to solve this flashing issue.

My Huffyuv is version 2.1.1
AVISynth+ 3.7.2
QTGMC 3.383
MaskTrools2 2.223
RGTools 1.0.7
MVTools 2.7.31
Nnedi3 0_9_4_60
Zs_RF_Shared 1.157
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
04-18-2023, 02:16 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 342
Thanked 65 Times in 59 Posts
Try the "Faster" preset for QTGMC, I find it makes slow motion video flicker a little bit less.
Reply With Quote
  #3  
04-18-2023, 06:23 PM
hodgey hodgey is offline
Free Member
 
Join Date: Dec 2017
Location: Norway
Posts: 1,608
Thanked 433 Times in 371 Posts
Regarding audio sync avisource and ffmpegsource can sometimes act differently when loading a .avi source, I've experienced this as well. Think it might have something to do with timestamps and/or frames marked as dropped in the avi file but not sure.

Did you not get "flashing" when you were using ffmpegsource2? Hard to say exactly what to adjust without knowing more in detail what you mean by "flashing".

Also you want to call AssumeTFF to be right after loading before calling convertoyv12 so it uses the correct ordering.

My Video gear overview/test/repair/stuff yt channel http://youtu.be/cEyfegqQ9TU
Reply With Quote
  #4  
04-18-2023, 08:05 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
The attached clip should display the error I refer to as "flashing."

I tried to set the speed of QTGMC to "faster" as mentioned above and the error is still present.
I will try to reorder my instructions as above.

I do not experience this flashing when I used the command FFMPEGSOURCE2. When I did that, I got some very nice files. I also often got files where the audio was out of sync.

Thank you for the kind replies thus far.


Attached Files
File Type: avi sample 1990_11_30 Garrett DeKalb qtgmc_avisource.avi (86.54 MB, 7 downloads)
Reply With Quote
  #5  
04-18-2023, 09:38 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 342
Thanked 65 Times in 59 Posts
It looks like the source file is corrupted.
Reply With Quote
  #6  
04-19-2023, 07:51 AM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
Attached is raw capture of the same segment. I don't believe it's corrupted or shows errors.


Attached Files
File Type: avi sample_raw stvhs1 bball.avi (32.88 MB, 4 downloads)
Reply With Quote
  #7  
04-19-2023, 08:40 AM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 342
Thanked 65 Times in 59 Posts
I feel like I had this problem once in the past with a certain version of HuffYUV. But I'm not seeing it now.

Clipboard01.png

The blacks/shadows in the source video are crushed.

Here's my script:

Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2)
AviSource("sample_raw stvhs1 bball.avi")
AssumeTFF()
ConvertToYV16(interlaced=true)
ConvertBits(16)
ColorYUV(levels="TV->PC")
ApplyGradationCurves(lumaPoints="0,4,179,255")
ColorYUV(levels="PC->TV")
ConvertToRGB32(interlaced=false, matrix="Rec601")
ConvertToYUY2(interlaced=true)
QTGMC( Preset="Medium", Sharpness=1.0 )
ConvertToRGB32(interlaced=false, matrix="Rec601")
Crop(4,0,-9,-9)
AddBorders(6,4,7,5)
Prefetch(4)


Attached Files
File Type: mkv output.mkv (6.35 MB, 7 downloads)
Reply With Quote
The following users thank traal for this useful post: tbird97 (04-19-2023)
  #8  
04-19-2023, 10:30 AM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
I'm pretty sure I just installed 32-bit Huffuv. Now that I'm reading through, there does appear to be a multithreaded version for dual core processors.

I can give that a try.
Reply With Quote
  #9  
04-19-2023, 11:31 AM
hodgey hodgey is offline
Free Member
 
Join Date: Dec 2017
Location: Norway
Posts: 1,608
Thanked 433 Times in 371 Posts
If you mean huffyuv-mt thing, it's a separate incompatible variant that is not very well supported in general. It doesn't support opening other huffyuv-variants afaik. Would rather suggest switching to utvideo instead if you're having codec issues as it's still being maintained.

Also not codec/avisynth-related I am seeing something that looks like interference on that capture, unless it's something on the tape.

EDIT: Thinking about it, maybe it's the corruption resulting in flashes when using avisource that's also the cause of audio sync issues when using ffmpegsource instead. They might handle corrupted data differently.

My Video gear overview/test/repair/stuff yt channel http://youtu.be/cEyfegqQ9TU
Reply With Quote
The following users thank hodgey for this useful post: tbird97 (04-19-2023)
  #10  
04-19-2023, 12:13 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
You may add another "thanks" to your total.
That Huffyuv-MT was indeed what I downloaded and intended to try, but have not yet tried it. I did read a thread where it was not very well supported, but I think my old Pentium dual core machine may have been what it was intended for?

I have the Lagarith codec installed. Somehow, I was intent on Huffyuv and it did not occur to me to try it with Lagarith. I'll give that a try and may also download and experiment with UTvideo. Just remembering I have an old 32-bit machine still running on Vista.

Thank you. This is why groups and forums are helpful.
Reply With Quote
  #11  
04-19-2023, 07:00 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
I got home and tried to QTGMC using Lagarith codec rather than Huffyuv.
I got the same green flashing.
I tried another video rather than the basketball one and still got the same result.

I read a related post on this forum about using FFmpegsource2 and Hugfyuv. It sounds like using a different codec during capture may solve the audio out of sync issue when I used FFMpegsource2.

The basketball video is borrowed and I wanted to capture to make a nice tribute as one of those players was recently killed. Trying to solve that so I can return the borrowed tape.

I am open to suggestions, but may try a new capture using FFV1 rather than Huffy and FFmpegsource2 as that worked for me other than the sometimes audio sync drift.
Rather than capture, it appears I reencode my capture to FFV1, then try QTGMC.
Reply With Quote
  #12  
04-20-2023, 03:08 AM
themaster1 themaster1 is offline
Free Member
 
Join Date: Feb 2011
Location: France
Posts: 391
Thanked 88 Times in 73 Posts
qtgmc support yv16() not YUY2, perhaps that's the cause of your green flashes

Code:
avisource()
assumetff()
convertotyv16(interlaced=true)
qtgmc(Preset="fast",edithreads=4)
selecteven()
converttoyv12(interlaced=false)
# videos filters....
Reply With Quote
  #13  
04-20-2023, 03:39 AM
hodgey hodgey is offline
Free Member
 
Join Date: Dec 2017
Location: Norway
Posts: 1,608
Thanked 433 Times in 371 Posts
If the color space is wrong you get wrong colors on each frame just not on random frames. The scripts in the original post use yv12 though it's just traals weird script that converts back and forth between RGB and yuy2 for some reason I don't understand. QTGMC works with both yv12 and yv16 though yv16 tends to be a bit slower though converting to yv12 before qtgmc will halve the vertical chroma resolution which may or may not be fine depending on source and format. (Also if using the avisynth script in the last post remove selecteven unless you really need to halve the framerate for some reason.)

Are all the video frames there when using ffmpegsource?

I suspect the video codec is not the issue here, but rather something with the .avi file itself which avisource and ffmpegsource2 is interpreting differently, possibly dropped/inserted frames during capture. Have you tried using virtualdub2 instead of amarectv for capture?

I have experienced audio sync issues with ffmpegsource2 too that didn't happen with avisource on the same file but I didn't get corrupted frames when using avisource so not sure if it's the same problem.

My Video gear overview/test/repair/stuff yt channel http://youtu.be/cEyfegqQ9TU
Reply With Quote
  #14  
04-21-2023, 04:04 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 342
Thanked 65 Times in 59 Posts
Quote:
Originally Posted by hodgey View Post
it's just traals weird script that converts back and forth between RGB and yuy2 for some reason I don't understand.
Sorry, the following 2 consecutive lines:

Code:
ConvertToRGB32(interlaced=false, matrix="Rec601")
ConvertToYUY2(interlaced=true)
are not needed for this particular script. Between the two I usually have commands to fix some flaws that require RGB32.
Reply With Quote
  #15  
05-03-2023, 10:00 AM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
Still trying to solve my video problem.
First, I ran AVIsynth Tool.
I got the attached results.
Does this mean that my Zs_RF-Shared.avsi is duplicated somehow, OR that I have the darn thing saved in the wrong text format?


Attached Images
File Type: jpg IMG_5058.jpg (125.9 KB, 1 downloads)
File Type: jpg IMG_5057.jpg (121.8 KB, 0 downloads)

Last edited by tbird97; 05-03-2023 at 10:03 AM. Reason: attachments not attached.
Reply With Quote
  #16  
05-04-2023, 05:43 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
I converted my capture file to FFV1 codec.
From there, I again tried the QTGMC script as above. When I ran QTGMC, I selected huffyuv and 4:2:2 yuy encoding.
The "flashing" is gone, but produced the attached result which stutters, in places. Much of the capture is very good, but there are places where it stutters when playing back.

Rather than take all those steps, I decided to try a different approach. I captured my video again, this time using Lagarith codec.
When I ran the QTGMC avisynth script, I got an error,
"AVISource: couldn't locate a decompressor for fourcc LAGS
(F:amarectv310\captures\qtgmc_avisource.avs, line 2)

How do I solve this for Lags to use QTGMC?
I also have read that LSMASHsource gets good results, but the script looks more complicated.

I would prefer to either do it with Lagarith which I have installed and if I can just figure out this decrompressor mystery, OR, if someone could help with a proper script as above, but using LSMASHsource, I'd be willing to give that a try.

Thank you.


Attached Files
File Type: avi sample 1990_11_30 Garrett DeKalb huffy qtgmc.avi (96.28 MB, 3 downloads)
Reply With Quote
  #17  
05-04-2023, 06:24 PM
traal traal is offline
Free Member
 
Join Date: Jan 2016
Posts: 342
Thanked 65 Times in 59 Posts
Quote:
Originally Posted by tbird97 View Post
The "flashing" is gone, but produced the attached result which stutters, in places.
It doesn't stutter for me. I think it stutters on your machine due to high CPU load or hard drive bandwidth. Once you convert it to a distribution format such as H.264, it should play more smoothly.

Quote:
Originally Posted by tbird97 View Post
I captured my video again, this time using Lagarith codec.
When I ran the QTGMC avisynth script, I got an error,
"AVISource: couldn't locate a decompressor for fourcc LAGS
(F:amarectv310\captures\qtgmc_avisource.avs, line 2)
That means the Lagarith codec isn't installed. Are you doing this on the same machine that you captured on?

Last edited by traal; 05-04-2023 at 06:27 PM. Reason: Lagarith
Reply With Quote
  #18  
05-04-2023, 06:54 PM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
Yes, same machine. Installed Lagarith a long time ago. I can try to reinstall it.
Reply With Quote
  #19  
05-05-2023, 11:13 AM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
I reinstalled Lagarith.

As I was investigating this, I found another form here. It looks like Virtualdub 2 has a copy of Lagarith installed internally. I don't know if that is the conflict.

https://forum.videohelp.com/threads/...ndependent-one



I couldn't get AVISource to recognize my Lagarith capture. I kept getting the decompressor error.
I gave it a whirl in Virtualdub 1 with the same result using AVISource, decompressor error.
I changed the script to FFMPegsource and it ran, but immediately the audio was out of sync.

So, I think I either need to figure out how to get AVIsynth to decompress my Lagarith capture or try switching to LSMASHSource, which I've downloaded, but haven't yet figured out the script as it seems a bit more involved.

Now, this has become a mystery to me and I'm just determined to get a good result out of this yet!
Reply With Quote
  #20  
05-26-2023, 08:07 AM
tbird97 tbird97 is offline
Free Member
 
Join Date: Dec 2015
Posts: 14
Thanked 0 Times in 0 Posts
Still trying to solve my mystery.
Attached is a short clip (very short to fit the file attachment requirements).
You can see some frames where it flashes green.

I'm capturing using Huffyuv.
My capture looks good to me.

It's when I go to QTGMC in AVIsynth+ and Virtualdub2 that the result comes out with these flashing frames.
Is it somehow introducing garbage or extra frames?

When I tried to QTGMC wtih Lagarith, I got an decompression error.
I tried converting it to UTvideo and got a memory error when I tried to QTGMC.

Looks like I do have the ability to capture using UTvideo rather than convert it.

Just trying to get these videos to go through QTGMC. I have tried using a script with FFMPEGSOURCE2 and my audio was unsynced.

My audio appears to remain syced when I use AVISource in the script, but it's introducing these green frames.

Open to suggestions.


Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth+ QTGMC audio out of sync Nik92 Restore, Filter, Improve Quality 11 02-05-2023 08:40 PM
QTGMC and Avisynth installed, but won't run? Hushpower Restore, Filter, Improve Quality 7 10-02-2020 05:21 AM
Recommended PC Hardware for AviSynth and QTGMC JPMedia Restore, Filter, Improve Quality 1 03-15-2019 01:12 PM
Avisynth script for QTGMC, encode x264 - no video after deinterlace? mo418 Capture, Record, Transfer 18 09-16-2015 01:06 PM
QTGMC How-to: Help deinterlacing with Avisynth Joekster Restore, Filter, Improve Quality 1 12-22-2011 04:27 PM

Thread Tools



 
All times are GMT -5. The time now is 01:26 PM