OSMC – James Batchelor https://james-batchelor.com Useful I.T & VoIP Ramblings Tue, 06 Aug 2019 18:07:01 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://james-batchelor.com/wp-content/uploads/2025/05/cropped-cropped-logo-jb-202505-32x32.png OSMC – James Batchelor https://james-batchelor.com 32 32 OSMC on Pi 3A+ Problems – Switch to LibreELEC https://james-batchelor.com/index.php/2019/05/22/osmc-on-pi-3a-problems-switch-to-libreelec/ https://james-batchelor.com/index.php/2019/05/22/osmc-on-pi-3a-problems-switch-to-libreelec/#comments Wed, 22 May 2019 19:08:49 +0000 http://james-batchelor.com/?p=591 Continue reading "OSMC on Pi 3A+ Problems – Switch to LibreELEC"]]> 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+

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.

This distro gives the exact same experience, assuming you use the Kodi default Confluence skin and not the custom default on OSMC.

Installation is just as easy with installer package available on Windows, however its not as refined as the OSMC equivalent, first there is no option to pre-configure the wireless settings needed on the Pi A models, but is included in the setup wizard when booting up on your TV.

Second, and the point if this post, the Windows installer as problems overwriting SD cards with an existing file system, and gives a write error before the program hangs.

To overcome this, the SD card needs to be purged of its previous partitions:

In a File Explorer window, right click This PC and click Management

In Computer Management, click on Disk Manager

Identify the SD card in the lower graphic, the best way to achieve this is to match the drive capacity of the SD card, in this case it is the 8GB drive.

Right click every allocated partition, identified by the upper blue band, and click delete volume.

When complete, the drive will look like this.

From here, re-run the installer and choose the drive that matches the SD card capacity, the installer should now write to the card with no issues.

LibreELEC in action

If you are moving from Pi 2/3 B model to a 3A+ then it’s business as normal, 1080p h264 files, and up to 720p h265 files play without issues. Although those hoping for 1080p h265 encoded playback will be eternally disappointed given that this exceeds the Pi’s hardware capability.

One curious note for a UK resident, there is no regional setting for the United Kingdom, so have to resort in using an Isle of Man profile to get the correct time, and manually setting the region variables.

]]>
https://james-batchelor.com/index.php/2019/05/22/osmc-on-pi-3a-problems-switch-to-libreelec/feed/ 1
Adding Kodi Sources Manually https://james-batchelor.com/index.php/2016/04/05/adding-kodi-sources-manually/ Tue, 05 Apr 2016 14:38:00 +0000 http://james-batchelor.com/?p=387 Continue reading "Adding Kodi Sources Manually"]]> During my migration from Windows Server 2003 to Server 2012, I encountered an issue with Kodi on Raspberry Pi and how it connects to the Win 2012 file share. When accessing the server with a Samba file share instead of a prompt for credentials the error message “Operation not permitted” is displayed.

Kodi Operation Not Permitted

Kodi allows the manual adding of network locations but does not support adding the credentials that are needed to access the location.

Therefore a bit of tweaking is needed to get access to Windows 2012 shares on Kodi.

The settings files for Kodi differ dependant on the system it is running, so its worth visiting the page to make sure the right files are edited, for example the files on a Raspbmc / OSMC installation on a Raspberry Pi is home/.kodi/userdata. Connect to the command console for the Pi using the default credentials (Raspbmc: pi/raspberry. OSMC: osmc/osmc) and navigate to the Userdata folder.

From here, first open the sources.xml file, and add the new share, using the previous share a guide of the code syntax.

sources.xml file
sources.xml file

Next, opening the passwords.xml file and add the credentials for the new share in a similar way.

Restart Kodi and try accessing the share to see if it works. This method works on both OSMC for Pi and Android installations of Kodi.

]]>
OSMC on Pi with PPTP VPN https://james-batchelor.com/index.php/2016/02/04/osmc-on-pi-with-pptp-vpn/ Thu, 04 Feb 2016 17:17:24 +0000 http://james-batchelor.com/?p=357 Continue reading "OSMC on Pi with PPTP VPN"]]> The arrival of the Raspberry Pi 2 meant the B+ previously used as a server was now ready for a new purpose. These little machines make great media players and is easy to setup so this would be its new role.

However, this Pi would be in my parents’ home, and miles away from where my videos are stored. I didn’t want to add a hard drive locally as syncing the library would be an issue. But thanks to the fibre internet connection on the server side I could upload at 10Mbps, enough to stream media across the net.

Therefore, the plan is to use an install of OSMC and add a VPN connection to my home server that starts when the Pi starts to make the operation seamless.

How To:

Start with a running Pi with OSMC on. Log in to the Pi via SSH using osmc for the username and password.

When logged in, perform “sudo apt get update” and “sudo apt get upgrade” to ensure the latest software is installed, then install the PPTP client by running “sudo apt get install pptp-client”

With the PPTP client installed a connection file is needed, however the folder it needs to be in requires elevated privileges to access. So type “sudo bash” to gain administrator control.

Then navigate to the folder with cd /etc/ppp/peers

Open a new text file using “nano connectname” where connectname is the name of the new file.

Enter the following connection settings:

pty “pptp REMOTESERVER –nolaunchpppd –debug”
name USERNAME
password PASSWORD
remotename PPTP
require-mppe-128
require-mschap-v2
refuse-eap
refuse-pap
refuse-chap
refuse-mschap
noauth
debug
persist
maxfail 0
defaultroute
replacedefaultroute
usepeerdns

Where REMOTESERVER, USERNAME and PASSWORD are the address and credentials use to connect to the VPN.

Type Ctrl + O to save and Ctrl + X to exit the text editor.

The VPN connection can be tested by entering pon connectname, have a look on the server to see if a connection is established or typing ifconfig in the terminal and look for a ppp0 adaptor. If it fails, use poff connectname to disconnect then edit the config file.

With a successful connection made, next up is to make the connection start with the Pi, navigate to the home directory using cd /home/osmc

Create a script, by creating a text file with nano connect.sh

In the new file, enter the following:

#!/bin/bash
sudo pon hartland

Ctrl + O to save and Ctrl + X to exit

Make the file an executable using chmod +x connect.sh

With the script created and executable, edit the start-up file that will run the script when the Pi boots, open it by using nano /etc/rc.local, as this is editing an established file the following screen should appear:

rc.local before

After the lines starting with # and before exit 0, add the following line:

(sleep 20;sudo /home/osmc/connectvpn.sh)&

So the file looks like the following:

rc.local after

Ctrl + O to save, Ctrl + X to exit and it is set up. The Pi is now setup to connect to the VPN at boot, test by rebooting the Pi and monitoring the server to see if a connection is made.

Tweaking

During this setup an issue arose where a VPN was made, but upon any attempt to access files the connection would drop, and looking at ifconfig on the Pi showed unfeasibly large amounts of transmitted data on ppp0 adaptor.

To rectify this, a manual IP route is required to show the Pi a useable path to the remote network, this may be needed also if the remote network is on a different subnet to the local.

Do this by entering route add -net 192.168.1.0 netmask 255.255.255.0 dev ppp0 at the command line, replacing 192.168.1.0 with the subnet required and the final value 0. Test by pinging servers or machines on the remote network to see if they reply.

]]>