rtsp streams - cannot get motioneye to read rtsp stream

918 views
Skip to first unread message

Matt Park

unread,
Oct 10, 2020, 1:43:06 PM10/10/20
to motioneye
How to setup motioneye to receive a rtsp stream?

I have motioneyeos on raspberry Pi Zerp streaming with and without fast network camera on.  It works with http stream but not rtsp stream.

I have motioneye running on a linux VM. Motioneye can see the Pi camera as a network camera streaming at 192.168.1.XYX:8081 - but the frame rate is slow: 2 fps.

I can use VLC on a different machine and verify the Pi Zero is streaming at 10 to 15 fps on rtsp://<ip address>:554/h264.

I cannot get motioneye (linux VM) to display the rtsp stream.

I read about UDP versus TCP on motion, but I'm not sure where to make the changes, motion.conf or someplace else?

Matt

Kevin Shumaker

unread,
Oct 10, 2020, 1:51:59 PM10/10/20
to Matt Park, motioneye
Which Linux OS on the VM?
What version of Motion & MotionEye on the VM


--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motioneye+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motioneye/73ec5e62-67fc-4406-8527-08ea137e2effn%40googlegroups.com.


--
Thanks

Kevin Shumaker


N38° 19' 56.52"
W85° 45' 8.56"

Semper Gumby
“Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
Ethics are what we do when no one else is looking.
Quis custodiet ipsos custodes?
“There is no end to the good you can do if you don’t care who gets the credit.” - C Powell
You know we're sitting on four million pounds of fuel, one nuclear weapon and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it?

Kevin Shumaker

unread,
Oct 10, 2020, 1:52:58 PM10/10/20
to Matt Park, motioneye
How was Motion & MotionEye installed on the VM?
Are you running it in HomeAssistant or other Primary app, or is it a clean install?

Matt Park

unread,
Oct 10, 2020, 4:20:07 PM10/10/20
to motioneye
Hmm, not sure if my other replies made it here or not. 

Update:
I have the rtsp streaming working from Raspberry Pi Zero running motioneyeos latest dev build and streaming rtsp to motioneye (latest docker image) with the highest frame rate I've achieved so far > 20 fps. The recorded videos are also showing 17 fps which is almost 10X faster than with the http stream of 2 fps.

Since I am running motioneye in a docker image (which was a very easy to get working), I needed to forward the rtsp port 554 to the docker container.

Several things that seemed to make it work:
  1. Added port 554 forwarding in the docker image command line: -p 554:554 (recommend this get added to the motioneye docker instructions in github wiki)
  2. Added the full url to the network camera field in motioneye add camera: rtsp://<ip address>:554/h264 (previously I am not sure if I included the /h264)
  3. Added username and password (even though this is not needed for VLC to see the stream)
  4. Motioneye then seemed to recognize the rtsp stream and gave me the option for RTSP/TPC or RTSP/UDP (I think I picked UDP based on other posts I read)
  5. Tweaked the camera parameters in motioneye for streaming rate and resolution as they did not match the motioneyeos camera settings
  6. Motioneye started showing the camera images (woot woot) and is recording video files at 1280x720 at 17 fps (although there is some skipping, I will probably lower fps a bit, my goal is ~10 fps)

Matt

Kevin Shumaker

unread,
Oct 12, 2020, 8:00:43 AM10/12/20
to Matt Park, motioneye
Using 20200606 on Pi4 (Hub)
Using dev20201011 on PiZero (testing this morning)
PiZeroW w/PiCam V1.3(CSI):
Set Fast Network Camera = ON in Expert Settings
(rebooted)
Set Streaming Protocol to "RTSP"
Set RTSP Video Resolution to 1024x768
Set New Camera on Pi4 to Network Camera, rtsp:<ipaddress>:554/h264, admin and blank password, tcp NOT udp.
Works great.
Will be testing dev20201011 later on Pi4 for recording artifacts.



Matt Park

unread,
Oct 13, 2020, 1:05:39 PM10/13/20
to motioneye
I have not been able to get TCP to work. 

Using the latest dev builds for motioneyeos (20201012 0.42.1) (Pi Zero streaming rtsp video with fast network camera ON) and motioneye docker (dev-amd64) 0.42.1 I can only get the rtsp feed to show in motioneye using UDP. All the identical camera settings with TCP fail.

The master-amd64 docker image (0.42) had similar experience.

This is curious because the docker port mapping  -p 8765:8765 and -p 554:554  seems to map the TCP ports and not the UDP ports (according to the docker networking page). Which would make me think that TCP would work.

I restarted the docker container with -p 554:554/tcp and  -p 554:554/udp and get the same UDP works and TCP does not.

Kevin Shumaker

unread,
Oct 13, 2020, 1:57:44 PM10/13/20
to Matt Park, motioneye
Created a Ubuntu 20.04 Server VM, fully updated.
Installed docker.io  [sudo apt install docker.io]
ran command
docker run --name="motioneye" \
    -p 8765:8765 \
    --hostname="motioneye" \
    -v /etc/localtime:/etc/localtime:ro \
    -v /etc/motioneye:/etc/motioneye \
    -v /var/lib/motioneye:/var/lib/motioneye \
    --restart="always" \
    --detach=true \
    ccrisan/motioneye:master-amd64
Opened a FireFox browser on a Win10 PC.
Connected to http://<ipaddress>:8765 (username=admin, password blank)
Click on Settings
Click on camera box, Add Camera.
Camera Type: Network Camera
URL: rtsp://<ipaddress of pizeroW>:554/h264
username: admin, password blank
Camera: rtsp/tcp camera
<OK>
Loaded correctly.
No other changes.




Reply all
Reply to author
Forward
0 new messages