Skip to content

Commit 09850cd

Browse files
committed
av1an: vapoursynth support
Corrected wrapper entries: - Need to override vapoursynth with `vapoursynth.withPlugins` for av1an to be able to use VS plugins. Changed PYTHON_PATH accordingly. Passing `pkgs.vapoursynth` to `python3Packages.makePythonPath` makes an incorrect path entry, resulting in segfault when the program is run. - Need LD_LIBRARY_PATH to use VS plugins (e.g. ffms2 and lsmash, the recommended chunking method). Otherwise get e.g. `Error: FFMS2 is not installed, but it was specified as the chunk method`. - Need vapoursynth in PATH to use VS based chunking methods or VS script as input. At least, `vspipe` binary needs to be visible in PATH. Add mkvtoolnix option; it is the recommended concatenation method.
1 parent aab5907 commit 09850cd

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

pkgs/by-name/av/av1an/package.nix

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@
55
testers,
66
av1an-unwrapped,
77
ffmpeg,
8-
python3Packages,
8+
python3,
99
libaom,
1010
svt-av1,
1111
rav1e,
1212
libvpx,
1313
x264,
1414
x265,
1515
libvmaf,
16+
vapoursynth,
17+
mkvtoolnix-cli,
1618
withAom ? true, # AV1 reference encoder
1719
withSvtav1 ? false, # AV1 encoder/decoder (focused on speed and correctness)
1820
withRav1e ? false, # AV1 encoder (focused on speed and safety)
1921
withVpx ? true, # VP8 & VP9 de/encoding
2022
withX264 ? true, # H.264/AVC encoder
2123
withX265 ? true, # H.265/HEVC encoder
2224
withVmaf ? false, # Perceptual video quality assessment algorithm
25+
withMkvtoolnix ? true, # mkv editor, recommended concatenation method
2326
}:
2427
# av1an requires at least one encoder
2528
assert lib.assertMsg (lib.elem true [
@@ -40,19 +43,24 @@ symlinkJoin {
4043
postBuild =
4144
let
4245
runtimePrograms =
43-
[ (ffmpeg.override { inherit withVmaf; }) ]
46+
[
47+
vapoursynth
48+
(ffmpeg.override { inherit withVmaf; })
49+
]
4450
++ lib.optional withAom libaom
4551
++ lib.optional withSvtav1 svt-av1
4652
++ lib.optional withRav1e rav1e
4753
++ lib.optional withVpx libvpx
4854
++ lib.optional withX264 x264
4955
++ lib.optional withX265 x265
50-
++ lib.optional withVmaf libvmaf;
56+
++ lib.optional withVmaf libvmaf
57+
++ lib.optional withMkvtoolnix mkvtoolnix-cli;
5158
in
5259
''
5360
wrapProgram $out/bin/av1an \
61+
--prefix LD_LIBRARY_PATH : ${vapoursynth}/lib \
5462
--prefix PATH : ${lib.makeBinPath runtimePrograms} \
55-
--prefix PYTHONPATH : ${python3Packages.makePythonPath [ python3Packages.vapoursynth ]}
63+
--prefix PYTHONPATH : ${vapoursynth}/${python3.sitePackages}
5664
'';
5765

5866
passthru = {

0 commit comments

Comments
 (0)