seydx / camera.ui

NVR like user Interface for RTSP capable cameras
https://github.com/seydx/camera.ui
MIT License
669 stars 106 forks source link

error with 'Request failed with status code 500' #410

Open afi-dev opened 1 year ago

afi-dev commented 1 year ago

Describe the bug I add my camera with its rtsp stream and I get an error on the back-end informing me of a 500, unfortunately I don't know what it's due to as I don't even have the logs or the means to activate it in the configuration.

To Reproduce

  1. Add camera and set RSTP address look like this : image
  2. Go to Camera Dashboard

Expected behavior This bug occurs when you add your camera and access it from the camera table, impossible for me to view it live but strangely I've noticed that it's working in a certain way even though I don't have a view when you go to the settings and then to "Video analysis" you can still see a preview.

Logs The 500 error does not appear in the logs to my great disappointment, impossible for me to know precisely what the problem is.

Screenshots image

However, I'm sure it's not an error or a bad configuration, because I've got the overview working in spite of everything when you go to the camera's "Video analysis" settings: image

Environment

imthoe commented 6 months ago

In case anyone might have the same issue, this occurs because ffmpeg renamed the -stimeout option to -timeout.

In my case camera.ui displayed the error message Camera: Stream exited with error! (null) - Unrecognized option 'stimeout'. Error splitting the argument list: - Option not found in the console.

A simple workaround without changing the code is to add your camera like this: rtsp://admin:admin@192.168.0.5/StreamingPath?ignore=-stimeout.

You can see it checks if the string -stimeout is present in your input source and will not add is a parameter to ffmpeg, if it can find it. Most cameras should just ignore the extra parameter, which doesn't do anything.

https://github.com/seydx/camera.ui/blob/10aa9ac7f518d7fb040e83eb2e8c8dee66c04b6b/src/controller/camera/utils/camera.utils.js#L315

pstaubs commented 6 months ago

@imthoe your suggestion did not work for me.

I modified

[camera.ui/src/controller/camera/utils/camera.utils.js](https://github.com/seydx/camera.ui/blob/10aa9ac7f518d7fb040e83eb2e8c8dee66c04b6b/src/controller/camera/utils/camera.utils.js#L315)

inputSource = `-timeout ${videoConfig.stimeout * 10000000} ${inputSource}`;

And now it works.

BTW, Is this project dead? No, patches in the last two years.

imthoe commented 6 months ago

@pstaubs yeah I just wanted it to work for myself without having to modify the code. But thats perfectly fine too! As for the project being dead, seems like the author is busy and working on a new version, but I don't know.

https://github.com/seydx/homebridge-camera-ui/issues/855#issuecomment-1806223941

mkz212 commented 2 months ago

🎉 A new version of camera.ui

A new version of camera.ui is currently under active development. An initial alpha/beta release and previews are coming soon. Stay tuned for exciting updates: https://github.com/seydx/camera.ui/issues/448 .

This version will no longer be developed / fixed. The new version contains many novelties and fixes (most important is for HKSV recording).