mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Build gstreamer in nvidia image (#36)
* build gstreamer 1.20 for nvidia dockerfile. * add nvidia to build. * add nvidia to start. * add config for nvidia. * upgrade cuda ro 11.4.3. * add cudaconvert to comment. * fix paths. * add cuda to ld. * upgrade supervisord version. * add config to suprtvisord in rebuild. * update nvenc params. * update nvidia dockerfile. * h264 profile constrained-baseline. * h264 send SPS PPS with every IDR.
This commit is contained in:
20
dev/runtime/Dockerfile.nvidia
Normal file
20
dev/runtime/Dockerfile.nvidia
Normal file
@ -0,0 +1,20 @@
|
||||
ARG BASE_IMAGE=neko_server_runtime:latest
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
#
|
||||
# install xfce
|
||||
RUN set -eux; apt-get update; \
|
||||
# nvidia docker does not have firefox only firefox-esr
|
||||
apt-get install -y --no-install-recommends xfce4 xfce4-terminal firefox sudo; \
|
||||
#
|
||||
# add user to sudoers
|
||||
usermod -aG sudo neko; \
|
||||
echo "neko:neko" | chpasswd; \
|
||||
echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers; \
|
||||
# clean up
|
||||
apt-get clean -y; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
#
|
||||
# copy configuation files
|
||||
COPY supervisord.conf /etc/neko/supervisord/xfce.conf
|
101
dev/runtime/config.nvidia.yml
Normal file
101
dev/runtime/config.nvidia.yml
Normal file
@ -0,0 +1,101 @@
|
||||
capture:
|
||||
video:
|
||||
codec: h264
|
||||
ids:
|
||||
- nvh264enc
|
||||
- x264enc
|
||||
pipelines:
|
||||
nvh264enc:
|
||||
fps: 25
|
||||
bitrate: 2
|
||||
#gst_prefix: "! cudaupload ! cudaconvert ! video/x-raw(memory:CUDAMemory),format=NV12"
|
||||
gst_prefix: "! video/x-raw,format=NV12"
|
||||
gst_encoder: "nvh264enc"
|
||||
gst_params:
|
||||
bitrate: 3000
|
||||
rc-mode: 5 # Low-Delay CBR, High Quality
|
||||
preset: 5 # Low Latency, High Performance
|
||||
zerolatency: true
|
||||
gop-size: 25
|
||||
gst_suffix: "! h264parse config-interval=-1 ! video/x-h264,stream-format=byte-stream,profile=constrained-baseline"
|
||||
x264enc:
|
||||
fps: 25
|
||||
bitrate: 1
|
||||
gst_prefix: "! video/x-raw,format=I420"
|
||||
gst_encoder: "x264enc"
|
||||
gst_params:
|
||||
threads: 4
|
||||
bitrate: 4096
|
||||
key-int-max: 25
|
||||
byte-stream: true
|
||||
tune: zerolatency
|
||||
speed-preset: veryfast
|
||||
gst_suffix: "! video/x-h264,stream-format=byte-stream,profile=constrained-baseline"
|
||||
|
||||
server:
|
||||
pprof: true
|
||||
|
||||
desktop:
|
||||
screen: "1920x1080@60"
|
||||
|
||||
member:
|
||||
provider: "object"
|
||||
object:
|
||||
users:
|
||||
- username: "admin"
|
||||
password: "admin"
|
||||
profile:
|
||||
name: "Administrator"
|
||||
is_admin: true
|
||||
can_login: true
|
||||
can_connect: true
|
||||
can_watch: true
|
||||
can_host: true
|
||||
can_share_media: true
|
||||
can_access_clipboard: true
|
||||
sends_inactive_cursor: true
|
||||
can_see_inactive_cursors: true
|
||||
- username: "user"
|
||||
password: "neko"
|
||||
profile:
|
||||
name: "User"
|
||||
is_admin: false
|
||||
can_login: true
|
||||
can_connect: true
|
||||
can_watch: true
|
||||
can_host: true
|
||||
can_share_media: true
|
||||
can_access_clipboard: true
|
||||
sends_inactive_cursor: true
|
||||
can_see_inactive_cursors: false
|
||||
# provider: "file"
|
||||
# file:
|
||||
# path: "/home/neko/members.json"
|
||||
# provider: "multiuser"
|
||||
# multiuser:
|
||||
# admin_password: "admin"
|
||||
# user_password: "neko"
|
||||
# provider: "noauth"
|
||||
|
||||
session:
|
||||
# Allows reconnecting the websocket even if the previous
|
||||
# connection was not closed. Can lead to session hijacking.
|
||||
merciful_reconnect: true
|
||||
# Show inactive cursors on the screen. Can lead to multiple
|
||||
# data sent via WebSockets and additonal rendering cost on
|
||||
# the clients.
|
||||
inactive_cursors: true
|
||||
api_token: "neko123"
|
||||
cookie:
|
||||
# Disabling cookies will result to use Bearer Authentication.
|
||||
# This is less secure, because access token will be sent to
|
||||
# client in playload and accessible via JS app.
|
||||
enabled: false
|
||||
secure: false
|
||||
|
||||
webrtc:
|
||||
icelite: true
|
||||
iceservers:
|
||||
- urls: [ stun:stun.l.google.com:19302 ]
|
||||
# username: foo
|
||||
# credential: bar
|
Reference in New Issue
Block a user