Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th January 2020, 20:50   #3681  |  Link
outhud
Registered User
 
Join Date: Aug 2018
Posts: 21
Where should Vapoursynth plugins (.so) be placed by default on Linux (Ubuntu) so that they are auto-loaded?

Is there a way to print the autoload folder?

I've tried /usr/local/lib/ and /usr/lib/x86_64-linux-gnu/vapoursynth/ but it seems the modules are not being found.
outhud is offline   Reply With Quote
Old 12th January 2020, 20:56   #3682  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by PlazzTT View Post
I installed cython through pip.
Did you install it with pip3?

Code:
pip3 install cython
  Reply With Quote
Old 12th January 2020, 21:02   #3683  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Quote:
Originally Posted by outhud View Post
Where should Vapoursynth plugins (.so) be placed by default on Linux (Ubuntu) so that they are auto-loaded?

Is there a way to print the autoload folder?

I've tried /usr/local/lib/ and /usr/lib/x86_64-linux-gnu/vapoursynth/ but it seems the modules are not being found.
http://www.vapoursynth.com/doc/autoloading.html

Most probably in /usr/local/lib/vapoursynth in your case.
Are_ is offline   Reply With Quote
Old 14th January 2020, 14:46   #3684  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by Myrsloik View Post
Only trim, splice and raw pcm output from vspipe is planned for the first test version. There's however one little problem...

All existing audio sources suck so I'll probably have to improve FFMS2 first.

Feel free to start implementing audio plugins using the doodle1 branch. The API is conceptually stable (but tweaks will definitely be made).
Audio update:
A a best but slow audio source has been created so that's no longer a major problem (will still get some usefulness improvements over time).

Testing and debugging everything else is however taking longer than expected but audio will be fully supported by AVFS and VFW as well from the start and vspipe will be able to output wave64 headers.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th January 2020, 17:07   #3685  |  Link
Richard1485
Guest
 
Posts: n/a
^ Excellent news! Down the line, I hope that it might be possible to have an equivalent to AviSynth's Dissolve(), which affects video and audio.
  Reply With Quote
Old 18th January 2020, 12:43   #3686  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I'm not sure what's the focus of this thread because my question is about vs host application development.

There is a weird exception happening here:

Code:
    case WM_DESTROY:
        DiscardGraphicsResources();
        SafeRelease(&g_D2D_Factory);

        g_vsapi->freeNode(g_vsnode);
        vsscript_freeScript(g_vsscript);
        vsscript_finalize();

        PostQuitMessage(0);
        return 0;
Exception thrown at 0x00007FFAFC5B448D (vapoursynth.cp37-win_amd64.pyd) in VapourSynth Direct2D Rendering.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

Weird thing is it crashes only inside WM_DESTROY and not when this code is executed before WM_DESTROY !

How can this issue be debugged?

Last edited by stax76; 18th January 2020 at 12:46.
stax76 is offline   Reply With Quote
Old 18th January 2020, 12:54   #3687  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by stax76 View Post
I'm not sure what's the focus of this thread because my question is about vs host application development.

There is a weird exception happening here:

Code:
    case WM_DESTROY:
        DiscardGraphicsResources();
        SafeRelease(&g_D2D_Factory);

        g_vsapi->freeNode(g_vsnode);
        vsscript_freeScript(g_vsscript);
        vsscript_finalize();

        PostQuitMessage(0);
        return 0;
Exception thrown at 0x00007FFAFC5B448D (vapoursynth.cp37-win_amd64.pyd) in VapourSynth Direct2D Rendering.exe: 0xC0000005: Access violation writing location 0x0000000000000000.

Weird thing is it crashes only inside WM_DESTROY and not when this code is executed before WM_DESTROY !

How can this issue be debugged?
It's with a trivial script (BlankClip only)?

Are there any restrictions on what you're allowed to do when handling a WM_DESTROY message? If not then I'd simply see what the call stack is in a debugger. Maybe there's a hint in there.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th January 2020, 13:06   #3688  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I don't have debug symbols so on my side call stack don't help.

Code:
vapoursynth.cp37-win_amd64.pyd!00007ffb10a9448d()
vapoursynth.cp37-win_amd64.pyd!00007ffb10a97529()
vsscript.dll!00007ffb4d0a25c1()
VapourSynth Direct2D Rendering.exe!WndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 197
	at D:\Projekte\CPP\VapourSynth Direct2D Rendering\main.cpp(197)
[External Code]
VapourSynth Direct2D Rendering.exe!WndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 244
	at D:\Projekte\CPP\VapourSynth Direct2D Rendering\main.cpp(244)
[External Code]
VapourSynth Direct2D Rendering.exe!WndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 244
	at D:\Projekte\CPP\VapourSynth Direct2D Rendering\main.cpp(244)
