Following the setup of a Cent OS CCTV server, I’ve been using Raspberry Pi’s as video sources. But what if there was a Raspberry Pi in perfect situ for a CCTV camera, but was already in use as a media player?
A Linux system has always had the impression that it is
versatile, so this should be an achievable task. A barrier would be how to get
this done with the operating system installed, in this case it is LibreElec, an
OS with the tagline “Just enough OS for Kodi”. Therefore, it would be more of a
challenge than a usual Debian install.
The team at LibreElec saw this type of thing coming, and included the Docker service as a Kodi addon to allow the curious tinkerer to add more than Kodi to a Pi.
If you have the LibreElec based Pi in the opportune
placement to add a camera, here is how to add Mjpeg streaming capabilities…
For years, since it was XBMC on the original Pi I have been using OSMC as my Raspberry Pi media player. And following on from a whole home Pi redeployment for to include a CCTV system the latest installment was to install OSMC to two Raspberry Pi 3A+.
Raspberry Pi 3A+
The Pi 3A+ plus is the cut down little brother to the latest
3B+ much akin to the original Pi B and A models. Both have the same quad-core ARM
v8 processor, Broadcom Videocore-IV GPU and importantly the 2.4GHz and 5GHz
802.11b/g/n/ac Wi-Fi module for faster and stable WIFI out of the box. What’s cut
down is the RAM, halved at 512MB, USB ports are reduced to one due to the removal
of the onboard USB and gone is the ethernet port.
All the power without the ports make its perfect as a media player,
all that’s needed to connect is the HDMI, with remote control provided via a CEC
equipped TV.
The issue with OSMC
Here are the issues I experienced with OSMC on the Pi3A+,
this is in no way a snarl at the developers who are doing an amazing job. I
believe the 3 A+ is still a new and niche model so it’s understandable that development
is slow for this product. I’m just hoping this will eventually be looked into and
resolved, and putting it out there in case others have the same issue. Performance
on the 3B+ is still exceptional.
From boot, selecting a 720p file (via Samba and h264 encoding)
is fine, with subsequent auto-play files playing with no issues. However, with the
next selection the issues start, selecting a file loads it but doesn’t play, having
to go to the main menu and selecting Full-Screen to play the file. But then it buffers
constantly. On the third play this workaround fails, and selecting Full-Screen results
in a black screen.
In addition, even from boot any 1080p content fails to play with
a black screen in its place, and playing h265 encoded files results in an
immediate system crash.
480p content remains unaffected and plays perfectly.
LibreELEC to the rescue
Without resorting to buying a 3 B+, your media experience can still be made on 3 A+ by using LibreELEC, an alternative to OSMC that has the same goal of getting Kodi on the Raspberry Pi.