Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting example vapoursynth script #7

Closed
styler00dollar opened this issue Nov 12, 2021 · 2 comments
Closed

Requesting example vapoursynth script #7

styler00dollar opened this issue Nov 12, 2021 · 2 comments

Comments

@styler00dollar
Copy link

styler00dollar commented Nov 12, 2021

I tried to create a valid script for a while, but I can't make it run.

from vsrife import RIFE
import vapoursynth as vs
core = vs.core
core.std.LoadPlugin(path='/usr/lib/x86_64-linux-gnu/libffms2.so')
clip = core.ffms2.Source(source='test.webm')
print(clip) # YUV420P8
clip = vs.core.resize.Bicubic(clip, format=vs.RGBS)
print(clip) # RGBS
clip = RIFE(clip)
clip.set_output()
vspipe --y4m inference.py - | x264 - --demuxer y4m -o example.mkv

Error: Failed to retrieve frame 0 with error: Resize error: Resize error 3074: no path between colorspaces (2/2/2 => 0/2/2). May need to specify additional colorspace parameters.

Can I get an example that should actually work?

@HolyWu
Copy link
Owner

HolyWu commented Nov 12, 2021

Either matrix_in or matrix_in_s needs to be set if no matrix is specified in the frame's properties when converting to RGB. Refer to http://www.vapoursynth.com/doc/functions/video/resize.html for more details.

clip = vs.core.resize.Bicubic(clip, format=vs.RGBS, matrix_in_s='709')

@styler00dollar
Copy link
Author

styler00dollar commented Nov 12, 2021

Thank you. I somehow overlooked this. Now it works.

from vsrife import RIFE
import vapoursynth as vs
core = vs.core
core.std.LoadPlugin(path='/usr/lib/x86_64-linux-gnu/libffms2.so')
clip = core.ffms2.Source(source='test.webm')
clip = vs.core.resize.Bicubic(clip, format=vs.RGBS, matrix_in_s='709')
clip = RIFE(clip)
clip = vs.core.resize.Bicubic(clip, format=vs.YUV420P8, matrix_s="709")
clip.set_output()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants