RTMP configs

~$ cd /etc/service/nginx-rtmpd
nginx-rtmpd$ cat run
#!/bin/execlineb -PW
fdmove -c -- 2 1

backtick -i -- PWD { pwd }
importas -iu -- PWD PWD

nginx
-e stderr
-c "${PWD}/data/nginx.conf"
-g "pid ${PWD}/pid;"
nginx-rtmpd$ cat data/nginx.conf
daemon off;
master_process on;
user nginx;
worker_processes 1;
include /etc/nginx/modules/*.conf;

events {
  worker_connections 768;
}

rtmp {
  server {
    listen [::1]:1935;
    chunk_size 4096;
    application live {
      live on;
      record off;
      meta copy;
      allow publish all;
      push rtmp://<TWITCH-URL-AND-KEY>;
    }
  }
}
nginx-rtmpd$ cd ../xorg-0
xorg-0$ cat run
#!/bin/execlineb -PW
fdmove -c 2 1

s6-setuidgid i15r

/usr/libexec/Xorg
-logfile /dev/null
-noreset
-novtswitch
-allowMouseOpenFail
-nolisten tcp
-nopn
+extension GLX
+extension RANDR
+extension RENDER
-config data/xorg.conf
xorg-0$ cat data/xorg.conf
Section "ServerFlags"
  Option "DontVTSwitch" "true"
  Option "AllowMouseOpenFail" "true"
  Option "PciForceNone" "true"
  Option "AllowEmptyInput" "true"
  Option "AutoEnableDevices" "false"
  Option "AutoAddDevices" "false"
EndSection

Section "Device"
  Identifier "dummy_videocard"
  Driver "dummy"
  DacSpeed 30000
  Option "ConstantDPI" "true"
  VideoRam 256000
EndSection

Section "Monitor"
  Identifier "dummy_monitor"
  HorizSync   1.0 - 300000.0
  VertRefresh 1.0 - 300.0
EndSection

Section "Screen"
  Identifier "dummy_screen"
  Device "dummy_videocard"
  Monitor "dummy_monitor"
  DefaultDepth 24
  SubSection "Display"
    Viewport 0 0
    Depth 24
    Modes "1920x1080"
    Virtual 1920 1080
  EndSubSection
EndSection

Section "ServerLayout"
  Identifier   "dummy_layout"
  Screen       "dummy_screen"
EndSection

Section "Module"
  Load  "fb"
EndSection
xorg-0$ cd ../vncserver
vncserver$ cat run
#!/bin/execlineb -PW
fdmove -c 2 1

s6-envuidgid i15r
multisubstitute
{
  importas -i UID UID
  importas -i GID GID
}

umask 077
if { mkdir -p data }
if { chown "${UID}:${GID}" data }

s6-applyuidgid -Uz --
x0vncserver
-desktop i15r
-display :0
-rfbport -1
-rfbunixpath data/s
-rfbunixmode 0600
-Log "*:stderr:30"
-SecurityTypes None
-localhost
-NeverShared -DisconnectClients
vncserver$ cd ../ffmpeg
ffmpeg$ cat run
#!/bin/execlineb -PW
fdmove -c 2 1

s6-envdir env
ip netns exec wan
s6-setuidgid i15r

ffmpeg
-init_hw_device vaapi=vaapi0:/dev/dri/renderD128 -filter_hw_device vaapi0
-f pulse -ac 2 -i default
-f x11grab -framerate 25 -video_size 1920x1080
-i :0
-c:v h264_vaapi
-preset veryfast
-b:v 4500k -maxrate 4500k -bufsize 13500k
-vf format=nv12,hwupload=extra_hw_frames=8
-c:a aac -b:a 160k -ar 44100
-g 50
-f flv
rtmp://[::1]/live


ffmpeg$ _

<- others on the web zone ->

HOSTED BY CLONQ!