Python Rtsp Player with Gstreamer that play and display rtp/jitterbuffer/fps/bitrate etc.
Example Usage:
from rtsp_gst import GST_RTSP_PLAYER, RTSP_CONFIG, GstRtsp, Gst
grp = GST_RTSP_PLAYER(
rtspsrc_config = RTSP_CONFIG(
location = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov",
latency = 300,
protocols = GstRtsp.RTSPLowerTrans.UDP
#protocols = GstRtsp.RTSPLowerTrans.TCP
),
restart_on_error = True
# decoder = Gst.ElementFactory.make("d3d11videosink")
# decoder = d3d11videosink
# sink = Gst.ElementFactory.make("avdec_h264")
# sink = avdec_h264
)
grp.play()
rtspsrc_config RTSP_CONFIG (Dataclass)
decoder Gstreamer decoder element as string or Gst-Element (Default: avdec_h264)
sink Gstreamer sink element as string or Gst-Element (Default: autovideosink)
loglevel Loglevel (Default: INFO)
restart_on_error Restart in case of error (Default: False)
Gstreamer rtspsrc documentation. Gtreamer RTSP flags documnetation
location RTSP Stream location (default: demo stream)
latency RTSP Stream latency (default: 200)
protocols RTSP Stream protocols (default: GstRtsp.RTSPLowerTrans.UDP)
user_id RTSP Stream Authentication Username (default: "")
user_pw RTSP Stream Authentication Password (default: "")
from rtsp_gst import RTSP_CONFIG
RTSP_CONFIG(
location = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov",
latency = 500,
)