Log in

View Full Version : QTGMC de-interlacer on macOS


KingLir
23rd January 2017, 15:39
I desperately need the community help.

I am trying to run QTGMC de-interlacer on macOS. So, I figured VapourSynth is the only way. Am I right ?

I installed Vapoursynth using brew and the needed plugins/libs, but unable to build or find a copy of vapoursynth-scxvid for macOS.
I figured that scxvid is what I am missing because of the error messages I get (a copy at the end below).
When trying to compile the latest source of vapoursynth-scxvid from GitHub, after successful run of autogen.sh, when I run ./configure I get:

checking dynamic linker characteristics... darwin16.3.0 dyld
checking how to hardcode library paths into programs... immediate
configure: error: failed to link libxvidcore. See config.log for details.

I tried adding --prefix with the location of libxvidcore.a, libxvidcore.4.dylib and xvid.h - but no change.

This is what showing on config.log:

configure:15983: result: immediate
configure:16099: g++ -o conftest conftest.cpp -lxvidcore >&5
conftest.cpp:22:10: fatal error: 'xvid.h' file not found
#include <xvid.h>
^
1 error generated.

Please help me....


Actual run:
------------

$ vspipe --y4m script.vpy .
Script evaluation failed:
Python exception: No attribute with the name scd exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:27914)
File "script.vpy", line 9, in <module>
clip = haf.QTGMC(clip, Preset='Very Slow', SourceMatch=3, TR2=1, Lossless=2, TFF=True)
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 956, in QTGMC
if TR0 > 0: ts1 = TemporalSoften(bobbed, 1, 255 << shift, CMts << shift, 28 << shift, 2) # 0.00 0.33 0.33 0.33 0.00
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 4311, in TemporalSoften
clip = set_scenechange(clip, scenechange)
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 4343, in set_scenechange
sc = core.scd.Detect(sc, thresh)
File "src/cython/vapoursynth.pyx", line 1105, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:21672)
AttributeError: No attribute with the name scd exists. Did you mistype a plugin namespace?

My Script:
-----------

import vapoursynth as vs
import havsfunc as haf

core = vs.get_core()
core.std.LoadPlugin(path='/usr/local/lib/libffms2.dylib')
core.std.LoadPlugin(path='/usr/local/lib/libfmtconv.dylib')
core.std.LoadPlugin(path='/usr/local/lib/libmvtools.dylib')

clip = core.ffms2.Source(source='Opening.mkv')
clip = haf.QTGMC(clip, Preset='Very Slow', SourceMatch=3, TR2=1, Lossless=2, TFF=True)
clip.set_output()

groucho86
23rd January 2017, 18:14
I have had similar struggles... and I don't remember how I finally got it to work.

But vapoursynth-scxvid is not the one you want anyway.

Attached is my successfully compiled dylib which hopefully will work for you (just copy it to either /usr/local/lib/ or /usr/local/lib/vapoursynth)

KingLir
23rd January 2017, 18:52
Many thanks but the forum says "Attachments Pending Approval" and I can't download. Can you give me a download link ?

