about summary refs log tree commit diff
path: root/fun/streamTVL
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-04-21T02·03+0100
committerVincent Ambo <tazjin@google.com>2020-04-21T02·03+0100
commit97c7ebf7581e87ff23804fd7f2441646386fda3c (patch)
treedcfb419791b41d70df72506f63077cab689b051e /fun/streamTVL
parentcb62e87b77992c97553bdb839a9378fe74cbcaab (diff)
chore(fun): //fun/tvl -> //fun/streamTVL r/647
Otherwise this is confusing because //web/tvl is now a thing.
Diffstat (limited to 'fun/streamTVL')
-rw-r--r--fun/streamTVL/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/fun/streamTVL/default.nix b/fun/streamTVL/default.nix
new file mode 100644
index 000000000000..da7c00ce4be5
--- /dev/null
+++ b/fun/streamTVL/default.nix
@@ -0,0 +1,19 @@
+{ depot, ... }:
+
+depot.third_party.writeShellScriptBin "start-tvl-stream" ''
+  env LD_LIBRARY_PATH=/run/opengl-driver/lib/ ${depot.third_party.ffmpeg}/bin/ffmpeg \
+       -vsync 0 \
+       -hwaccel cuvid \
+       -init_hw_device cuda=0 -filter_hw_device 0 \
+       -f x11grab \
+       -video_size 1920x1080 \
+       -framerate 60 \
+       -thread_queue_size 256 \
+       -i :0.0+0,0 \
+       -filter:v "format=nv12,hwupload,scale_npp=w=1280:h=720:interp_algo=lanczos" \
+       -c:v h264_nvenc \
+       -preset:v llhq \
+       -rc:v cbr_ld_hq \
+       -an \
+       -f flv rtmp://tazj.in:1935/tvl
+''