VideoHelp Forum




+ Reply to Thread
Results 1 to 19 of 19
  1. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Hello,

    Been a lurker here and learned from reading threads for a long time. Thought I had an account, but my computer just had me create a new one.

    I have a video capture. I'm going to try to upload a few seconds of video.
    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.
    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.

    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.
    My computer is old, 32 bit operating system.

    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 attached.
    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)
    Image Attached Files
    Quote Quote  
  2. Not related to the issue, but huffyuv is 4:2:2, so ConvertToYV12() should be ConvertToYV12(interlaced=true), otherwise you'll get interlaced chroma downsampling errors

    Some of the errors look like frame corruption .

    Are you saying that you do not get the flashing issue with FFMpegSource2 , and only with AVISource ?

    Are you saying that the out of sync issue only occurs with FFMpegSource2, but not AVISource ?

    What version of ffms2 and huffyuv are you using ? Probably old ones if you're using 32bit os


    Upload a corresponding sample of the source , maybe it 's a bad capture to begin with (need to rule that out first), or maybe you're using bad/depreciated versions of decoders
    Quote Quote  
  3. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Yes, upload a sample of the raw capture. BTW ConvertToYV12() or better ConvertToYV12(interlaced=true) is not needed prior to QTGMC.

    The attached file suffers from frames corruption and line errors inside the frame itself
    Quote Quote  
  4. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Thanks for the above replies. Let me try the suggestions above and I can try to get a sample from the original capture to compare.
    No, I have not noticed the flashing issue when using FFMpegSource2.
    Thanks again for the responses.
    Quote Quote  
  5. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Attached should be a small sample of my raw capture.
    This does not seem to me to display the errors which were present when I ran QTGMC.
    I tried running the script by first adding the ConvertToYV12(interlaced=true)
    and then tried it.
    Then, I tried deleting that line altogether from my script and the error seems to still appear.

    If frames are corrupt, do I just need to attempt a new capture?

    Once I have the raw capture, my script (at the moment) is thus:

    SetFilterMTMode("QTGMC",2)
    AVISource("F:\amarectv310\captures\stvhs1.avi")
    AssumeTFF()
    QTGMC(Preset="Slower",EdiThreads=3)
    BilinearResize(720,540)
    Prefetch(1)
    Image Attached Files
    Quote Quote  
  6. Code:
    ClearAutoloadDirs()
    SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
    LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\LSMASHSource.dll")
    LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\RgTools.dll")
    LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\masktools2.dll")
    LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\mvtools2.dll")
    LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\nnedi3.dll")
    Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi")
    Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi")
    Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi")
    # loading source: C:\Users\Selur\Desktop\sample raw capture stvhs1.avi
    # color sampling YUY2@8, matrix: bt601, scantyp: top field first, luminance scale: limited
    LWLibavVideoSource("C:\Users\Selur\Desktop\SAMPLE~1.AVI",cache=false,dr=true,format="YUV422P8", prefer_hw=0)
    # current resolution: 720x480
    # deinterlacing
    AssumeTFF()
    QTGMC(Preset="Fast", ediThreads=2)
    # filtering
    # scaling to 720x540
    Spline36Resize(720,540)
    # adjust color to YV12 (color matrix: Rec601)
    ConvertToYV12()
    # setting output fps to 59.940fps
    AssumeFPS(60000,1001)
    PreFetch(16)
    #  output: color sampling YV16@8, matrix: bt601, scantyp: progressive, luminance scale: limited
    return last
    works fine here.
    I also would:
    a. add SpotLess to remove some of the spots
    b. shift the chroma a bit using ShiftChromaSP
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  7. I don't get those bright flashes with QTGMC() and that source sample. Though I don't have a VFW huffyuv decoder installed so I had to use LWlibavVideoSource() instead of AviSource(). I'm also using AviSynth+.

    Code:
    LWLibavVideoSource("sample raw capture stvhs1.avi", cache=false, format="YUY2") 
    AssumeTFF()
    QTGMC(Preset="Slower",EdiThreads=3)
    BilinearResize(720,540)
    Prefetch(1)
    Image Attached Files
    Quote Quote  
  8. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Same as jagabo here using AviSynth (not +) and AviSource (HuffYUV 2.1.1 installed on my system). No flashing frames.

    Code:
    AviSource("sample raw capture stvhs1.avi")
    AssumeTFF()
    QTGMC(Preset="Slower",EdiThreads=3)
    BilinearResize(720,540)
    rest.avi
    Quote Quote  
  9. Though, I don't think there's any overlap between the bad portion of the clip in post #1 and the source clip in post #5. So one can't draw any conclusions.
    Quote Quote  
  10. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Yes, the raw capture starts later than the flashes in first clip...
    Quote Quote  
  11. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Attached should be a raw capture which includes the same footage.

    My AVIsynth is AVIsynth+.

    My version of FFMpeg2 appears to be 4.0.2.
    This is an older PC running 32 bit OS.

    Capturing this basketball footage and I have some VHS tapes wtih tv shows I've been transferring.
    When I used the code above with FFMPEGSOURCE2, I had what I thought were some decent results, except from time to time, the audio would get out of sync, particularly near the end of the clip.

    I tried changing the script from FFMPEGsource2 to AVIsource as in my first post, and have not (yet) experienced the audio sync issue, but the video contained the flashing.
    Maybe it is a problem with my source capture?

    If I go back to FFMPegsource2, do I still need to delete the line ConverttoVY12 or converttoVY12 (interlaced=true), or does that only apply to ASIsource script?

    Thank you for all the assistance. I hope to get this straighened out and get back to my capture project.
    Image Attached Files
    Quote Quote  
  12. I see nothing wrong with the clip in post #11. Using the script in your original post (except for adding interlaced=true to ConvertToYV12) shows no flashing.
    Quote Quote  
  13. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Same here. No flashing. The input is clean, the output is clean.

    AviSynth 2.60, QTGMC 3.364, MaskTools2 2.2.23, RgTools 1.0, MVTools 2.7.41, Nnedi3 0_9_4_55, Zs_RF_Shared 1.121

    Code:
    AviSource("10 sec stvhs1 bball 2.avi")
    AssumeTFF()
    QTGMC(Preset="Slower",EdiThreads=3)
    BilinearResize(720,540)
    Quote Quote  
  14. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Thanks. Will give it another try.
    Maybe I had a fluke somewhere!
    Quote Quote  
  15. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Here's another little nugget. Maybe this is the source of my issue?
    When I selected HuffyUV compression, it wants to convert to RBG24.
    Which selection do I want in this configuration window?
    Image Attached Thumbnails Click image for larger version

