motioneye-project / motioneye

A web frontend for the motion daemon.
GNU General Public License v3.0
3.93k stars 652 forks source link

No image #2331

Closed fxtv1060 closed 2 years ago

fxtv1060 commented 2 years ago

I have got two Eufy 2 cameras connected thru rtsp to ME. Here is the screen I get via the brower:

image

Most probably I did not configure ME the right way. Help!

François-Xavier

starbasessd commented 2 years ago

I can't read the message in the top left of the 2 views, what does it say?

fxtv1060 commented 2 years ago

It says: Unable to open video device since 2022-03-11.

fx

starbasessd commented 2 years ago

what happens when you reboot it?

fxtv1060 commented 2 years ago

Nothing. Unfortunately.

fx

starbasessd commented 2 years ago

I'm going to leave this here, maybe one of the new developers can help, if they know Armbian.

fxtv1060 commented 2 years ago

The camera are not streaming continuously. They are shooting only in case of an "event". But even is these cases, nothing is recorded through ME.

starbasessd commented 2 years ago

One other option, though I can suggest: delete the cameras, then re-add them, but in the bottom Camera box, select RTSP/UDP instead of RTSP/TCP

fxtv1060 commented 2 years ago

It has been working a few seconds (30) and then it has stopped... Is there a log somewhere??!

fx

fxtv1060 commented 2 years ago

Now there is a reddish frame around the grey picture...

image

fx

starbasessd commented 2 years ago

See if the camera has any kind of sleep mode turned on: https://support.eufylife.com/s/article/Security-Modes-in-eufySecurity-App

MichaIng commented 2 years ago

Armbian is basically Debian, just with a custom, mostly mainline kernel to run on ARM SBCs. I'll try to find a public RTSP stream to generally test it. To narrow it down to whether the motionEye or its host is the issue, or the camera/RTSP stream itself, could you test it elsewhere, e.g. via VLC? https://support.ipconfigure.com/hc/en-us/articles/115005588503-Using-VLC-to-test-camera-stream

fxtv1060 commented 2 years ago

SOmetime is works sometime not...

image

MichaIng commented 2 years ago

Something I recognised is that the browser energy savings (automatically setting "unused" tabs to sleep and such) and pause the stream. I use Opera with energy savings enabled, and when switching tabs back and forth, the camera image is at first missing and then reappears after 1-3 seconds, like if the RTSP stream was stopped and re-established, which somehow even makes sense.

Please test in VLC player whether the stream is reliable and stable there. Probably we can tell the browser via modern browser APIs to keep the stream or tab active 🤔.

And of course, checking logs is always a good idea:

journalctl -u motioneye
fxtv1060 commented 2 years ago

Many thanks. I will try what you suggest affer the kids' dinner... fx

MichaIng commented 2 years ago

I was able to replicate. Added a public RTSP camera stream, and at first image was grey. Played a bit with settings without any effect. Then checked the logs:

Mar 11 18:55:34 VM-Buster motion[3878]: [2:ml2:Camera2] [WRN] [ALL] motion_init: Could not fetch initial image from camera
Mar 11 18:55:34 VM-Buster motion[3878]: [2:ml2:Camera2] [WRN] [ALL] motion_init: Motion continues using width and height from config file(s)
Mar 11 18:55:40 VM-Buster motion[3878]: [2:ml2:Camera2] [WRN] [ALL] mlp_retry: Retrying until successful connection with camera
Mar 11 18:55:40 VM-Buster motion[3878]: [2:ml2:Camera2] [ERR] [NET] netcam_rtsp_open_context: Normal resolution: Unable to open camera(Camera2): Server returned 5XX Server Error reply
Mar 11 18:55:40 VM-Buster motion[3878]: [2:ml2:Camera2] [ERR] [VID] vid_start: Netcam RTSP failed to open

Switched back to the browser, suddenly the picture was green for some seconds, then the image was there. I'll leave it running for a while, probably it somehow takes.

With motion v4.3 one shouldn't face any errors, i.e. on Debian Bullseye or when pulling related older releases from motion GitHub repo.

fxtv1060 commented 2 years ago

Many thanks for your help.

What does this mean: "With motion v4.3 one shouldn't face any errors, i.e. on Debian Bullseye or when pulling related older releases from motion GitHub repo" ?

fx

MichaIng commented 2 years ago

What does this mean: "With motion v4.3 one shouldn't face any errors, i.e. on Debian Bullseye or when pulling related older releases from motion GitHub repo" ?

Ah sorry, I forgot to remove that when shifting the find to a new issue: #2333 However, just to rule it out, you could try to use motion v4.3 which is best supported by motionEye currently, regarding the default motion configs it applies.

I had the RSTP stream running here for a while, shutdown the machine over night, now booted and check back again, and the stream usually works fine. Indeed sometimes on first motionEye UI access I saw it grey (inaccessible) or green (some intermediate state, I guess) for a short while, but it fixed itself quickly, so seems to be due to an intermediate network issue or timeout when motionEye tries to connect the first time.