Skip to content

--vspipe-args not passed into vapoursynth script on subsequent runs #1097

@cyvro

Description

@cyvro

On Av1an-git commit 0fcc2a8 I am erroring out when running av1an. The output shows that the args passed in through --vspipe-args is only in the fist execution of the vpy script. Av1an seems to be running the vpy script up to 8 times and the args is only seen in the first run.

Environment

OS: Arch
vapoursynth: r70

Command:av1an -i vapour_synth.vpy --vspipe-args source=/SpeedPool/test.mp4 -e svt-av1 -l ./av1an.log -v '--preset 4 --crf 31 --film-grain 8 --psy-rd 0.8 --spy-rd 2 --noise-norm-strength 3 --keyint -1 --scm 0 --tune 3' -o /SpeedPool/temp_test.mp4.mkv

vapour_synth.vpy content:

# vapour_synth.vpy

import vapoursynth as vs

core = vs.core
print("----------------")
path = globals()['source']

clip = core.bs.VideoSource(source=path)

clip.set_output()

result in 0.4.4:

[root@arch-av1 ~]# av1an -i vapour_synth.vpy --vspipe-args source=/SpeedPool/jellyfin/test.mp4 -e svt-av1 -l ./av1an.log -v \'--preset 4 --crf 31 --film-grain 8 --psy-rd 0.8 --spy-rd 2 --noise-norm-strength 3 --keyint -1 --scm 0 --tune 3' -o /SpeedPool/jellyfin/temp_test.mp4.mkv`
----------------
----------------
----------------
----------------
----------------
----------------
----------------
Scene detection
⠁ 00:00:00 ▕                                                                                                              ▏   0%  0/17984 (0 fps, eta unknown)----------------
----------------
⠒ 00:00:02 ▕██▏                                                                                                         ▏   2%  369/17984 (167.46 fps, eta 2m)

result in commit 0fcc2a8:

[root@arch-av1 ~]# av1an -i vapour_synth.vpy --vspipe-args source=/SpeedPool/jellyfin/test.mp4 -e svt-av1 -l ./av1an.log -v '--preset 4 --crf 31 --film-grain 8 --psy-rd 0.8 --spy-rd 2 --noise-norm-strength 3 --keyint -1 --scm 0 --tune 3' -o /SpeedPool/jellyfin/temp_test.mp4.mkv
----------------
----------------
Error: failed to open input file (Python exception: 'source'

Traceback (most recent call last):
  File "src/cython/vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
  File "src/cython/vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
  File "vapour_synth.vpy", line 9, in <module>
    path = globals()['source']
           ~~~~~~~~~^^^^^^^^^^
KeyError: 'source'
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions