Dummy gstreamer container

This commit is contained in:
Artur 2025-07-20 14:54:19 +03:00
parent 4f138b0282
commit 09267f8f37
3 changed files with 56 additions and 1 deletions

41
README.md Normal file
View File

@ -0,0 +1,41 @@
# 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

@ -21,7 +21,7 @@ ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video
ENV DISPLAY :0 ENV DISPLAY :0
ENV FILENAME=nvdummy.sh ENV FILENAME=nvdummy.sh
# Copy your pipeline script # Copy your pipeline script
COPY $FILENAME /app/ COPY ../$FILENAME /app/
RUN chmod +x /app/$FILENAME RUN chmod +x /app/$FILENAME
# Set working directory # Set working directory

14
nvdummy.sh Executable file
View File

@ -0,0 +1,14 @@
#!/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