Log in

View Full Version : Workflow with VapourSynth to deinterlace?


kamineko
16th December 2014, 01:37
What would be the best way to use VapourSynth to deinterlace a .dv video? Mac OS X Mavericks used.

The task is to digitize old VHS tapes - the current way is generating a .dv file via Canopus DVHC100, cutting it in an AVI container, applying only telecine, crop and resize and deblock in Handbrake to generate a .mp4 file.

The weakness of the process is the deinterlacing, which is not as good as earlier rips. Details and colors are much better, due to better hardware, but an improvement for the deinterlacing is needed.

Vapoursynth and mpv (--with-vapoursynth) are already installed, but we are at a loss how to use them. QTGMC would be the way to go, but what's a sane approach to wedge VS into the workflow and also try and play with parameters?

Has anyone compiled the VapourSynth Editor for Mac already?

Mystery Keeper
16th December 2014, 11:15
In Linux you only need the base Qt framework to build VapourSynth Editor. You just go into pro directory (where file "pro.pro" is) and execute two commands:
qmake pro.pro
make release
The editor will be built in the "build" directory.
You can try that on Mac.

kamineko
21st December 2014, 17:25
In Linux you only need the base Qt framework to build VapourSynth Editor. You just go into pro directory (where file "pro.pro" is) and execute two commands:
qmake pro.pro
make release
The editor will be built in the "build" directory.
You can try that on Mac.
I tried now on Mac and on Linux.

QT5 installed in Ubuntu 14.10 via ubuntu-sdk-team ppa (QT5 proper).

Step #1 - qmake pro.pro is without problems and generates a proper Makefile (attached).

All I get is:

kami@XPS12-9Q33:~/vapoursynth-editor/pro$ make release
make: *** No rule to make target 'release'. Schluss.


A simple make:

kami@XPS12-9Q33:~/vapoursynth-editor/pro$ make
/usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/settings/settingsdialog.ui -o ../generated/ui/ui_settingsdialog.h
/usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/preview/preview_advanced_settings_dialog.ui -o ../generated/ui/ui_preview_advanced_settings_dialog.h
/usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/preview/previewdialog.ui -o ../generated/ui/ui_previewdialog.h
/usr/lib/x86_64-linux-gnu/qt5/bin/uic ../src/mainwindow.ui -o ../generated/ui/ui_mainwindow.h
g++ -c -m64 -pipe -O2 -fexpensive-optimizations -funit-at-a-time -std=c++11 -O2 -w -D_REENTRANT -fPIE -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../src/image/zimg -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I../generated/moc -I../generated/ui -o ../generated/obj-release-64bit-gcc/helpers.o ../src/common/helpers.cpp
In file included from ../src/common/helpers.cpp:3:0:
../src/common/helpers.h:7:37: fatal error: vapoursynth/VapourSynth.h: Datei oder Verzeichnis nicht gefunden
#include <vapoursynth/VapourSynth.h>
^
compilation terminated.
Makefile:661: recipe for target '../generated/obj-release-64bit-gcc/helpers.o' failed
make: *** [../generated/obj-release-64bit-gcc/helpers.o] Error 1
erik@XPS12-9Q33:~/vapoursynth-editor/pro$

What am I missing here? Did a make clean before; also tried make all, same results.

