Motioneye pi4b ubuntu 20.04.1 lts

507 views
Skip to first unread message

Edward Barker

unread,
Oct 21, 2020, 8:56:22 AM10/21/20
to motioneye
Hi,

I was hoping to connect an ip cameras to motioneye running under ubuntu 20.04.1lts on a Pi4b and have followed the instructions under https://github.com/ccrisan/motioneye/wiki/Install-On-Ubuntu

At apt-get install python-pip python-dev curl, python-pip is not available to install, nor is python2-pip.

I reluctantly installed python3-pip but using that to install motioneye produces many python errors.

Is there currently a path anyone has successfully followed to install motioneye on arm ubuntu 20.04?

Kevin Shumaker

unread,
Oct 21, 2020, 9:21:55 AM10/21/20
to Edward Barker, motioneye

--
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/139d7ed2-d877-4b50-8e9a-9d479decf77en%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?

Edward Barker

unread,
Oct 21, 2020, 6:03:21 PM10/21/20
to motioneye

Yes, I have now checked all that and the default python is 2.7x.

The problem remains that python-pip is not available to install with sudo apt install python-pip and gives error:-

E: Unable to locate package python-pip

Thence pip install motioneye can`t find pip and pip3 understandably just throws errors.

The pi4 has other things (just an sftp server and rclone) on it but had no other python or pip programs before this. Indeed it was wiped and reinstalled afew months ago after my last attempt to run motioneye under ubuntu on it.

Edward

Kevin Shumaker

unread,
Oct 21, 2020, 6:16:06 PM10/21/20
to Edward Barker, motioneye
Building a Pi4-4GB Ubuntu 20.04 Server LTS. Will report.

Edward Barker

unread,
Oct 21, 2020, 6:20:54 PM10/21/20
to motioneye

That is dedication, though I will say my pi4b (4gb) makes a really great ubuntu server.

Kevin Shumaker

unread,
Oct 21, 2020, 6:24:26 PM10/21/20
to Edward Barker, motioneye
I do tech support for a living. One of my advantages here is I can re-create most environments and either confirm issues, or show how to work around them.
I'm in the process of helping CCrisan with documentation.


Kevin Shumaker

unread,
Oct 21, 2020, 6:26:31 PM10/21/20
to Edward Barker, motioneye
BTW, sux that Canonical can't get the USB or NetBoot to work with their image. I hate burning mSDCards for these things...

Edward Barker

unread,
Oct 21, 2020, 6:33:06 PM10/21/20
to motioneye

Yup.

Kevin Shumaker

unread,
Oct 21, 2020, 7:18:03 PM10/21/20
to Edward Barker, motioneye
Part 1: (after imaging)
sudo apt update && sudo apt upgrade -y
sudo apt install ssh
sudo reboot (kernel and firmwares updated)

Part 2:
connect via ssh
sudo add-apt-repository universe
sudo apt update 
sudo apt install python2
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py sudo python2 get-pip.py


Part 3: (I'll need to update these instructions, too much of Python2.7 is not in 
the upstream repositories any more, especially for the ARM-Ubuntu...)
sudo su
add-apt-repository -y ppa:kirillshkrogalev/ffmpeg-next apt-get update apt install -y libffi-dev apt-get install libzbar-dev libzbar0 apt-get install motion ffmpeg v4l-utils apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev
apt-get install python-pil pip2 install motioneye
mkdir -p /etc/motioneye cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf systemctl daemon-reload systemctl enable motioneye systemctl start motioneye If you get any errors, let me know, I had to add a BUNCH of extras to get it to work...




Edward Barker

unread,
Oct 22, 2020, 2:12:09 AM10/22/20
to motioneye
That is really helpful. Mostly I was missing the last 2 lines of part 2 I think. I got a warning adding the ffmpeg repo but didn`t bother because ffmpeg was already installed and working hard (forgot I had added that). Otherwise the only issue was the instructions above do not create directories for config and media or create the unit file but that is all in the original set of instructions. Install worked fine.

I have an issue because I also forgot I had installed nginx and I think that although now removed snarled the motioneye web server settings and I'm not sure the ubuntu is defaulting to python2.7 at reboot so I will review the logs later and consider a clean sd card install again. I think I can remember how to mount the disk drive.

Main thing is I know the install can be done. Legacy py2 stuff installed with pip has caused me no end of trouble on centos too.
Many, many thanks. I had been avoiding this for ages but it got me back to it.

Ed.

Kevin Shumaker

unread,
Oct 22, 2020, 8:43:53 AM10/22/20
to Edward Barker, motioneye
Glad to help. Hopefully, @CCRISAN will consider either re-write the motionEye to use Python3, or drop support for it by January, as it will no longer be available without jumping through some major hoops.:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.

Kevin Shumaker

unread,
Oct 22, 2020, 9:52:11 PM10/22/20
to Edward Barker, motioneye
OK, just tested with 32 bit Ubuntu Server 20.04 LTS, and 64 bit Ubuntu 20.10.
Both worked with the same instructions:

Part 1: (after imaging)
sudo apt update && sudo apt upgrade -y
sudo apt install ssh curl
sudo reboot


Part 2:
connect via ssh
sudo apt update
sudo apt install python2
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py

Part 3: (I'll need to update these instructions, too much of Python2.7 is not in
     the upstream repositories any more, especially for the ARM-Ubuntu...)


sudo su
apt install -y libffi-dev libzbar-dev libzbar0
apt-get install motion ffmpeg v4l-utils
apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev
apt-get install python-pil
pip2 install motioneye
mkdir -p /etc/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
mkdir -p /var/lib/motioneye
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service

systemctl daemon-reload
systemctl enable motioneye
systemctl start motioneye

Now you should be able to connect to http://<ip_address>:8765 from another computer on the same network, or if using Desktop Ubuntu in FireFox http://localhost:8765

Edward Barker

unread,
Oct 23, 2020, 6:56:27 AM10/23/20
to motioneye
Those are now really good instructions. It is handy to note the port at the end like that. It took me ages to figure out what it was. No issues to get the pi4b finished working with motioneye, in spite of my concerns about nginx and persistence of the Py2 setting (no reflash of sd card). Many thanks. Later to start figuring out how to connect this camera intended for V380 - that could take a long time...  

Michael Cooper

unread,
Jun 3, 2022, 8:02:52 AM6/3/22
to motioneye
I use motioneye on Docker as a container with a NAS to save the videos and photos to.

If you want to learn how to do it, I can send you my docker-compose file but you would have to confgure your own shared storage.

Thanks guys.

StarbaseSSD

unread,
Jun 6, 2022, 11:18:39 PM6/6/22
to motioneye
@nexus, there is a very good (if I do say so myself) description of how to create a Docker Image (actually 3 ways) at https://github.com/motioneye-project/motioneye/wiki/Install-In-Docker.If I were still maintaining the documentation (new Devs are trying to go a different way, I think) I would have been happy to look at your method and add as a 4th option, if different. 
Reply all
Reply to author
Forward
0 new messages