]> git.ipfire.org Git - ipfire.org.git/commitdiff
index: Improve video quality/compression
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 16 Jan 2024 11:39:15 +0000 (11:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 16 Jan 2024 11:39:15 +0000 (11:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am

index 538918bbac0e8255fadb7b9b3e6efbc3997e6c6b..bc6fb860e8c6f7af334d8c7a197269528f50f9d9 100644 (file)
@@ -1180,27 +1180,32 @@ src/static/videos/firewall@%.av1.mp4: src/static/videos/firewall.mp4
                -map_metadata -1 \
                -an \
                -c:v libsvtav1 \
+               -b:v 0 \
                -crf 31 \
-               -preset 5 \
+               -strict experimental \
+               -preset 3 \
                -pix_fmt yuv420p \
                -movflags +faststart \
-               -vf scale=$(patsubst src/static/videos/firewall@%.av1.mp4,%,$@):-2,fps=25 \
+               -vf scale=$(patsubst src/static/videos/firewall@%.av1.mp4,%,$@):-2:flags=lanczos,fps=25 \
+               $(FFMPEG_MT) \
                $@
 
 # H.256
-src/static/videos/firewall@%.h256.mp4: src/static/videos/firewall.mp4
+src/static/videos/firewall@%.h265.mp4: src/static/videos/firewall.mp4
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
        $(FFMPEG) -y \
                -i $^ \
                -map_metadata -1 \
                -an \
                -c:v libx265 \
-               -crf 25 \
+               -b:v 0 \
+               -crf 27 \
                -preset veryslow \
                -pix_fmt yuv420p \
                -movflags +faststart \
                -tag:v hvc1 \
-               -vf scale=$(patsubst src/static/videos/firewall@%.h256.mp4,%,$@):-2,fps=25 \
+               -vf scale=$(patsubst src/static/videos/firewall@%.h265.mp4,%,$@):-2:flags=lanczos,fps=25 \
+               $(FFMPEG_MT) \
                $@
 
 # H.264
@@ -1211,12 +1216,14 @@ src/static/videos/firewall@%.h264.mp4: src/static/videos/firewall.mp4
                -map_metadata -1 \
                -an \
                -c:v libx264 \
+               -b:v 0 \
                -crf 27 \
                -preset veryslow \
                -profile:v main \
                -pix_fmt yuv420p \
                -movflags +faststart \
-               -vf scale=$(patsubst src/static/videos/firewall@%.h264.mp4,%,$@):-2,fps=25 \
+               -vf scale=$(patsubst src/static/videos/firewall@%.h264.mp4,%,$@):-2:flags=lanczos,fps=25 \
+               $(FFMPEG_MT) \
                $@
 
 # VP9