Topic: VLC player support

Wiki page: https://www.svp-team.com/wiki/SVP:VLC

=================================

The idea is to add a new VLC module that acts like a "video filter" and runs a Vapoursynth script (just like it does with mpv)

Note that VLC has a few dumb limitations:

1. The "common" video filters are not allowed to change the frame rate! The only TWO filter that can do this are listed by names in the VLC sources big_smile - "deinterlace" and "postproc".
So to make our filter work we should replace one of them.

2. The filter can't return more than 3 frames on each source frame, which means that FRC rate = x3 is the maximum.

3. The filter can't increase frame size on-the-fly, so all SVP's options that increase source frame size won't work (at least for now).


How to make it work?

1. Install VLC 64-bit ver. 3.0.x

2. Windows only: install the "VLC support" package

3. (optional) Windows only: add/modify PATH and PYTHONPATH environment variables - they must point to SVP 4\mpv64 folder

4. Invoke Utilities -> SVP in VLC command from SVP's menu, VLC will open automatically.

5. Next time just run VLC via SVP's main menu -> Run VLC with SVP.

------------

If you get error: VLC: unsupported color format, switch to software video decoder

VLC menu Tools -> Preferences -> Input/Codecs tab -> Hardware-accelerated decoding: Disable

Re: VLC player support

Check SVP's events log:

20:09:34.645 [I.]: Main: module 'plugins/libsvpflow1_vs64.dylib': 4.0.0.132
20:09:34.646 [I.]: Main: module 'plugins/libsvpflow2_vs64.dylib': 4.0.0.132
20:09:34.652 [I.]: Main: VLC filter: 0.9.0.76

The magic: we need to remove VLC's "deinterlace" filter and place SVP's "vapoursynth" filter into the VLC plugins folder.

1. remove VLC/plugins/libdeinterlace_plugin.dll (or .so, or .dylib, depending on the OS)
2. choose one of the SVP/plugins/libvapoursynth_plugin.20 or libvapoursynth_plugin.30 (depending on VLC version  - 2.2.x or 3.0)
3. copy it to VLC/plugins/libvapoursynth_plugin.dll (.so, .dylib)


To help with this you can just run
SVP menu -> Utilities -> SVP in VLC
and choose the VLC executable (or an .app on OS X)

Note that SVP Manager needs write access to the VLC's plugins folder!


If you want SVP to start automatically just set deinterlace to "always on" in
VLC preferences -> Video -> Deinterlace = On

Re: VLC player support

OS X specific

It seems that the OpenGL video renderer in VLC doesn't really like high frame rate video, especially in high resolutions.
While I see no troubles playing videos up to 720p @60 Hz, 1080p playback really have some issues, even with native 60 Hz videos (w/o SVP at all).

Latest nightly VLC 3.0 is recommended over "stable" VLC 2.2.2.

If you see SVP Index below 1.0 value while playing 1080p - try to crop the frame a little bit.
For example, for me 1920*1080*60 is totally unusable (SVP index ~0.6), while 1896*1080*60 works great. Have no idea why.

4 (edited by brucethemoose 11-05-2016 15:45:38)

Re: VLC player support

Cool... But I can't help but feel that anyone knowledgable enough to use SVP 4 Pro isn't gonna be using VLC. I certainly won't tongue


But if it helps spread the glory of SVP to the masses, then I'm all for it!



Question: Will this always be a "Pro" feature, or will it make its way into the free version when stable?

Re: VLC player support

Windows specific

1. Install "VLC support" package via the SVP's Maintenance tool
2. Install VLC 64-bit
3. Make Vapoursynth installation usable by other apps (see below)
4. Run SVP and exec the Utilities -> "SVP in VLC" via the main menu
5. Run VLC and ensure that "vapoursynth" is in the video filters list.


The tricky part is correct Vapoursynth / Python installation

"Portable" way - assuming you DON'T have system-wide Python installation:
1. add SVP 4/mpv64 folder to the PATH environment variable
2. add new env variable called PYTHONPATH, containing the same SVP 4/mpv64 path

System-wide way:
1. Install Python 3.5.1 64-bit: https://www.python.org/ftp/python/3.5.1 … -amd64.exe
2. Install Vapoursynth 64-bit: https://github.com/vapoursynth/vapoursynth/releases
3. Either add C:\Program Files (x86)\Vapoursynth\core64 to the PATH env var OR copy C:\Program Files (x86)\Vapoursynth\core64\vapoursynth.dll to C:\Windows\System32\

Re: VLC player support

Hi, Chainik

I did everything as you posted..

10:51:03.841 : Main: module 'plugins64/svpflow1_vs.dll': 4.0.0.132
10:51:03.841 : Main: module 'plugins64/svpflow2_vs.dll': 4.0.0.132
10:51:03.841 : Main: VLC filter: 0.9.0.76

But i just don`t know how to do this part

1. add SVP 4/mpv64 folder to the PATH environment variable
2. add new env variable called PYTHONPATH, containing the same SVP 4/mpv64 path

Could you post some images to help?

7 (edited by blotto5 16-05-2016 20:57:49)

Re: VLC player support

I followed the instructions to the best of my understanding, updated SVP, using VLC 64-bit, ran SVP in VLC, confirmed that vapoursynth is showing up in the vlc settings, and turned deinterlacing on but it's not working. The  messages from VLC are:

deinterlace info: Running in IPC mode
deinterlace info: Initializing VS filters...
deinterlace error: File reading exception: [Errno 22] Invalid argument: 'global svppath="C:\\Users\\Vinny\\AppData\\Roaming\\SVP4\\"\ntry {\n import(svppath+"scripts\\2efc.avs")\n}\ncatch(err_msg) {\n ffdshow_source().Subtitle(err_msg)\n WriteFileStart(svppath+"logs\\err-2efc.avs.log", "err_msg")\n}\n'
deinterlace error: script evaluation failed

EDIT:

I was dumb, didn't follow all the instructions. Make sure you set the environment paths then restart SVP, all outlined in the instructions.

Re: VLC player support

Now i`ve managed to make vapour show up.


