VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. Apologies if this is the wrong subforum.

    Been trying to deinterlace a VHS-C capture recorded with ffmpeg using QTGMC, specifically the "havsfunc" version for Vapoursynth, on Fedora Linux 37. For reasons I can't figure out, QTGMC causes something in my pipeline to choke and fail.

    Here is my script:

    import vapoursynth as vs
    import havsfunc as haf
    from vapoursynth import core
    video = core.ffms2.Source(source='test.mov')
    video = haf.QTGMC(Input=video, Preset="Slow", TFF=True)
    video = haf.Deblock_QED(video, quant1=60, quant2=60)
    video.set_output()
    I'm running it through ffmpeg with this command:
    vspipe -c y4m test-deinterlace.vpy - | ffmpeg -i - -c:v ffvhuff test-deinterlaced.avi

    Which gives me this error:
    double free or corruption (!prev)
    pipe:: Invalid data found when processing input

    Here is the video in question:
    Link

    It does seem to be specifically QTGMC, because when I remove that line from the script, I no longer have this issue. I have also tested this on another file captured in the same manner, with the same problem.

    If there's any additional relevant information I should share, please let me know, and thank you in advance for any help you can give.
    Quote Quote  
  2. What error message does --info give for vspipe ?
    Code:
    vspipe --info test-deinterlace.vpy -
    Quote Quote  
  3. Sounds like there is an issue with one of the filters.
    Using vspipe like poisondeathray suggested might show details of what is failing exactly.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  4. Originally Posted by poisondeathray View Post
    What error message does --info give for vspipe ?
    Code:
    vspipe --info test-deinterlace.vpy -
    double free or corruption (!prev)
    Aborted (core dumped)
    I also got a crash report from my system, which gives the "reason" as "vspipe killed by SIGABRT."
    Quote Quote  
  5. To eliminate vspipe or ffmpeg, what if you just request frames, to know if it is really just some filter>
    Make your file a *.py, not *.vpy and just run it.
    Code:
    import vapoursynth as vs
    import havsfunc as haf
    from vapoursynth import core
    video = core.ffms2.Source(source='test.mov')
    video = haf.QTGMC(Input=video, Preset="Slow", TFF=True)
    video = haf.Deblock_QED(video, quant1=60, quant2=60)
    for n, f in enumerate(video.frames()):
        print(n, f)
    Quote Quote  
  6. Originally Posted by _Al_ View Post
    To eliminate vspipe or ffmpeg, what if you just request frames, to know if it is really just some filter>
    Make your file a *.py, not *.vpy and just run it.
    Code:
    import vapoursynth as vs
    import havsfunc as haf
    from vapoursynth import core
    video = core.ffms2.Source(source='test.mov')
    video = haf.QTGMC(Input=video, Preset="Slow", TFF=True)
    video = haf.Deblock_QED(video, quant1=60, quant2=60)
    for n, f in enumerate(video.frames()):
        print(n, f)
    Just tried it, same error unfortunately:

    double free or corruption (!prev)
    Aborted (core dumped)
    Quote Quote  
  7. Did python specified a line for that error, if it was deblock or some of qtgmc library used?
    It works for me here, but on Ubuntu, exactly the same script as you posted, using some wonderful vapoursynth package, but about 4-5 years old, I forgot name and where it was from, I remember that repo was not available anymore or updated. Not really helpful, I know. Looks like, as always, library version problem, if not a bug, that error is some library filter error.

    In theory I could provide some libraries you need, if you want, but does Fedora uses same libraries as Ubuntu? And vapoursynth is R45, python using is 3.6.9
    Last edited by _Al_; 11th Feb 2023 at 20:41.
    Quote Quote  
  8. Originally Posted by _Al_ View Post
    Did python specified a line for that error, if it was deblock or some of qtgmc library used?
    It works for me here, but on Ubuntu, exactly the same script as you posted, using some wonderful vapoursynth package, but about 4-5 years old, I forgot name and where it was from, I remember that repo was not available anymore or updated. Not really helpful, I know. Looks like, as always, library version problem, if not a bug, that error is some library filter error.

    In theory I could provide some libraries you need, if you want, but does Fedora uses same libraries as Ubuntu? And vapoursynth is R45, python using is 3.6.9
    Far as I can tell, Python didn't get any more specific than that. Fedora is on Python 3.10, and I'm 99% sure the version of Vapoursynth I have is R61 (I compiled it from source, so I'm not using Fedora's package for it).

    When I have a bit I might try spinning up a few VMs and trying this on different distros, this wouldn't be the first time I did that for something.
    Quote Quote  
  9. Have you tried different presets in QTGMC? (different presets have different dependencies, so maybe that helps to narrow down which library is causing the issue)
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Originally Posted by Selur View Post
    Have you tried different presets in QTGMC? (different presets have different dependencies, so maybe that helps to narrow down which library is causing the issue)
    So, just went through and tried all the presets. Most of the presets still failed, however "Super Fast" and "Draft" rendered successfully, and "Ultra Fast" gives this error:

    Traceback (most recent call last):
    File "src/cython/vapoursynth.pyx", line 2886, in vapoursynth._vpy_evaluate
    File "src/cython/vapoursynth.pyx", line 2887, in vapoursynth._vpy_evaluate
    File "test-deinterlace.vpy", line 5, in <module>
    video = haf.QTGMC(Input=video, Preset="Ultra Fast", TFF=True)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
    File "/usr/lib64/python3.11/site-packages/havsfunc.py", line 1942, in QTGMC
    edi1 = QTGMC_Interpolate(
    ^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/site-packages/havsfunc.py", line 2280, in QTGMC_Interpolate
    interp = Input.bwdif.Bwdif(field=field)
    ^^^^^^^^^^^
    File "src/cython/vapoursynth.pyx", line 1820, in vapoursynth.VideoNode.__getattr__
    AttributeError: There is no attribute or namespace named bwdif
    Quote Quote  
  11. Okay, 'Ultra Fast' fails because BWDIF isn't installed/available:
    https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bwdif

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  12. I've never seen "core dump" or similar for vapoursynth on windows.

    It sounds like some Star Trek thing where they "dump the warp core"
    Quote Quote  
  13. No, on Windows you get a blue screen or some uninformative message.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  14. Just out of curiosity: do you think is possible to apply "VHS enhancements" by QTGMC on the fly by piping ffplay into it ?
    Quote Quote  
  15. Not sure what you are aiming for. If you want to reencode using ffmpeg as encoder and Avisynth/Vapoursynth for video processing does work.
    If you are asking whether ont could in theory write a script, to:
    a. create a Vapoursynth/Avisynth script which applies QTGMC to a source (and decodes audio to wav)
    b. uses ffplay to playback that script?
    Yes, I think so, assuming ffplay can play .avs/.vpy files. I doubt this will work if piping is involved anywhere.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads

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