motioneyeos icon indicating copy to clipboard operation
motioneyeos copied to clipboard

Network camera shows green/grey screen when adding to a MotioneyeOS hub

Open sts-ryan-holton opened this issue 4 years ago • 14 comments

Preliminary Docs

I confirm that I have read the CONTRIBUTING guide before opening this issue.

I confirm that I have read the FAQ before opening this issue.

motionEyeOS Version

  • dev20201026

Board Model

  • Raspberry PI 4B 4GB

Camera

  • I'm using a USB webcam, from the brand Benewy, this one

Network Connection

  • Wi-Fi

Peripherals

  • Just a USB camera

Log Files

I consider the following log files relevant to this issue:

boot.log dmesg).log messages.log motion.log motioneye.log

Problem

I'm trying to link the video streaming feed from my Raspberry Pi 4 (with USB webcam) to my central Raspberry Pi 4 hub (which currently already has a Pi Zero with the Pi Cam fed into this hub, which will soon be replaced) but when I try to add a network camera, the feed is either shown as green or grey.

My streaming URL from my Pi 4 with the webcam is: http://192.168.1.147:8081 and when adding this as a network camera to my hub, I'm not seeing any feed of the video.

If I choose a Simple MJPEG Camera as the option for adding a camera then the feed is visible, but I loose the option to record.

Here's what the configuration looks like when I add my camera:

network-camera

When I do this, my existing Pi Zero feed breaks (Camera1), but more importantly, I get a green screen for the network camera (Pi 4 with USB camera feed) that I try to add, why?

hub

What am I missing?

sts-ryan-holton avatar Jul 23 '21 18:07 sts-ryan-holton

Username and or password? Even if username is admin or user, and the password is blank, you still need them there.

starbasessd avatar Jul 23 '21 19:07 starbasessd

Okay so I set a password and username for the Surveillance credentials on my Pi4 with webcam, for the purposes of this issue, I set it to user and password. I then plugged the following data into the Network Camera option on my Pi4 hub and added the camera, initially it was a green screen, and after about 20 seconds turned grey and displays:

Connection to camera lost

I can still access the feed of my camera on it's IP with the port http://192.168.1.147:8081/

network-cam-with-creds

sts-ryan-holton avatar Jul 24 '21 10:07 sts-ryan-holton

There was no need to set a password. Does the URL work for a web browser? Or VLC? Can you ping the IP address? I know you said you were able to get a Simple MJPeg stream to work, but something doesn't add up.

starbasessd avatar Jul 24 '21 10:07 starbasessd

I can ping the IP address, the URL does work fine in a web browser and I can view the video stream in VLC media player when I click on Add Network Stream and enter: http://192.168.1.147:8081/

sts-ryan-holton avatar Jul 24 '21 10:07 sts-ryan-holton

On the Pi with the camera: note the resolution set in Video Device. On the Pi you are trying to add the Network Camera, in Video Device, be sure to use the same resolution.

starbasessd avatar Jul 24 '21 11:07 starbasessd

On the Pi I'm trying to add the camera to, there's no resolution option in the Video Device settings, here's a comparison:

Pi with Camera

video-device-webcam

Pi used as Hub (where I'm trying to add camera)

video-device-hub

Do you think I need the palette option on the hub for that particular camera as well?

sts-ryan-holton avatar Jul 24 '21 11:07 sts-ryan-holton

You have me at a total loss. I'll leave it here to see if anyone else can assist.

starbasessd avatar Jul 24 '21 11:07 starbasessd

Hopefully someone else will be able to contribute to this soon since this is quite a major thing

sts-ryan-holton avatar Jul 24 '21 20:07 sts-ryan-holton

@starbasessd Today I tried adding my Pi 4 with webcam to my pi hub as a Remote MotioneyeOS Camera, on port 80. this adds to the hub almost instantly and shows the stream, much like the MJPEG option, however, it appears that the option I need is the Network Camera since I can't update the config independently of the camera on my hub when added via the Remote MotioneyeOS Camera type (it simply just seems to fetch the config remotely), and also, the MJPEG option doesn't give me any recording options.

I need the Network Camera type, but each time I add this I get the green screen, followed by a grey screen with the message "Unable to open video device".

I did try removing one of the cameras from my hub, but has to painstakingly add the config for this camera back after realising that there's no difference with just one cam

sts-ryan-holton avatar Jul 25 '21 17:07 sts-ryan-holton

Any update on this?

sts-ryan-holton avatar Aug 22 '21 12:08 sts-ryan-holton

If you add the Pi4 WebCam As Network, URL: rtsp://ip_address:554 Username admin password (blank or whatever you set it to) try both RTSP/TCP or RTSP/UDP for camera What results do you get?

starbasessd avatar Aug 22 '21 12:08 starbasessd

Any resolution on this? I am having a similar issue. using a RPI-4 with USB camera and a RPI0w with IR camera on the board. I've tried both directions of link to no avail, always getting a grey screen from the networked camera

gabrielconlon avatar Oct 22 '21 02:10 gabrielconlon

bingo!

instead of http://... try: mjpeg://{yourip}:{port}

i entered the userid per starbasessd

solved my same issue as reported above.

had to read the fm https://motion-project.github.io/4.1/motion_guide.html#netcam_url

MitchDresdner avatar Nov 14 '21 00:11 MitchDresdner

bingo!

instead of http://... try: mjpeg://{yourip}:{port}

Its a little late bit late, but i can confirm, that fixes the green image problem! I can reproduce this procedere on multiple devices. Every device works now. @starbasessd can you mark @MitchDresdner's Answer please?

lukasdoerr avatar Mar 21 '22 20:03 lukasdoerr