It`s happening the same error as blotto5 reported..

14:23:00.348 [E]: VLC: File reading exception:\n[Errno 22] Invalid argument: 'global svppath=\C:\\Users\\Guilherme\\AppData\\Roaming\\SVP4\\\\ntry {\n   import(svppath+\scripts\\3f4.avs\)\n}\ncatch(err_msg) {\n   ffdshow_source().Subtitle(err_msg)\n   WriteFileStart(svppath+\logs\\err-3f4.avs.log\, \err_msg\)\n}\n'
14:23:06.036 [I.]: Report: collecting information...

Re: VLC player support

You may need to restart SVP Manager after modifying PATH value.

Wrong:

12:29:23.468: Playback: starting up...
12:29:23.468: Playback [ee8]: Frame server (64-bit) NOT FOUND

Right:

12:29:23.468: Playback: starting up...
12:29:23.468: Playback [ee8]: Frame server (64-bit) C:\Program Files (x86)\SVP 4\mpv64\vapoursynth.dll

Re: VLC player support

I'm also getting the same error as pezgui and blotto5 are getting.

11 (edited by pezgui 16-05-2016 19:12:09)

Re: VLC player support

For those who is getting this error, follow this tutorial..

https://www.svp-team.com/wiki/SVP:VLC

it explains everything.

Re: VLC player support

It should work...

OK, lets double check all those stuff.

- reboot PC
- Win+R, type "cmd"

echo %PATH%

do you see "C:\Program Files (x86)\SVP 4\mpv64" in the list?
- in the same cmd window type

vspipe

will it run?

13 (edited by pezgui 16-05-2016 19:31:47)

Re: VLC player support

I finally make it work...

You guys just follow this tutorial.. https://www.svp-team.com/wiki/SVP:VLC


How to set environment variables
How to set folder permissions

14 (edited by pezgui 16-05-2016 19:49:17)

Re: VLC player support

Fixed.

Re: VLC player support

I was under the impression that it is not necessary to manually set environment variables with a non-portable installation.

16 (edited by pezgui 16-05-2016 22:40:01)

Re: VLC player support

It`s cool for people who enjoy watching video with VLC, but i still prefer DAUM Potplayer

I could barely get a smooth video motion with VLC.

Re: VLC player support

Thanks pezgui, I had to go through the instructions again and find what I missed. Had to set the environment variables and restart SVP.

Re: VLC player support

maciozo wrote:

I was under the impression that it is not necessary to manually set environment variables with a non-portable installation.

yeah, it seems that Vapousynth setup doesn't copy vapoursynth.dll to the system32 for some reason

19 (edited by pezgui 18-05-2016 09:37:13)

Re: VLC player support

Problems that i`ve crossed so far..

1. VLC + SVP does not work with every single video, especially FLV videos, don`t know why..

2. some videos are getting blue color, like if someone else manually changed the hue color settings. When i turn SVP off, the color goes back to normal. This is the error that shows up > 06:35:18.254 [E.]: QWindowsPipeWriter: GetOverlappedResult failed. (O pipe foi finalizado.)

3. Native 1920x1080 videos is always playing a little choppy, far from a smooth experience , as reported from Chainik, SVP filter can't increase frame size.

Re: VLC player support

1, 2. if you've a small samples or an URL from where I could download such a videos please share it

3. we still don't known what "video output" value is the best for 1920*1080@60

21 (edited by Quenz 20-05-2016 05:35:09)

Re: VLC player support

In VLC I'm getting:

deinterlace info: Running in IPC mode
deinterlace info: Running in IPC mode
deinterlace info: Running in IPC mode
deinterlace info: Running in IPC mode
deinterlace info: Initializing VS filters...
deinterlace error: resulting frame size should not be greater than the source

I realize the wiki says "The filter can't increase frame size on-the-fly" but I'm still not sure what to do here to resolve this.

Edit: It's suddenly working now, though it looks like the colors have been inverted, skin color is blue, sky blue is orange, etc.

Changing around some of the settings in the control panel seems to get the colors to correct sometimes.

Re: VLC player support

> I realize the wiki says "The filter can't increase frame size on-the-fly" but I'm still not sure what to do here to resolve this.

turn off the "outer lighting" in SVP

> the colors have been inverted, skin color is blue, sky blue is orange, etc.

it assumes that the video is in YV12 color space for now

Re: VLC player support

>turn off the "outer lighting" in SVP

I now have outer lighting turned off, I prefer black bars actually.

>it assumes that the video is in YV12 color space for now

Is there any workaround for that? Something I can change in VLC maybe, or is this tied to something in the video file?

Re: VLC player support

I might do some testing later tonight with VLC big_smile

25 (edited by Quenz 22-05-2016 02:58:59)

Re: VLC player support

Found a workaround to fix the colors for non-YV12 colorspace videos!

Tools > Effects and Filters (Ctrl + E) > Video Effects > Essential, check Hue and drag it to half way. You may have to restart VLC.