aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/configuration/server/ffmpeg/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/configuration/server/ffmpeg/default.nix')
-rw-r--r--infra/libkookie/configuration/server/ffmpeg/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/infra/libkookie/configuration/server/ffmpeg/default.nix b/infra/libkookie/configuration/server/ffmpeg/default.nix
new file mode 100644
index 000000000000..24941af7ad49
--- /dev/null
+++ b/infra/libkookie/configuration/server/ffmpeg/default.nix
@@ -0,0 +1,42 @@
+{ config, ... }:
+
+{
+ # networking.firewall.allowedTCPPorts = [ 1935 7667 ];
+ # networking.firewall.allowedUDPPorts = [ 1935 ];
+ #
+ # To use DASH, use ffmpeg directly, without bothering with nginx
+ # systemd.services.streamffmpeg = {
+ # wantedBy = [ "multi-user.target" ];
+ # serviceConfig = {
+ # StateDirectory = "dash";
+ # Group = "nginx";
+ # };
+
+
+ # # -c:v:2 copy -map v:0 -aspect:2 16:9 \ # Ask puck about this!
+ # # -c:v:0 libx264 -map v:0 -b:v:0 800k -s:0 854x480 -aspect:0 16:9 -preset:0 fast \
+ # # -c:v:1 libx264 -map v:0 -b:v:1 1400k -s:1 1280x720 -aspect:1 16:9 -preset:1 fast \
+ # script = ''
+ # ${pkgs.ffmpeg}/bin/ffmpeg -listen 1 -i rtmp://0.0.0.0:1935/kookie.tv/app \
+ # -c:v libx264 -x264opts "keyint=24:min-keyint=24:no-scenecut" -r 24 \
+ # -c:a aac -b:a 128k \
+ # -bf 1 -b_strategy 0 -sc_threshold 0 -pix_fmt yuv420p \
+ # -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \
+ # /var/lib/dash/app.mpd
+
+ # # -c:a aac \
+ # # -c:v libx264 -crf 23 -preset veryfast \
+ # # -g 60 \
+ # # -map 0:a \
+ # # -f dash \
+ # # -init_seg_name 'init$RepresentationID$.$ext$' \
+ # # -media_seg_name 'chunk$RepresentationID$-$Number%05d$.$ext$' \
+ # # -use_template 1 -use_timeline 1 \
+ # # -seg_duration 2 -window_size 20 -remove_at_exit 1 \
+ # # -hls_playlist 1 \
+ # # -streaming 1 -ldash 1 \
+ # # -adaptation_sets "id=0,streams=v id=1,streams=a" \
+ # # /var/lib/dash/app.mpd
+ # '';
+ # };
+}