groucho86
23rd January 2017, 20:02
Mediafire link. (http://www.mediafire.com/file/awtfq0ftf1i6foa/libscenechange.dylib.zip)

KingLir
23rd January 2017, 20:26
Mediafire link. (http://www.mediafire.com/file/awtfq0ftf1i6foa/libscenechange.dylib.zip)

Thanks!
Copying it to /usr/local/lib/vapoursynth worked ( but didn't work when I copied it to /usr/local/lib/ ).

Now I am getting the following:

$ vspipe --y4m script.vpy .
Script evaluation failed:
Python exception: No attribute with the name focus2 exists. Did you mistype a plugin namespace?
Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:27914)
File "script.vpy", line 9, in <module>
clip = haf.QTGMC(clip, Preset='Very Slow', SourceMatch=3, TR2=1, Lossless=2, TFF=True)
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 956, in QTGMC
if TR0 > 0: ts1 = TemporalSoften(bobbed, 1, 255 << shift, CMts << shift, 28 << shift, 2) # 0.00 0.33 0.33 0.33 0.00
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 4312, in TemporalSoften
return core.focus2.TemporalSoften2(clip, radius, luma_threshold, chroma_threshold, scenechange)
File "src/cython/vapoursynth.pyx", line 1105, in vapoursynth.Core.__getattr__ (src/cython/vapoursynth.c:21672)
AttributeError: No attribute with the name focus2 exists. Did you mistype a plugin namespace?

groucho86
23rd January 2017, 20:47
That's from temporalsoften. I have two (http://www.mediafire.com/file/651z1889xfdqdm5/libtemporalsoften.zip), not sure which one's needed.

KingLir
23rd January 2017, 21:10
That's from temporalsoften. I have two (http://www.mediafire.com/file/651z1889xfdqdm5/libtemporalsoften.zip), not sure which one's needed.

Thanks! Now getting:

vspipe --y4m script.vpy .
Script evaluation failed:
Python exception: There is no attribute or namespace named mv
Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1491, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:27914)
File "script.vpy", line 9, in <module>
clip = haf.QTGMC(clip, Preset='Very Slow', SourceMatch=3, TR2=1, Lossless=2, TFF=True)
File "/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/havsfunc.py", line 994, in QTGMC
srchSuper = DitherLumaRebuild(srchClip, s0=1, chroma=ChromaMotion).mv.Super(pel=SubPel, sharp=SubPelInterp, hpad=hpad, vpad=vpad, chroma=ChromaMotion)
File "src/cython/vapoursynth.pyx", line 833, in vapoursynth.VideoNode.__getattr__ (src/cython/vapoursynth.c:16817)
AttributeError: There is no attribute or namespace named mv


It seem that I am missing MVTools. When trying to build it from GitHub:

configure: error: Package requirements (vapoursynth) were not met:

No package 'vapoursynth' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables VapourSynth_CFLAGS
and VapourSynth_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I am guessing it's because I installed vapoursynth using brew. How can I do what it asks ?

groucho86
23rd January 2017, 21:41
Huh, that's a tough one, I've never had that issue before.

Did you first
./autogen.sh
then
./configure
then
make?

KingLir
23rd January 2017, 21:59
Huh, that's a tough one, I've never had that issue before.

Did you first
./autogen.sh
then
./configure
then
make?

Yes. Exactly that. I am getting this error on ./configure
Maybe you can just share with me your MVTools lib/s ? As you did with the previous ones....

groucho86
23rd January 2017, 22:38
Here ya go. (http://www.mediafire.com/file/rfxgupx2esr4p5i/libmvtools.zip) Both the "regular" version and feisty2's.

KingLir
23rd January 2017, 22:49
Here ya go. (http://www.mediafire.com/file/rfxgupx2esr4p5i/libmvtools.zip) Both the "regular" version and feisty2's.

Thanks! I copied both files to both /usr/local/lib/ and /usr/local/lib/vapoursynth.

I am getting exactly the same error message (last I posted above) !
WOW !! Any idea ?

Maybe you can share your "entire" macOS setup. Did you installed vapoursynth using brew ? Running on macOS 10.12 (Sierra) ?

groucho86
23rd January 2017, 22:56
I'm on El Capitan 10.11.6.

Yeah the brew install was *very* semi-successful.

I recommend you installing vapoursynth from scratch. If I remember correctly, I first installed R30, then installed the latest version.

Give it a shot, shouldn't take more than 10 minutes.

Make sure after you do make that you then do make install.

(l33tmeatwad's guide is the clearest: link (http://www.animemusicvideos.org/forum/viewtopic.php?f=118&t=125039#p1546404).)

KingLir
23rd January 2017, 23:03
Wait. I think I made progress. Here is what I getting now with my updated script (updated my original post above):

vapoursynth.Error: Failed to load /usr/local/lib/libmvtools.dylib. Error given: dlopen(/usr/local/lib/libmvtools.dylib, 1): Library not loaded: /usr/local/opt/fftw/lib/libfftw3f.3.dylib
Referenced from: /usr/local/lib/libmvtools.dylib
Reason: image not found

Can you send me libfftw3f.3.dylib and any other relevant dylibs ?

groucho86
23rd January 2017, 23:12
Grabbed as many as I could... Here's hoping (http://www.mediafire.com/file/7ayoea5sd5qc5bz/vs_dylib_misc.zip).

KingLir
23rd January 2017, 23:36
Thanks but what should I do with libfftw3f.3.dylib that is been asked by the Script evaluation?

groucho86
23rd January 2017, 23:44
Arg, that's because I (probably) installed fftw via homebrew. I'm uploading it here (http://www.mediafire.com/file/2yabfwes1nqcgd2/fftw.zip), but there's a high chance it won't work. Just too many dependancies - if it fails you really need to install it all properly.

KingLir
23rd January 2017, 23:48
Never mind. I just managed to install fftw with brew and fix the remaining issues!

Many Thanks! I will check the tool now and if I encounter other issues will probably open a new thread :)

Again, thank you for all the help.

KingLir
24th January 2017, 00:19
Indeed I moved to another thread:
https://forum.doom9.org/showthread.php?p=1794399#post1794399