-
Notifications
You must be signed in to change notification settings - Fork 35
Failure using Vapoursynth script as input, but piping same script through vspipe works #284
Copy link
Copy link
Open
Description
Hi, I'm trying to use QSVEnc to encode a Dolby Vision profile 7 into profile 8. I'm using Vapoursynth along with FelBaker and BestSource plugins. This is the Vapursynth script:
import vapoursynth as vs
core = vs.core
core.max_cache_size = 4000
core.std.LoadPlugin(path="/usr/local/lib/vapoursynth/libfelbaker.so")
core.std.LoadPlugin(path="/usr/local/lib/vapoursynth/libbestsource.so")
bl = core.bs.VideoSource(source="/temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/bl.hevc", hwdevice="vaapi")
el = core.bs.VideoSource(source="/temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/el.hevc", hwdevice="vaapi")
if bl.num_frames != el.num_frames:
min_frames = min(bl.num_frames, el.num_frames)
bl = bl[:min_frames]
el = el[:min_frames]
clip = core.fel.Bake(bl, el)
clip = core.resize.Spline36(clip=clip, format=vs.YUV420P10, matrix_s="2020ncl", transfer_s="st2084", primaries_s="2020", range_s="limited", chromaloc_s="top_left", dither_type="ordered")
clip.set_output()
If I use this command:
/usr/bin/qsvencc
-i /temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/script.vpy
--codec hevc
--icq 15
--quality best
--output-depth 10
--profile main10
--level 5.1
--max-bitrate 160000
--vbv-bufsize 160000
--sar 1:1
--closed-gop
--colormatrix bt2020nc
--colorprim bt2020
--transfer smpte2084
--colorrange limited
--chromaloc 2
--aud
--repeat-headers
--master-display G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)
--max-cll 1000,92
--dolby-vision-profile 8.1
--dolby-vision-rpu /temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/rpu_p8.bin
--frames 170905
--fps 23.976
--async-depth 8
-o /downloads/temp/baked_p8.mkv
It outputs this:
[failed to initialize file reader(s).
[libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
However, if I run the command like this:
vspipe
-c y4m
'/temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/script.vpy' - |
'/usr/bin/qsvencc'
--y4m
-i -
--codec hevc
--icq 15
--quality best
--output-depth 10
--profile main10
--level 5.1
--max-bitrate 160000
--vbv-bufsize 160000
--sar 1:1
--closed-gop
--colormatrix bt2020nc
--colorprim bt2020
--transfer smpte2084
--colorrange limited
--chromaloc 2
--aud
--repeat-headers
--master-display 'G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)'
--max-cll '1000,92'
--dolby-vision-profile 8.1
--dolby-vision-rpu '/temp/Runner-0d27bb48-52f3-4184-87cd-886ed39d4e6b/rpu_p8.bin'
--frames 170905
--fps 23.976
--async-depth 8
-o '/downloads/temp/baked_p8.mkv'
It works correctly. Since the VS script itself works, I want to skip vspipe as it adds overhead to the script. What could be the issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels