flathub / io.mpv.Mpv

https://flathub.org/apps/details/io.mpv.Mpv
9 stars 21 forks source link

vapoursynth does not seem to work #534

Closed president-not-sure closed 3 weeks ago

president-not-sure commented 1 month ago

My setup

Fedora Silverblue 40

Package version

Application ID          Branch     Version     Active commit
io.mpv.Mpv              stable     v0.38.0     505d279cf940

Description of the problem

I'm trying to use vapoursynth scripts from within mpv. It does not work when I try to enable it via the keybind I made. All I get is Changing filters failed! on screen and this in the logs:

[user_filter_wrapper] Setting option 'file' = '~~/vapoursynth/rife-ncnn-vulkan.vpy' (flags = 0)
[vapoursynth] using 12 concurrent requests.
[vapoursynth] Could not initialize VapourSynth scripting.
[user_filter_wrapper] Creating filter 'vapoursynth' failed.

I also tried what is listed below.


Minimal config attempt

~/.var/app/io.mpv.Mpv/config/mpv/vapoursynth/test.vpy

#!/usr/bin/env python3

import vapoursynth as vs

~/.var/app/io.mpv.Mpv/config/mpv/input.conf

F vf toggle vapoursynth=~~/vapoursynth/test.vpy

Same result


Checking vspipe version

flatpak run --command=vspipe io.mpv.Mpv --version

Output:

Failed to initialize VSScript

Importing vapoursynth directly in python

flatpak run --command=python io.mpv.Mpv -c "import vapoursynth"

Output:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "src/cython/vapoursynth.pyx", line 224, in init vapoursynth
TypeError: function() argument 'code' must be code, not str
fastrizwaan commented 4 weeks ago

hi, yes, vspipe shows error: Failed to initialize VSScript with io.mpv.Mpv

but this one: https://flathub.org/apps/org.bitbucket.mystery_keeper.VapourSynthEditor

flatpak install flathub org.bitbucket.mystery_keeper.VapourSynthEditor

flatpak run --command=vspipe org.bitbucket.mystery_keeper.VapourSynthEditor
VSPipe R60 usage:
  vspipe [options] <script> <outfile>

Available options:
  -a, --arg key=value              Argument to pass to the script environment
  -s, --start N                    Set output frame/sample range start
  -e, --end N                      Set output frame/sample range end (inclusive)
  -o, --outputindex N              Select output index
  -r, --requests N                 Set number of concurrent frame requests
  -c, --container <y4m/wav/w64>    Add headers for the specified format to the output
  -t, --timecodes FILE             Write timecodes v2 file
  -p, --progress                   Print progress to stderr
      --filter-time                Prints time spent in individual filters after processing
  -i, --info                       Show output node info and exit
  -g  --graph <simple/full>        Print output node filter graph in dot format and exit
  -v, --version                    Show version info and exit

Examples:
  Show script info:
    vspipe --info script.vpy
  Write to stdout:
    vspipe [options] script.vpy -
  Request all frames but don't output them:
    vspipe [options] script.vpy .
  Write frames 5-100 to file:
    vspipe --start 5 --end 100 script.vpy output.raw
  Pass values to a script:
    vspipe --arg deinterlace=yes --arg "message=fluffy kittens" script.vpy output.raw
  Pipe to x264 and write timecodes file:
    vspipe script.vpy - -c y4m --timecodes timecodes.txt | x264 --demuxer y4m -o script.mkv -

the manifest is at : https://github.com/flathub/org.bitbucket.mystery_keeper.VapourSynthEditor/blob/master/com.vapoursynth.VapourSynth.yaml

we are using R69 in mpv. shall we try to integrate that into mpv?

fastrizwaan commented 3 weeks ago

version 60 from that file and with mpv compiled in works, but we are using latest r69 and now updating to R70, if you could raise the issue there at vapoursynth github.

fastrizwaan commented 3 weeks ago

$ flatpak run --command=vspipe io.mpv.Mpv --version VapourSynth Video Processing Library Copyright (c) 2012-2022 Fredrik Mellbin Core R60 API R4.0 API R3.6 Options: -

updated to stable vapoursynth.