[Unit] Description=Normalize finished recordings/clips to the editing standard RequiresMountsFor=/srv/media After=docker.service [Service] Type=oneshot ExecStart=/usr/local/bin/normalize-sweep.sh Nice=15 IOSchedulingClass=idle Environment=ENCODE_THREADS=2 # x264 threads per conversion; keeps Jellyfin and the live portal responsive (default 2) # Environment=STITCH_MAX_PARTS=500 # join a stream's fragments when fewer than this (0 = never); STITCH_MAX_GAP_S=600 splits sessions # Environment=FILL_GAPS_MS=1000 # opt-in: CFR re-encode streams whose dropped-frame holes total >= 1 s (hours of CPU on this box)