GithubHelp home page GithubHelp logo

Comments (7)

stephendade avatar stephendade commented on June 1, 2024

Are you using a USB video device?

The Pi is having to compress the video stream from RAW to H264 in realtime, which does take a lot of CPU. So 170% is expected.

If you're having power issues, find a better power supply. Some power supplies are unable to cope with the Pi at higher cpu usages.

Otherwise, check if your video device can support H264 output, so the Pi doesn't have to compress the video. Or go with a lower resolution.

from rpanion-server.

TyphoonWu avatar TyphoonWu commented on June 1, 2024

Are you using a USB video device?

The Pi is having to compress the video stream from RAW to H264 in realtime, which does take a lot of CPU. So 170% is expected.

If you're having power issues, find a better power supply. Some power supplies are unable to cope with the Pi at higher cpu usages.

Otherwise, check if your video device can support H264 output, so the Pi doesn't have to compress the video. Or go with a lower resolution.

Yes, USB camera format: x-raw.
PI3B+ power 5V 2.5A, it enough.
go with a lower resolution: python3 Rpanion-server/python/rtsp-server.py --fps 5 --bitrate 200, CPU usage reduce to 30%, but poor video effect.

from rpanion-server.

TyphoonWu avatar TyphoonWu commented on June 1, 2024

How to fix this issue?
//Preview the rtsp source for a moment, get stability issue,
2021-10-27 16:15:14 error [server/videostream.js]: startStopStreaming() err 0:03:53.261453927 1893 0x23dfef0 WARN v4l2bufferpool gstv4l2bufferpool.c:1040:gst_v4l2_buffer_pool_poll: error: poll error 1: Resource temporarily unavailable (11)

2021-10-27 16:15:14 error [server/videostream.js]: startStopStreaming() err 0:03:53.261912519 1893 0x23dfef0 WARN v4l2src gstv4l2src.c:998:gst_v4l2src_create: error: Failed to allocate a buffer
0:03:53.262011477 1893 0x23df2c0 WARN rtspmedia rtsp-media.c:2722:default_handle_message: 0x751461b0: got error Could not read from resource. (gstv4l2bufferpool.c(1040): gst_v4l2_buffer_pool_poll (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0:
poll error 1: Resource temporarily unavailable (11))
0:03:53.262109497 1893 0x23dfef0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: Internal data stream error.
0:03:53.262156945 1893 0x23dfef0 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop: error: streaming stopped, reason error (-5)
0:03:53.262199913 1893 0x23df2c0 WARN rtspmedia rtsp-media.c:2722:default_handle_message: 0x751461b0: got error Failed to allocate a buffer (gstv4l2src.c(998): gst_v4l2src_create (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0)
0:03:53.262386840 1893 0x23df2c0 WARN rtspmedia rtsp-media.c:2722:default_handle_message: 0x751461b0: got error Internal data stream error. (gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5))

//Need to kill the proess, and plug out/in usb camera to let it work again.
pi@rpanion:~ $ ps -Af|grep rtsp
pi 1893 519 6 16:11 ? 00:01:04 python3 ./python/rtsp-server.py --video=/dev/video0 --height=480 --width=640 --format=video/x-raw --bitrate=200 --rotation=0 --fps=5 --udp=0

from rpanion-server.

stephendade avatar stephendade commented on June 1, 2024

What camera model are you using?

Open a terminal in the Rpanion-server folder and run ./python/gstcaps.py, then post the output here. This will tell us the capabilitites of the camera

from rpanion-server.

TyphoonWu avatar TyphoonWu commented on June 1, 2024

What camera model are you using?

Open a terminal in the Rpanion-server folder and run ./python/gstcaps.py, then post the output here. This will tell us the capabilitites of the camera

Hi Stephendade
I got it:
pi@rpanion:~ $ python3 Rpanion-server/python/gstcaps.py
Rpanion-server/python/gstcaps.py:78: DeprecationWarning: GObject.ValueArray.get_nth is deprecated
fp = str(framerates.get_nth(i)).split('/')
[{"value": "/dev/video0", "label": "HD camera : HD camera ", "caps": [{"value": "640x480", "label": "640x480 (x-raw)", "height": 480, "width": 640, "format": "video/x-raw", "fpsmax": 0, "fps": [{"value": "30.0", "label": "30.0 fps"}, {"value": "5.0", "label": "5.0 fps"}]}, {"value": "320x240", "label": "320x240 (x-raw)", "height": 240, "width": 320, "format": "video/x-raw", "fpsmax": 0, "fps": [{"value": "15.0", "label": "15.0 fps"}, {"value": "5.0", "label": "5.0 fps"}]}]}]

from rpanion-server.

stephendade avatar stephendade commented on June 1, 2024

Ok, try running the camera at a lower resolution (320x240) and see if it's more reliable.

Keep the bitrate to at least 1000, to make it easier for the Pi to compress the video

from rpanion-server.

TyphoonWu avatar TyphoonWu commented on June 1, 2024

Ok, try running the camera at a lower resolution (320x240) and see if it's more reliable.

Keep the bitrate to at least 1000, to make it easier for the Pi to compress the video

OK, Thanks for your suggestions, I have to use the camera support H264

from rpanion-server.

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.