Are_
21st December 2014, 17:53
Maybe $ rm -fr generated/* befor anything.

EDIT: Now I remember, if you still have problems, it is maybe because qt4's qmake is used instead of qt5's one.
In my distro qt5's is at /usr/lib64/qt5/bin/qmake and it's not the default one, so to build this I end up doing:
$ cd pro
$ rm -fr ../generated
$ /usr/lib64/qt5/bin/qmake pro.pro
$ make -j8

EDIT2: Forget everything I wrote, I didn't read at all your error message, it says it can't find vapoursynth's headers.
Did you install it? If you did, where exactly did it install VapourSynth.h?

kamineko
21st December 2014, 20:59
EDIT2: Forget everything I wrote, I didn't read at all your error message, it says it can't find vapoursynth's headers.
Did you install it? If you did, where exactly did it install VapourSynth.h?

This is it. Vapoursynth is installed as a binary, via djcj's Useful Tools PPA. So no headers. I never gave this a second thought.

Mystery Keeper
22nd December 2014, 03:39
So, it builds and works alright on Mac?

kamineko
22nd December 2014, 17:51
So, it builds and works alright on Mac?

Actually, no. VS was built on the Mac, but it seems that the path can not be found. Same error message as on Linux, different reason.

I went to Linux to just make sure that I can have a successful compile at all, nobody seems to have tried it on Mac.

sl1pkn07
22nd December 2014, 19:13
em, according to djcj's PPA's, the headers is installed through 'libvapoursynth-dev' package

see the set of packages:

utopic:
64 bits: https://launchpad.net/~djcj/+archive/ubuntu/tools/+build/6657573
32 bits: https://launchpad.net/~djcj/+archive/ubuntu/tools/+build/6657574

trusty:
64 bits: https://launchpad.net/~djcj/+archive/ubuntu/tools/+build/6657575
32 bits: https://launchpad.net/~djcj/+archive/ubuntu/tools/+build/6657576

greetings

kamineko
23rd December 2014, 03:27
em, according to djcj's PPA's, the headers is installed through 'libvapoursynth-dev' package


After installation of the dev package, the compile seemingly went without problems. Got a new directory release-64bit-gcc under the build subdirectory, with binary and icon.

But after starting it, I was just greeted with:
kami@XPS12-9Q33:~/vapoursynth-editor/build/release-64bit-gcc$ ./vsedit
./vsedit: symbol lookup error: /usr/lib/x86_64-linux-gnu/vapoursynth/libmvtools.so: undefined symbol: _Z17mvflowfpsRegisterPFvPKcS0_PFvPK5VSMapPS1_PvP6VSCorePK5VSAPIES5_P8VSPluginESE_

I got the mvtools from https://github.com/dubhater/vapoursynth-mvtools, they compiled well after addition of libfftw3-dev, but I am frankly at a loss what happens there. Do I need to copy them over somehow to get an updated libmvtools.so? A 'make install' after compilation of mvtools didn't work.

jackoneill
23rd December 2014, 08:48
After installation of the dev package, the compile seemingly went without problems. Got a new directory release-64bit-gcc under the build subdirectory, with binary and icon.

But after starting it, I was just greeted with:
kami@XPS12-9Q33:~/vapoursynth-editor/build/release-64bit-gcc$ ./vsedit
./vsedit: symbol lookup error: /usr/lib/x86_64-linux-gnu/vapoursynth/libmvtools.so: undefined symbol: _Z17mvflowfpsRegisterPFvPKcS0_PFvPK5VSMapPS1_PvP6VSCorePK5VSAPIES5_P8VSPluginESE_

I got the mvtools from https://github.com/dubhater/vapoursynth-mvtools, they compiled well after addition of libfftw3-dev, but I am frankly at a loss what happens there. Do I need to copy them over somehow to get an updated libmvtools.so? A 'make install' after compilation of mvtools didn't work.

I don't understand how that could happen. Try:

make clean
git pull
make

in the mvtools folder and make sure to delete any old copies of libmvtools.so, like the one mentioned in the error message.

kamineko
23rd December 2014, 15:34
I don't understand how that could happen. Try:

make clean
git pull
make

in the mvtools folder and make sure to delete any old copies of libmvtools.so, like the one mentioned in the error message.
That did the trick. For others: There is a hidden folder .lib in the vapoursynth-mvtools folder, in which the generated libmvtools.so resides. This file needs to be copied over to /usr/lib/x86_64-linux-gnu/vapoursynth/
for things to work.

Now I try to port all the newfound knowledge to the mac compile.

sl1pkn07
23rd December 2014, 15:42
That did the trick. For others: There is a hidden folder .lib in the vapoursynth-mvtools folder, in which the generated libmvtools.so resides. This file needs to be copied over to /usr/lib/x86_64-linux-gnu/vapoursynth/
for things to work.


or

./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/vapoursynth/
make
sudo make install