View Single Post
Old 21st January 2019, 00:21   #3  |  Link
Revan654
Registered User
 
Revan654's Avatar
 
Join Date: May 2004
Posts: 324
Quote:
Originally Posted by belonesox View Post
I wish to preview vapoursynth scripts with MPV,
ideally with seeking, but I still cannot align MPV with VS on formats/colors, etc.

Consider small project:
https://github.com/belonesox/wtf-vap...th-mpv-preview

release.py:
Code:
#!/usr/bin/env python3
import vapoursynth as vs

core = vs.get_core()
video = core.std.BlankClip(format=vs.YUV420P10, length=1000, color=[128, 190, 128]) 
video = core.sub.Subtitle(video, "WTF???", 0, 500, style="sans-serif,200,&H00FF00FF")
video.set_output()
When I build it with 'build.sh'
Code:
vspipe --y4m release.py - | ffmpeg -i pipe: encoded.mkv
— all OK

When I preview it with 'preview-ffplay.sh'
Code:
vspipe --y4m release.py - | ffplay -i pipe:
— all OK

But how I can preview it with MPV?

I tried
Code:
vspipe --y4m release.py - |  mpv --demuxer rawvideo --demuxer-rawvideo-mp-format=yuv420p10 -
and tried all formats supported by MPV...
but still getting wrong result ("moving text with wrong color").

What am I doing wrong?
This is the Command line I've used and worked for me.

"C:\Program Files (x86)\VapourSynth\core64\vspipe.exe" -y "to\your\VS\Script.vpy" - | "mpv.com or mpv.exe" [Options Here, --demuxer-rawvideo-mp-format=yuv420p10 Does work Here] -

For Testing I just used a very basic script

Code:
import os
import sys
ScriptPath = 'Path/to/your/VS/Scripts/Filters'
sys.path.append(os.path.abspath(ScriptPath))
import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r"SourceFilterHere|I'm Using DGIndexNV")
clip = core.dgdecodenv.DGSource(r"C:\to\your\Source\File.mkv")
clip.set_output()

Last edited by Revan654; 21st January 2019 at 00:24.
Revan654 is offline   Reply With Quote