Skip to content

Instantly share code, notes, and snippets.

@ashish1405
ashish1405 / deepstream_gstreamer_decoding_with_python.py
Created January 11, 2021 05:38 — forked from CasiaFan/deepstream_gstreamer_decoding_with_python.py
Use Nvidia deepstream SDK gstreamer plugin to decode H.264 video stream and output decoded frames in python
import subprocess as sp
import cv2
import numpy as np
cmd = ["gst-launch-1.0",
"rtspsrc", "location=rtsp://admin:password@192.168.2.71/Streaming/Channels/1", "latency=100", "!",
"queue", "!",
"rtph264depay", "!",
"h264parse", "!",
"nvv4l2decoder", "drop-frame-interval=2", "!",