Compare commits

..

No commits in common. "cb6f7f03e596dc58b8ba22e760bf95e6ea98922a" and "4f138b02824d097264bfabb61def7aec5a530fc6" have entirely different histories.

16 changed files with 10 additions and 247 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
*.log
container/Drivers/*

View File

@ -19,21 +19,14 @@ RUN apt-get update && \
# Set environment variables for OpenGL
ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video
ENV DISPLAY :0
ENV FILENAME=nvfull.sh
ENV BMD=bmd_install.sh
ENV FILENAME=nvdummy.sh
# Copy your pipeline script
COPY $FILENAME /app/
RUN chmod +x /app/$FILENAME
COPY ./Drivers/ /drivers/
COPY $BMD /scripts/
RUN chmod +x /scripts/$BMD && \
cd /scripts && \
./$BMD
# Set working directory
WORKDIR /app
# Default command to run your pipeline
CMD ["sh", "-c", "tail -f /dev/null"]
CMD ["./nvdummy.sh"]
#CMD ["nvidia-smi"]

View File

@ -1,41 +0,0 @@
# What is it?
In this repository collected different pipelines with workarounds for zero latency streaming.
Main idea for now is using of docker container with running Ubuntu 22.04 distro inside, mostly for testing purposes.
We must passthrough in this case GPU and Decklink devices for this purpose it is necessary to have similar driver versions on host and container system, otherwise it just will not work.
Component diagram showing what we want to achieve
```plantuml
``@startuml
node "Host" {
package "Docker" {
interface "UDP socket" as USock
package "Container" {
USock - [Gst Pipeline]
}
}
USock ..> NetworkBridge
[Kernel] -left- GPU
DeckLink -up- [Kernel]
NetworkBridge - [Docker]
NetworkAdapter -left- [Kernel]
[Gst Pipeline] ..> GPU
[Gst Pipeline] ..> DeckLink
NetworkBridge ..> NetworkAdapter
}
node "Router" {
port PhysicalPort1
port PhysicalPort2
NetworkAdapter --> PhysicalPort2
}
node "Oculus" {
interface WiFi
component MedicineApp
MedicineApp <-- WiFi
WiFi --> PhysicalPort1
}
@enduml
```sh
sudo docker run --runtime=nvidia --gpus all -v ~/git/gstreamer-pipelines/:/app deepstream-gst:12.6
```

View File

@ -1,53 +0,0 @@
#!/bin/bash
driversPath='/drivers'
ls -lah $driversPath
fetch_sdk() {
echo "Trying to fetch from remote"
let pwd=$PWD
cd $driversPath
wget -r --accept-regex '.*Desktop.*tar' https://vptyp.tech/file/bmd/ || echo "Unable to fetch Driver"
wget -r --accept-regex '.*SDK.*zip' https://vptyp.tech/file/bmd/ || echo "Unable to fetch SDK"
cd $pwd
}
if [[ -e /drivers ]]; then
echo 'Drivers folder existed!'
sdk_name=$(find $driversPath -name "*SDK*zip" -exec basename {} \;)
driver_name=$(find $driversPath -name "*Desktop*tar*" -exec basename {} \;)
if [[ -n $sdk_name && -n $driver_name ]]; then
printf "Found both files names: \n-%s\n-%s\n" $sdk_name $driver_name
else
printf "Wasn't able to found something: \nSDK name - %s\nDriver name - %s\n" $sdk_name $driver_name
fetch_sdk
sdk_name=$(find $driversPath -name "*SDK*zip" -exec basename {} \;)
driver_name=$(find $driversPath -name "*Desktop*tar*" -exec basename {} \;)
fi
fi
if ! command -v unzip >/dev/null 2>&1; then
apt-get update
apt-get install -y zip
fi
if ! command -v tar >/dev/null 2>&1; then
apt-get install -y tar
fi
if [[ -z "$sdk_name" || -z "$driver_name" ]]; then
echo 'Failed to find drivers'
exit 1
fi
cd /drivers
unzip ./$sdk_name -d sdk
mkdir driver
tar -xvzf ./$driver_name -C driver
cd ./driver/*/deb/x86_64/
apt-get install -y libjpeg62 libgl1-mesa-glx libxml2
apt-get install -y ./desktopvideo_*.deb

View File

@ -1,4 +0,0 @@
#!/bin/bash
DOCKER_BUILDKIT=1 sudo docker build --build-arg KERNEL_VERSION=$(uname -r) \
-t deepstream-gst:12.6 .

View File

@ -1,8 +0,0 @@
gst-launch-1.0 \
decklinkvideosrc \
device-number=1 \
connection=1 \
mode=auto \
drop-no-signal-frames=true \
! videoconvert \
! autovideosink sync=false

