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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd May 2023, 14:22   #1  |  Link
TicTakToe
Registered User
 
Join Date: Apr 2023
Posts: 1
Using VS with MPV.. How?

I would like to use Vapoursynth with the MPV media player but have no idea how to do this. I have searched online for an answer but all info I have seen seems contradictory. I thought by asking here you guys might be better help. Anyway, thanks.
TicTakToe is offline   Reply With Quote
Old 23rd September 2023, 14:30   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
A very late reply, but because I very recently messed around getting this to work, if you still need an answer or it's helpful to someone else....

For the MPV player itself, you need to determine the location where a configuration file for MPV should be located.
I've no clue for Windows, but for my Linux distro it's /home/YourUserName/.config/mpv/
You'll need to enable the display of hidden files and folders to see the .config folder.

The configuration file should be saved as mpv.config.

I was recently playing around with a Vapoursynth version of my FrostyBorders function, so I'll use it as an example.
This is my configuration file. The second last line is the Vapoursynth script as a filter. It's a Linux file path to the script.

Code:
vo=gpu
profile=gpu-hq
scale=ewa_lanczossharp
cscale=bicubic
dscale=mitchell
deband=no
video-sync=display-resample
interpolation=yes
tscale=oversample
vf="vapoursynth=/media/Drive1/Frosty.py"
af="dynaudnorm=f=150"
The "Frosty" script itself that applies the function is simply this, but obviously other functions can used in the same manner.

Code:
import vapoursynth as vs
vc = vs.core
import FrostyBorders as FB

clip = video_in
clip = FB.FrostyBorders(clip, 1280,720, CropDAR=1.5, TCRatio=0.3)
clip.set_output()
MPV front-ends such as SMPlayer can be difficult about adding a VapourSynth script to their command lines, and generally they use their own configuration files rather than the MPV one.
For SMPlayer at least, a script can be added, but not as a video filter (I couldn't find a way to add it as a filter that SMPlayer understood). It can be added as a general MPV option in the following manner though.

--vf-add="vapoursynth=/media/Drive1/Frosty.py"

A screenshot with the script added to the end of the "options" section.


Last edited by hello_hello; 23rd September 2023 at 14:37.
hello_hello is offline   Reply With Quote
Old 4th December 2023, 08:20   #3  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
There is a small tutorial here:

https://github.com/mpvnet-player/mpv...nth-in-mpv.net
stax76 is offline   Reply With Quote
Reply

Tags
mpv, vapoursynth


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 22:43.


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