about summary refs log blame commit diff
path: root/fun/streamTVL/default.nix
blob: 8d8263c9dd3fac8228ea714ec33322b0d8666bfc (plain) (tree)
1
2
3
4
5
6
7
8
9
              
 

                                                                              




                                                   

                               







                                                                                    
{ pkgs, ... }:

pkgs.writeShellScriptBin "start-tvl-stream" ''
  env LD_LIBRARY_PATH=/run/opengl-driver/lib/ ${pkgs.ffmpeg-full}/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
''