View File

@ -1,14 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 videotestsrc pattern=smpte ! \
capsfilter caps="video/x-raw, width=1920, height=1080, framerate=30/1" ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM)" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
video/x-h264, profile=main ! \
nvv4l2decoder ! \
nvvideoconvert ! \
fakesink

View File

@ -1,19 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 decklinkvideosrc \
device-number=1 \
connection=1 \
mode=1080p60 \
drop-no-signal-frames=true \
videoconvert ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM)" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
video/x-h264, profile=main ! \
h264parse config-interval=1 ! \
mpegtsmux ! \
rtpmp2tpay ! \
udpsink host=239.239.239.3 port=8889 auto-multicast=true sync=false async=false qos=false

View File

@ -1,14 +0,0 @@
#!/bin/bash
sudo docker run \
--runtime=nvidia \
--gpus all \
--device /dev/blackmagic/io0:/dev/blackmagic/io0 \
--device /dev/blackmagic/io1:/dev/blackmagic/io1 \
-v ~/git/gstreamer-pipelines/:/app \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=$DISPLAY \
--network=host \
-v ~/git/gstreamer-pipelines/container/Drivers/:/drivers \
--name deepstream-gst \
deepstream-gst:12.6

View File

@ -1,10 +1,8 @@
GST_DEBUG=2 \
gst-launch-1.0 \
decklinkvideosrc \
gst-launch-1.0 \
decklinkvideosrc \
device-number=1 \
connection=1 \
mode=auto \
drop-no-signal-frames=true \
! videoconvert \
! autovideosink sync=false
! videoconvert \
! autovideosink sync=false

View File

@ -1,11 +0,0 @@
GST_DEBUG=2 \
gst-launch-1.0 \
decklinkvideosrc \
device-number=1 \
connection=1 \
mode=auto \
drop-no-signal-frames=true \
! nvvideoconvert \
! video/x-raw,format=I420,width=1920,height=1080,framerate=60/1 \
! rtpvrawpay \
! udpsink host=239.239.239.3 port=8889 auto-multicast=true sync=false async=false qos=false

View File

@ -1,6 +0,0 @@
#!/bin/bash
gst-launch-1.0 decklinkvideosrc drop-no-signal-frames=true mode=auto device-number=1 connection=1 ! \
capsfilter caps="video/x-raw,format=(string)UYVY" ! \
videoconvert ! \
x264enc ! \
fakesink

View File

@ -1,14 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 decklinkvideosrc device-number=1 connection=1 mode=1080p60 drop-no-signal-frames=true ! \
capsfilter caps="video/x-raw,format=(string)UYVY" ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM),format=I420,width=1920,height=1080" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
h264parse config-interval=1 ! \
mpegtsmux ! \
rtpmp2tpay ! \
udpsink host=239.239.239.3 port=8889 auto-multicast=true sync=false async=false qos=false

View File

@ -1,14 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 videotestsrc pattern=smpte ! \
capsfilter caps="video/x-raw, width=1920, height=1080, framerate=30/1" ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM)" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
video/x-h264, profile=main ! \
nvv4l2decoder ! \
nvvideoconvert ! \
fakesink

View File

@ -1,14 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 decklinkvideosrc device-number=1 connection=1 mode=1080p60 drop-no-signal-frames=true ! \
capsfilter caps="video/x-raw,format=(string)UYVY" ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM),format=Y444,width=1920,height=1080" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
h264parse config-interval=1 ! \
mpegtsmux ! \
rtpmp2tpay ! \
udpsink host=239.239.239.3 port=8889 auto-multicast=true sync=false async=false qos=false

View File

@ -1,14 +0,0 @@
#!/bin/bash
GST_DEBUG_COLOR_MODE=off \
GST_TRACERS="latency(flags=pipeline+element)" \
GST_DEBUG="GST_TRACER:7" \
GST_DEBUG_FILE=latency_traces.log \
gst-launch-1.0 decklinkvideosrc device-number=0 connection=1 mode=1080p60 drop-no-signal-frames=true ! \
capsfilter caps="video/x-raw,format=(string)UYVY" ! \
nvvideoconvert ! \
capsfilter caps="video/x-raw(memory:NVMM),format=I420,width=1920,height=1080" ! \
nvv4l2h264enc bitrate=10000000 control-rate=1 idrinterval=1 tuning-info-id=3 preset-id=3 profile=2 ! \
h264parse config-interval=1 ! \
mpegtsmux ! \
rtpmp2tpay ! \
udpsink host=239.239.239.3 port=8890 auto-multicast=true sync=false async=false qos=false