Skip to content

Commit 962c239

Browse files
committed
Update recorder
1 parent 670962e commit 962c239

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

hosts/servers/pollux/lecture-recorder.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ let
1414
1515
printf "Recording %s to %s\n" "${duration}" "$mkv_file"
1616
${ffmpeg} -headers "Referer: https://tuwel.tuwien.ac.at\r\n" \
17-
-t "${duration}" \
18-
-i "https://live-cdn-2.video.tuwien.ac.at/lecturetube-live/${channel}/playlist.m3u8" \
19-
-c:v libx265 -preset slow -crf 28 \
20-
-c:a copy "$mkv_file"
17+
-t "${duration}" \
18+
-i "https://live-cdn-2.video.tuwien.ac.at/lecturetube-live/${channel}/playlist.m3u8" \
19+
-c:a copy "$mkv_file"
2120
printf "Finished recording at %s\n" "$(date)"
2221
2322
echo "Moving to nextcloud"
24-
out_dir="${config.services.nextcloud.datadir}/data/root/files/Lectures/$year/$month/$day/$channel"
23+
24+
out_dir="${config.services.nextcloud.datadir}/data/root/files/Lectures/$year/$month/$day/${channel}"
2525
mkdir -p "$out_dir"
26-
mv "$mkv_file" "$out_dir/$hour-$minute.mkv"
2726
28-
/run/current-system/sw/bin/nextcloud-occ files:scan root
27+
out_file="$out_dir/$hour-$minute.mkv"
28+
mv "$mkv_file" "$out_file"
29+
30+
/run/current-system/sw/bin/nextcloud-occ files:scan root --path "/root/files/Lectures/$year/$month/$day/${channel}/$hour-$minute.mkv"
2931
'';
3032
# TODO: don't use /run/current-system, ideally use nix syntax
3133

@@ -55,6 +57,8 @@ in
5557
informatik-1h = service "deu116-informatikhoersaal" "3600";
5658
informatik-2h = service "deu116-informatikhoersaal" "7200";
5759
informatik-3h = service "deu116-informatikhoersaal" "10800";
60+
61+
tmp-recording = service "bau178a-gm-1-audi-max" "5";
5862
};
5963

6064
systemd.timers = {

0 commit comments

Comments
 (0)