From d2f51fa10faec141cd86ea1ddab975afa459bea6 Mon Sep 17 00:00:00 2001 From: mbattista Date: Sat, 1 Apr 2023 21:09:18 +0200 Subject: [PATCH] add h264parse to nvidia pipeline --- .docker/base/Dockerfile.nvidia | 4 ++-- server/internal/capture/pipelines.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/base/Dockerfile.nvidia b/.docker/base/Dockerfile.nvidia index ad05573..625cfd6 100644 --- a/.docker/base/Dockerfile.nvidia +++ b/.docker/base/Dockerfile.nvidia @@ -54,7 +54,7 @@ RUN set -eux; \ # # STAGE 1: SERVER # -FROM golang:1.18-bullseye as server +FROM golang:1.20-bullseye as server WORKDIR /src # @@ -85,7 +85,7 @@ RUN go get -v -t -d . && go build -o bin/neko cmd/neko/main.go # # STAGE 2: CLIENT # -FROM node:14-bullseye-slim as client +FROM node:18-bullseye-slim as client WORKDIR /src # diff --git a/server/internal/capture/pipelines.go b/server/internal/capture/pipelines.go index 8c6e853..8bc5a88 100644 --- a/server/internal/capture/pipelines.go +++ b/server/internal/capture/pipelines.go @@ -150,7 +150,7 @@ func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc strin return "", err } - pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! nvh264enc name=encoder preset=5 zerolatency=1 gop-size=15 bitrate=%d rc-mode=5 ! video/x-h264,stream-format=byte-stream,profile=constrained-baseline"+pipelineStr, display, fps, bitrate) + pipelineStr = fmt.Sprintf(videoSrc+"video/x-raw,format=NV12 ! nvh264enc name=encoder preset=4 bitrate=%d rc-mode=5 ! h264parse config-interval=3 ! video/x-h264,stream-format=byte-stream,profile=constrained-baseline"+pipelineStr, display, fps, bitrate) } else { // https://gstreamer.freedesktop.org/documentation/openh264/openh264enc.html?gi-language=c#openh264enc // gstreamer1.0-plugins-bad