GithubHelp home page GithubHelp logo

Comments (3)

j13tw avatar j13tw commented on July 19, 2024 3

Hello iBelow,
I doing my python flask project to capture the RTSP Camera have same problem
I think the problem is base on the client = rtsp.Client("rtspUrl") is not ready to connect rtsp server
then the check connection status command "client.isOpened()" is true
and the python code sequence execute the client.preview() command to read the rtsp video frame
so when you call the function client.preview() or client.read().save()
it will alert the thread fail message on terminal
in my solution to fix it,
i import "time" package and add the "time.sleep(1)" to wait the connection

import rtsp
import time

uri = f"rtsp://10.0.0.160:554/live.sdp"
with rtsp.Client(rtsp_server_uri=uri) as client:
    time.sleep(1)
    client.preview()

from rtsp.

iBelow avatar iBelow commented on July 19, 2024

Hello iBelow,
I doing my python flask project to capture the RTSP Camera have same problem
I think the problem is base on the client = rtsp.Client("rtspUrl") is not ready to connect rtsp server
then the check connection status command "client.isOpened()" is true
and the python code sequence execute the client.preview() command to read the rtsp video frame
so when you call the function client.preview() or client.read().save()
it will alert the thread fail message on terminal
in my solution to fix it,
i import "time" package and add the "time.sleep(1)" to wait the connection

import rtsp
import time

uri = f"rtsp://10.0.0.160:554/live.sdp"
with rtsp.Client(rtsp_server_uri=uri) as client:
    time.sleep(1)
    client.preview()

Thanx!

from rtsp.

garudaonekh avatar garudaonekh commented on July 19, 2024

Add time.sleep(1) does solve the above Assertion, but the gunicorn consumes too much CPU 90-100% and start spawning new PID:
gunicorn[32285]: [2021-07-06 22:47:08 +0700] [13893] [INFO] Booting worker with pid: 13893.

Any suggestion?

from rtsp.

Related Issues (20)

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.