Comments (9)
Most likely your ffmpeg parameters are wrong and it is exiting, you should log the output of ffmpeg, for example by using the -report
parameter, and take a look.
from ring.
Thanks for your input there. That helped me narrow down my issue and get everything working. I have been successful at getting my ring cameras to stream pretty much continuously to an rtsp server. I am able to view the streams through VLC so can confirm it all works. I do have a problem though, and I'm so new with this I'm not sure where to look...but I'm using frigate as an NVR and when I enter the same URL that i enter in VLC (that works) into a go2rtc config in frigate, I get nothing from it. It shows 0 links, 0 streams, and I'm not sure why.
This is what it shows under info:
I am not sure if I am supposed to be explicitly setting the codec for h264 or something? If so, I don't know how to do that, anyway.
I am using https://www.npmjs.com/package/rtsp-streaming-server for my rtsp server, btw
from ring.
I actually am already streaming in h264, so that isnt the issue. These are my output options
// RTSP_URL="rtsp://127.0.0.1"
// RTSP_SERVER_PORT=8554
// RTSP_CLIENT_PORT=554
// VIDEO_BITRATE="1536k"
// VIDEO_FRAMERATE=20
const streamUrl = `${process.env.RTSP_URL}:${process.env.RTSP_SERVER_PORT}/${toKebabCase(camera.name) ?? 'cam-' + camera.id}`;
camera.streamVideo({
output: [
'-f',
'rtsp',
'-c:v',
'libx264',
'-preset',
'ultrafast',
'-tune',
'zerolatency',
'-b',
`${process.env.VIDEO_BITRATE}`,
'-filter:v',
`fps=${process.env.VIDEO_FRAMERATE}`,
streamUrl,
],
})...
from ring.
You might want to check out ring-mqtt (my person project) which already does all of this, or Scrypted, which can do the same. In general, you will be sad with forever streaming with Ring cameras because Ring devices simply aren't desgined for this, they still record everything in the cloud, streams still go via the cloud and have to be restarted every 10 minutes (although this is mostly automatic), and you get no motion notifications or anything else from you device while streaming. Also, Ring devices aren't generally designed for this so many will overheat or otherwise become unstable after a few days of streaming. You are generally far better offer just purchasing a device designed for this use case.
Regardless, if you are a glutton for pain and want to down the same path that so many others before you have tried, feel free to keep going. However, as your questions are now about go2rtc and or other libraries and not this project, I'm going to close this issue here, but I will wish you luck in your endeavors.
from ring.
Also, I will mention you don't need to re-encode into H.264, you can just use copy mode, as Ring already streams in H.264, so that is mostly just wasting CPU.
from ring.
Thanks for the feedback. I enjoy the tinkering will continue to try to improve on it. I have a bunch of ring cameras since I replaced everything a few months ago and don't want to just sell them or throw them away. Thought it was worth a try. I've been able to get both a main and sub stream going from each camera to the rtsp server and feed that into go2rtc. It's super slow though when deploying it in an lxc, despite there not being hardly any CPU utilization. Wish I knew what that was happening. Thanks for your feedback though. Can you tell me what you mean by copy the h264 to save cpu? That might be helpful in my issue
from ring.
In your code above you are using -c:v libx264
which is telling ffmpeg to transcode the video stream to H.264, but the video from Ring cameras is already H.264 so this step is largely not required. Again, you can just look at projects like ring-mqtt which already do the same thing (ring-mqtt is designed to integrate with other tools via MQTT, but you don't have to use that part, you can just use the RTPS server which exposes each discovered cameras as a local RTSP camera). That project uses ffmpeg with just the -c:v copy
mode to copy the existing video stream vs transcoding it.
That being said, you are doing some filtering for some reasons that I might not understand, but Ring cameras are already fairly low bit-rate H.264 at 20 frames per second, I'd expect Frigate to deal with that easily.
I don't support users of NVR tools like Frigate using ring-mqtt not because it doesn't work, but because I don't want to spend my life answering questions about all the limitations all the time, nor do I want the project to become known for that capability since it would dramatically increase the chances of Ring shutting down these 3rd-party API projects completely as it costs them money to have Ring cameras out there streaming all the time and I'm sure their pricing model would not support that if it became a popular thing.
from ring.
awesome, thank you!. That actually seemed to help out a lot with the issue I was seeing. I was trying to create a "sub" stream though at a lower resolution and lower fps for the detection to run on, but it seems that both streams are now using the same fps and resolutions. I suspect that is related to the copy happening now on the -c:v flag. Is there a way to use copy but also change the resolution and fps, or is what I'm doing not really saving me any computing power? I'm just trying to follow the pattern that I use for my other cameras that typically have a lower quality stream to use for viewing, and a higher quality stream for recording, so that I can easily view them on the go over a cellular network
from ring.
It's not possible to change the resolution/bitrate without re-encoding, but I'm not sure how required it is. Ring cameras are already only 20 fps.
from ring.
Related Issues (20)
- Quick Responses Endpoints
- API no longer returning cameras or devices HOT 1
- Intercom - Ding event not available in ioBroker where I use your adapter HOT 1
- Ring Intercom - silence Ringtone when Delay Switch is triggered
- Ring panic buttons dont show up in Home
- Intercom: It is not possible to disable HomeKit notifications when doorbell rings HOT 4
- Plugin doesnโt respect Ring app settings for Live View HOT 1
- rpc command unlock_door for ring HOT 1
- ring plugin stopped working, cant lovin anymore HOT 3
- Live stream fails/times out, snapshots work HOT 3
- Error 500 in Ring API on Homebridge HOT 49
- No longer working (cannot arm and disarm) HOT 1
- Add Medical Alert Option for Ring Alarm Integration with Home Assistant HOT 1
- Invalid discord link HOT 2
- Add ability to view camera activity in recent events HOT 1
- Ring Intercom - Possibility do make it a switch / button instead of a lock HOT 1
- No Accessories installing HOT 1
- Homebridge-Ring logs don't show up in Homebridge UI (Homebridge-Config-UI-X) HOT 1
- Add support for water valves HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring.