Hi!
I use ubuntu, python and gstreamer or c++ and gstreamer.
How I can create stream and send images from GPU?
I found this code, but get error: gi.repository.GLib.Error: gst_parse_error: no element “nvvidconv” (1)
pipeline = None
bus = None
message = None
# initialize GStreamer
Gst.init(None)
for i in range(1, 100):
print("loop =", i, " ")
# build the pipeline
pipeline = Gst.parse_launch(
"videotestsrc ! video/x-raw,width=1920,height=1080 ! nvvidconv ! video/x-raw(memory:NVMM),width=480,height=380,pixel-aspect-ratio=1/1 ! nvoverlaysink overlay-x=0 overlay-y=360 overlay-w=480 overlay-h=380 "
)
# start playing
print("Switch to PLAYING state")
pipeline.set_state(Gst.State.PLAYING)
sleep(5)
print("Send EoS")
Gst.Element.send_event(pipeline, Gst.Event.new_eos())
# wait until EOS or error
bus = pipeline.get_bus()
msg = bus.timed_pop_filtered(
Gst.CLOCK_TIME_NONE, Gst.MessageType.EOS)
# free resources
print("Switch to NULL state")
pipeline.set_state(Gst.State.NULL)
sleep(1)
Hi,
Do you run in docker? The sample should run on clean-installed system directly. Seems like you run in docker and certain libs are not included. So certain plugins are missing.
docker pull nvcr.io/nvidia/deepstream:6.1.1-devel
sudo docker ps -a
return
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3495bf0f3f6d nvcr.io/nvidia/deepstream:6.1.1-devel "--name nvidia_deeps…" 20 minutes ago Created nvidia_deepstream_devel
But sudo docker start nvidia_deepstream_devel
return error:
Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "--name": executable file not found in $PATH: unknown
Error: failed to start containers: nvidia_deepstream_devel
Whot me need do? I use ubuntu 22.04 or windows 10.
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container