[External Code]
VapourSynth Direct2D Rendering.exe!WndProc(HWND__ * hWnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 244
	at D:\Projekte\CPP\VapourSynth Direct2D Rendering\main.cpp(244)
[External Code]
VapourSynth Direct2D Rendering.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 164
	at D:\Projekte\CPP\VapourSynth Direct2D Rendering\main.cpp(164)
[External Code]
I can try to compile VS to get debug symbols or maybe you can have a look if I upload the source code.

The script is very simple and works in any other application.

Code:
import os, sys
import vapoursynth as vs
core = vs.get_core()
sys.path.append(r'D:\Projekte\VB\staxrip\bin\Apps\Plugins\VS\Scripts')
core.std.LoadPlugin(r"D:\Projekte\VB\staxrip\bin\Apps\Plugins\both\ffms2\ffms2.dll")
clip = core.ffms2.Source(r'D:\Samples\test.mkv', cachefile=r'D:\Samples\test_temp\test.ffindex')
#clip = core.std.AssumeFPS(clip, None, 25, 1)

clip = core.std.FlipVertical(clip)

if clip.format.id == vs.RGB24:
    _matrix_in_s = 'rgb'
else:
    if clip.height > 576:
        _matrix_in_s = '709'
    else:
        _matrix_in_s = '470bg'

clip = clip.resize.Bicubic(matrix_in_s = _matrix_in_s, format = vs.COMPATBGR32)
clip.set_output()
Quote:
Are there any restrictions on what you're allowed to do when handling a WM_DESTROY message?
It's a simple C++ classic Win32 GUI application, I'm not a expert in that and don't know about restrictions.

Last edited by stax76; 18th January 2020 at 13:08.
stax76 is offline   Reply With Quote
Old 18th January 2020, 13:18   #3689  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Send me the code and I'll take look at it then.

Btw, debug symbols for vapoursynth.dll are included in the installer (look for vapoursynth.pdb). VSScript.dll has no code of interest at all and is pointless to bother with. If anything you need to compile the python module with debug symbols which I've never done so don't ask me how.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th January 2020, 13:55   #3690  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for the help! I hope it's easy to find and fix.

http://www.mediafire.com/file/xgfjzt..._Rendering.zip

Last edited by stax76; 18th January 2020 at 13:57.
stax76 is offline   Reply With Quote
Old 19th January 2020, 19:06   #3691  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Is it possible to read somewhere how to do detelecine using VS? I know there is documentation http://www.vapoursynth.com/doc/plugins/vivtc.html but still nothing is clear.
Jukus is offline   Reply With Quote
Old 19th January 2020, 22:16   #3692  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
Quote:
Originally Posted by stax76 View Post
Thanks for the help! I hope it's easy to find and fix.

http://www.mediafire.com/file/xgfjzt..._Rendering.zip
Still looking at your code. Still not sure why it happens.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 20th January 2020, 12:22   #3693  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Quote:
Originally Posted by Jukus View Post
Is it possible to read somewhere how to do detelecine using VS? I know there is documentation http://www.vapoursynth.com/doc/plugins/vivtc.html but still nothing is clear.
It's basically the same procedure compared to Avisynth's TFM and TDecimate. You just have to use the VapourSynth syntax. IIRC the settings are pretty much the same for a regular IVTC operation.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th January 2020, 12:48   #3694  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by Boulder View Post
It's basically the same procedure compared to Avisynth's TFM and TDecimate. You just have to use the VapourSynth syntax. IIRC the settings are pretty much the same for a regular IVTC operation.
I have never used AviSynth.
Or tell me an analog of this code for VS
Code:
AnimeIVTC(2, bbob=5, extbob=MC_A_bob, mode22=false, aa=0)
Jukus is offline   Reply With Quote
Old 20th January 2020, 13:01   #3695  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
AnimeIVTC is a custom function, it's far from a normal IVTC. I don't know if there is an alternative one in VS.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th January 2020, 13:31   #3696  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by Boulder View Post
AnimeIVTC is a custom function, it's far from a normal IVTC. I don't know if there is an alternative one in VS.
How to make detelecine in general? I even have a poor idea of what telecine is, what scripts and their settings should do to fix it.

Last edited by Jukus; 20th January 2020 at 13:35.
Jukus is offline   Reply With Quote
Old 20th January 2020, 13:48   #3697  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
Quote:
Originally Posted by Jukus View Post
How to make detelecine in general? I even have a poor idea of what telecine is, what scripts and their settings should do to fix it.
A simple IVTC happens for example with
Code:
clp = core.vivtc.VFM(clp, order=1)
clp = core.vivtc.VDecimate(clp)
You really need to learn the syntax and do some studying. Avisynth is probably easier to start with than VS.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th January 2020, 19:16   #3698  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by Boulder View Post
A simple IVTC happens for example with
Code:
clp = core.vivtc.VFM(clp, order=1)
clp = core.vivtc.VDecimate(clp)
You really need to learn the syntax and do some studying. Avisynth is probably easier to start with than VS.
Everything is much worse and more complicated.
For some reason, I can’t unload the sample.
I tried to apply this code for my case, but just got an interlaced video.
The best result is obtained in this way:
Code:
clip = haf.QTGMC(clip, Preset='Very Slow', Sharpness=0.3, FPSDivisor=2, TFF=True)
clip = core.vivtc.VDecimate(clip, cycle=5)
At the same time, many frames with blends and even there is no consistency, that is 4 good frames, the next with blend, then 8 good frames, the next with blend, about 2 frames with blends in a row.
Srestore doesn't help.
I have no more ideas on what can be done and what is happening in this video.

Reading the documentation is useless without understanding what is going on in the video. And there is nothing to read about what types of videos exist and what can be done or not done with it. Even there are several types of telecine: HardTelecine, DoubleHardTelecine and I don’t know what else.

AviSynth is Windows only, I use Linux. Maybe I should use AviSynth with WIne, I don't know.
Jukus is offline   Reply With Quote
Old 20th January 2020, 19:27   #3699  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,733
If your source is anime, I can only wish you good luck with that. They are notoriously hard, or even impossible to restore without intense manual labour.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 20th January 2020, 19:51   #3700  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by Boulder View Post
If your source is anime, I can only wish you good luck with that. They are notoriously hard, or even impossible to restore without intense manual labour.
No, it's a low-budget film from 2001-2004.
Jukus is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.