summaryrefslogtreecommitdiffstats
path: root/2022
diff options
context:
space:
mode:
authorLeo Vivier <zaeph@zaeph.net>2022-10-12 19:18:46 +0200
committerLeo Vivier <zaeph@zaeph.net>2022-10-12 19:18:58 +0200
commit291ac85d22819884dab40f61d4a2d77d8984d0e1 (patch)
tree8b146a40fd15161b3af6b079ffa4c43909194d03 /2022
parent592fd3caff408914a97f2669b86ee49f7271b488 (diff)
downloademacsconf-wiki-291ac85d22819884dab40f61d4a2d77d8984d0e1.tar.xz
emacsconf-wiki-291ac85d22819884dab40f61d4a2d77d8984d0e1.zip
Add working notes on new ffmpeg incantation for prerec
Diffstat (limited to '2022')
-rw-r--r--2022/organizers-notebook/index.org27
1 files changed, 27 insertions, 0 deletions
diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org
index 74d72100..55b0df94 100644
--- a/2022/organizers-notebook/index.org
+++ b/2022/organizers-notebook/index.org
@@ -243,6 +243,33 @@ DEADLINE: <2022-10-28 Fri>
:END:
*** TODO Optimize ffmpeg incantation
Remember to update [[file:../prepare.md::Compression]] with the new incantation.
+
+**** Incantation from last year
+#+begin_src sh
+Q=32
+ffmpeg -y -i "$1" -c:v libvpx-vp9 -b:v 0 -crf $Q -aq-mode 2 -an -tile-columns 0 -tile-rows 0 -frame-parallel 0 -cpu-used 8 -auto-alt-ref 1 -lag-in-frames 25 -g 240 -pass 1 -f webm -threads 8 /dev/null &&
+ffmpeg -y -i "$1" -c:v libvpx-vp9 -b:v 0 -crf $Q -c:a copy -tile-columns 2 -tile-rows 2 -frame-parallel 0 -cpu-used -5 -auto-alt-ref 1 -lag-in-frames 25 -pass 2 -g 240 -threads 8 "$2"
+#+end_src
+
+**** New candidate
+Changelog:
+- Disable adaptive quantization by setting aq-mode to 0 (TODO: compare samples)
+- Add ~-row-mt 1~ needed to support ~tile-rows~ (2×2 is enough for 720p)
+- Also use tiles for first pass
+- Remove ~-frame-parallel 0~ because it’s disabled by default (see [[https://github.com/Kagami/webm.py/wiki/Notes-on-encoding-settings][Notes on encoding settings · Kagami/webm.py Wiki]])
+- Put number of CPU in variable and use it for ~cpu-used~ and ~threads~
+- Stick to default for ~auto-alt-ref~
+- Stick to default for ~lag-in-frames~
+#+begin_src sh
+Q=32
+CPU=8
+ffmpeg -y -i "$1" -c:v libvpx-vp9 -b:v 0 -crf $Q -an -row-mt 1 -tile-columns 2 -tile-rows 2 -cpu-used $CPU -g 240 -pass 1 -f webm -threads $CPU /dev/null &&
+ ffmpeg -y -i "$1" -c:v libvpx-vp9 -b:v 0 -crf $Q -c:a copy -row-mt 1 -tile-columns 2 -tile-rows 2 -cpu-used $CPU -pass 2 -g 240 -threads $CPU "$2"
+#+end_src
+
+Other considerations:
+- We might want to tweak the time before keyframes (~-g~).
+
*** TODO Figure out workflow for handling submitted prerecs
We need time after the prerecs get submitted to:
- convert the videos and check that they've been reencoded properly by watching the re-encoded ones all the way to the end