Name:	thumbnail_IMG_4645.jpg
Views:	71
Size:	499.8 KB
ID:	70388  

    Quote Quote  
  16. You want to capture as YUYV or YUY2. Then compress with huffyuv in 4:2:2 YCbCr (YUYV, YUY2) mode.

    With your current setup you are capturing as YV12 (YUV 4:2:0), converting to RGB, huffyuv is then converting the RGB to YUY2, and finally compressing it. So you have two useless lossy conversion between the capture device and the output file. That's a waste of CPU time and a possible cause of dropped frames. But not likely the cause of your QTGMC() problem -- which is most likely a version issue of all the filters used by QTGMC.
    Quote Quote  
  17. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    [QUOTE=lollo;2687041]Same here. No flashing. The input is clean, the output is clean.

    AviSynth 2.60, QTGMC 3.364, MaskTools2 2.2.23, RgTools 1.0, MVTools 2.7.41, Nnedi3 0_9_4_55, Zs_RF_Shared 1.121



    I have been running
    AviSynth+, QTGMC 3.383, MaskTools2 2.218, RgTools 0.97, MVTools 2.7.31, Nnedi3 0_9_4_51, Zs_RF_Shared 1.157


    I'm going to bring Masktools2, RgTools, MVTools and Nnedi3 up to the versions you have and see if that does the trick.
    I also see a few of those have newer versions. I'll try to bring them into line with yours first.

    Thank you.
    Quote Quote  
  18. Member
    Join Date
    Apr 2023
    Location
    Indiana, USA
    Search PM
    Resurrecting this post just long enough to say I finally did find my answer.
    For future visitors who may stumble across this thread.

    I tried all responses and suggestions listed above.
    What finally worked for me was using DirectshowSource in my code rather than FFmpegSource2, AVISource or LSMASHSource.

    No more "flashing" and my audio seems to have remained in sync when using an .avi source.
    Quote Quote  
  19. Member
    Join Date
    Aug 2018
    Location
    Wrocław
    Search PM
    Originally Posted by indyracingfan View Post
    Resurrecting this post just long enough to say I finally did find my answer.
    For future visitors who may stumble across this thread.

    I tried all responses and suggestions listed above.
    What finally worked for me was using DirectshowSource in my code rather than FFmpegSource2, AVISource or LSMASHSource.

    No more "flashing" and my audio seems to have remained in sync when using an .avi source.
    The file from the first post generates the following artifacts in MPC-HC (LAV Decoder). Same in VLC and VirtualDub.

    That's why I don't use Huffyuv, but UTVideo.

    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!