Giter VIP home page Giter VIP logo

pyrtsp's Introduction

pyrtsp

Quick Python RTSP server test

Dependencies

  • GStreamer 1.x
  • gst-python
  • pygobject
  • pygi
  • gst-rtsp-server

What is it?

This is a quickly hacked together RTSP server that uses a video test source to generate a video stream, encode it to h.264 using x264, payload it for RTP and stream it using gst-rtsp-server.

pyrtsp's People

Contributors

superdump avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyrtsp's Issues

rtsp server not working

Hi there,
Can you share the commands you used to get this running? Thanks in advance.


  • i copied your code into a file called utils/rtsp-server.py
  • i ran the code with this command in terminal # 1

$ python3 pyrtsp.py

utils/rtsp-server.py:22: PyGIWarning: GstVideo was imported without specifying a version first. Use gi.require_version('GstVideo', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gst, GstVideo, GstRtspServer
utils/rtsp-server.py:22: PyGIWarning: GstRtspServer was imported without specifying a version first. Use gi.require_version('GstRtspServer', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gst, GstVideo, GstRtspServer
stream ready at rtsp://127.0.0.1:8554/test
  • in terminal # 2 I ran this command

$ gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! fakesink

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading.
Additional debug info:
gstrtspsrc.c(5829): gst_rtspsrc_setup_auth (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
No supported authentication protocol was found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

RTSPstream format

Hi, not sure if you're still working on this project?
If so, can i ask a question? I'm trying to construct a rtsp stream with this format: rtsp://username:password@ip:port/cam/realmonitor?channel=1&subtype=0
Do you know if there's any way i can do that?

ValueError: Namespace Gst not available

Hi, i've been trying to relicate this code, but i have not passed the installation. When i try to run the pyrtsp.py it gives me this error message :

"Traceback (most recent call last):
File "RTSPconnection.py", line 2, in
gi.require_version('Gst','1.0')
File "C:/msys64/mingw64/lib/python3.7/site-packages\gi_init_.py", line 129, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gst not available
"

I think it has something to do with gst-rtsp-server, gst-python and/or gst-plugins-base.

This is on windows.

How to modify pipeline to expose webcam video stream

Hi,
I tried to modify the pipeline as follows to show pc webcam images:

v4l2src ! x264enc speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 pt=96

but don't works with the same gst-launch command I was using to connect to the original one.
There's a way to modify the pipeline to show webcam content?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.