Running Kodi on a Raspberry Pi 5

Raspberry Pi 5 on a table top

When the Raspberry Pi 5 was announced, I had added a task to look at replacing my quad core Intel Celeron with it. The specs looked perfect for a living room media system. I had already invested in a Nvidia quad HDMI PCIe 1x card to fit into the current box, struggled to get the drivers working on Ubuntu but then it all just stopped.

I tried to replace the PSU but it didn’t work. Its been ages since I really built a PC so in the end, decided rather than I should complete that task and bought a 8gig Raspberry Pi 5 from cool components.

Today I set it up in a few hours complete with LibreELEC.

I’m going to get a new case because the basic case is so so for what I’m trying to add to it. It also looks a bit lost in such a big space under the TV. But I’m looking forward to seeing it run 4k H.265 HVEC across my TV and projector. Of course I would need to finally upgrade my first generation smart TV first.

Update progress

Kodi running on my TV in a darken room

This has been quite a journey.

I’m adding this information for anyone else who is thinking of doing similar. I still have a Raspberry Pi 5 running Kodi under my TV but I had to do a lot and only today somewhat happy. To be clear I installed the stable libreelec 32bit ARM as its seemed easy and good enough. I switched to the nightly edition 64bit ARM version. Tried installing OSMC (decided against this for lack of updates and Raspberry Pi 5 support looks a long way off) and finally installed the official Raspberry PI image/Raspbian and installed Kodi within that.

Dual display output running Kodi to my TV and Projector?

I seen many examples of people running displays next to each other at 4k and some high refresh rate. So assumed it would be possible across my TV and projector. Heck its mirrored so it should be easier right? No its not possible using Libreelec at all. I got it working in Raspbian but failed to get Kodi to mirror at all. After lots of research it seemed the much easier way to do this is with a HDMI splitter. I ended buying this one, which does exactly what I needed even if it requires a USB port for power.

AC3, DTS, multichannel sound output?

This one really kicked me where it hurts. I assumed I could finally get all those multichannel sound formats to my Onkyo 7.1 surround sound receiver over HDMI. I can get Dolby Digital/AC3 but when I plugged it directly into my receiver, the TV kept turning off as there was a issue where the remote inputs were not being transferred to the TV via the receiver. I considered turning off any standby options but there was worst to come.

I couldn’t find anyway to output DTS or AAC let alone anything like DTS Master audio. In the end I bought a external USB sound card with optical output and 8 channel analogue outputs if I invested in more 7.1 in the future. There was still some tweaking to Kodi get the settings right but its working now.

Raspberry Pi5 in a case under a TV bench

The upside

I found it extremely easy to make many versions across multiple SD cards and simply swap them out. For example just 2 days there was a release which looks good, so I’ll likely just make another SD card and copy my files to the home directory.

Generally its working now and I assume it will get better as development grows around the Raspberry Pi 5.

Another update

I found out the problem with the TV standby comes from the CEC adapter, which is installed as default on the Raspberry Pi but not on my previous built Kodibox. I was able to disable it via the Setting > System > Input > Peripherals > CEC adapter. Because this is now working, I have the Raspberry Pi 5 plugged directly into the Onkyo receiver and also plugged in the Chromecast.

Once the HDMI audio is sorted, I can finally remove the external sound card and may consider moving the HDMI splitter to the output of the receiver but need to work out how this would effect the Freeview HD output on the TV’s HDMI return channel path/arc. Although to be fair my antenna has not worked in months if not a year.

Pulseaudio filling my flat with sound

Pulse audio DLNA in action
Pulse audio DLNA in action while watching the NGI summit and using the picture in picture feature

I usually listen to podcasts during the morning but with Covid19, I have been listening to a lot more podcasts and audiobooks. I use Xbian (Kodi) to listen to podcasts and Yatse without needing to look at a computer screen.

Its a good setup, as it does my bedroom, bathroom and kitchen. I recently removed the FM transmitter and replaced it with a bluetooth transmitter finally avoiding all the interference I was getting. However when I’m watching something on my laptop, I then wish I could send the sound through the same system.

This is when I discovered puslseaudio-dlna, allowing any output from the laptop to be sent over DLNA to my Xbian and to my Kodibox in the living room. Perfect, the only issue I have is the delay which can be sometimes as high as 10seconds. I also learned it can be used to interface with the chromecast, I’m also found out its possible to wire it up to send to two or more outputs at the same time, meaning I could have a sonos type system. Extremely useful to know when next I have a party?

Plex’s future, without its server?

halt and catch fire

Plex recently announced they were making major changes and that we should be excited about Desktop AF. What wasn’t said was the media server is being killed?

Years back, the most common Plex implementation was to attach a home theater PC (HTPC) to a TV to stream media. With the proliferation of cheap streaming devices like the Chromecast, Apple TV, and Fire TV, almost no one bothers with HTPCs anymore. Thus, Plex is retiring the TV interface with the launch of its new desktop app. This will, no doubt, upset some Plex fans nonetheless.

dates

Upset? Absolutely and its now in direct competition with Kodi too.

I’m now in the market for a alternative to Plex. Originally I was looking at Emby a long while ago but frankly I don’t want to switch to another freemium product.

Jellyfin and Triton look good but its early days.

Jellyfin is a personal media server. The Jellyfin project was started as a result of Emby’s decision to take their code closed-source, as well as various philosophical differences with the core developers. Jellyfin seeks to be the free software alternative to Emby and Plex to provide media management and streaming from a dedicated server to end-user devices.

TRITON is a media pipeline that aims to go one step further than services like Jellyfin and Plex provide. Media is fetched from a magnitude of supported protocols (HTTP, S3-compatible, Usenet, etc), converted into multiple different quality levels, and then uploaded to a S3-compatible storage provider. This enables cheap storage and ensures that buffering is never a problem.

Lots more research is needed, including a look at what others are doing with the Plex announcement. Although I did find Ampache and Airsonic which could be useful for my mixcloud issues. Imagine if they were federated too?

How I listen to podcasts in 2018

Me listening to podcasts in madrid

I had quite a bit of time to read and listen to podcasts during my holiday in Portugal and Spain. One of the posts I read was Adrian talking about current his tech stack.

But I thought it might be good to talk about how I finally sorted out my podcast setup as it includes many parts of my current tech stack.

I listen to podcasts and audiobooks quite a lot. If I was still using last.fm I could likely quantify exactly how much but through my setup I’ll reveal a rough number at the end.

Listening devices

I listen to podcasts in the morning via Xbian running on Raspberry Pi 2 (considering switching to rasplex but Yaste remote supports Plex and Xbian as a audio endpoint/upnp renderer) which I bought a long while ago. This is setup in my room via ethernet and connected to a small amp and stereo speakers, one in my bedroom and one wired into the bathroom. I decided to do this after trying Bluetooth and FM speakers but they were just too quiet or unclear. Nothing beats a dedicated non-battery device. The wiring could do with a clean up. The Raspberry Pi is also connected to a audio splitter with one going to a FM transmitter.

This broadcasts to my little micro-hifi in the kitchen which I got from ebay over 10 years ago; its handy for multi-room synced audio without messing around (although I considered using a Chromecast audio and other things). The small amp in my room is connected to a TpLink HS100 smart switch meaning I can turn it off when leaving easily and quickly. I have only set it up for local wifi access not remote access, because frankly why would I need to this?

When not at home I use Google Pixel 2, I decided to get the 128gig version because I had enough of dealing with space issues. I have plex client installed and I have a plex pass (life time subscription), so can sync podcasts and audiobooks with ease. I do have it on my Nexus 7 and 5x too, but don’t carry them around much. I find Plex client is pretty good and doesn’t eat too much battery. Syncing seems seamless but with offline support sync support and 12gig of mobile 4G data. Because its using Plex at the backend, plex will save position no matter what device, as I’m logged in using the same account.

I also have Chrome Plex client on my laptop, meaning I can keep on listening when at work. Yes I listen to podcasts and audiobooks while working. I know many find this unthinkable but it works for me.

Plex Media Server

I’ve had Plex mediaserver running for quite a long time now and the advantages of having a gigabit internet connection and decent vpn (zerotier) means I can stream, sync or download podcasts and audiobooks without any fuss to my own devices. Plex media server keeps the position and checks for updates to the server filesystem.
Plex indexes the podcasts and audiobooks as audio and with some tweaking works quite well, although it can get confused when podcasts numbering and dates. It would be great if it had a audiobook and podcast indexer to pull much more metadata.

Podcatching

Unfortunately Plex media server doesn’t actually support podcasts which would be great if it did but its a pain to get working and not worth it for me. Especially because I have a complete Ubuntu stack its running on.
Because of this I use to download the podcasts from the web using a native ubuntu app. I tried Gpodder and Rhythmbox but they were resource hungry when downloading 30+ podcasts. Then tried VLC but it seemed over kill just to download podcasts. So tried some command line programs including Podfox and podcatcher. In the end I used Podget then setup a cron to trigger it every 2-4 hours. I also have Podget clean up the podcasts every 3 months.

One of the biggest things which drove me nuts was adding and updating rss feeds. Someone says you listen to the guilty feminist podcast, and would have to update server configs, etc. But using my Tiny tiny RSS install, I now have all the podcasts added to the master subscription list and generate a custom RSS feed aggregated for podcasts. I add the generated feed to Podget and the next time its updated, it will automatically add new items.

Because its done via TTRSS, it means I can add & remove the feed via any TTRSS client including the one my phone or using the web interface via my VPN (I only expose the web interface that way).

Small pieces loosely joined

It sounds like a lot of work but honestly it works well and means I can remove a part of it and it will still work. Remove Podget, could be replaced with anything including VLC, etc. Plex could be replaced with Emby or another mediaserver. TTRSS could be anything self-hosted. Using Plexpy to log is under my own terms and the data is only shared and useable by me.

I do wish I could get to this type of space with so much more of the services I use. Right now, I’m quite impressed with how smooth everything works.

Looking forward

I’m looking at a way to tag and generate a feed out of the tags in TTRSS, instead of adding it to a hierarchy. Sometimes a feed could fit between two or more places. I’d also like to improve plex’s indexing around podcasts and audiobooks. Podget generates a m3u playlist file but not found much use for these yet. I also wish the plex input for kodi was less heavy.

I just added the Recode podcast while writing this post and I looking at my plex client on my Pixel 2. Podget downloaded all the episodes over my gigabit connection in about 6mins flat, the podget won’t remove them till a few months old but I can easily remove them via plex or directly from the file system over the VPN.

As promised, looking at Tautulli (what use to be PlexPy). Over the last 3 weeks I had 83 plays or 22 hrs 14 mins of playback.  The last podcast I listened to while on the Madrid Metro to the airport at 7:30am was Rob Reid’s Always on podcast – Episode 23: Rodney Brooks | Robotics & AI – Their Present & Future

Not enough detail?

If you are interested in any detail, just comment or tweet me for more info.

 

Oh Plex, why oh why?

https://www.flickr.com/photos/cubicgarden/4303608740/

I know the picture above isn’t Plex but rather XBMC/KODI but this shot sums up how I feel about Plex right now.

I have been using Plex server quite a bit and decided that I would snap up a lifetime PlexPlus pass a while ago. So I was pretty peed when they updated their policy around data collection. From Plex’s Highlights of what is changing:

Upcoming features and services involving third-party and ad-supported content will require Plex to collect and, in some cases, share information about the third-party content you are streaming. For clarity, third-party content is content that we deliver or stream to you that is not contained in your personal media library.

Ok thats annoying for me but not too much of pain as I don’t really use the Plex addons/plugins. I know others are more upset about this.

In order to understand the usage across the Plex ecosystem and how we need to improve, Plex will continue to collect usage statistics, such as device type, duration, bit rate, media format, resolution, and media type (music, photos, videos, etc.). We will no longer allow the option to opt out of this statistics collection. Again, we will not collect any information that identifies libraries, files, file names, and/or the specific content stored on your privately hosted Plex Media Servers. The only exception to this is when, and only to the extent, you use Plex with third-party services such as Sonos, Alexa, webhooks, and Last.fm.

We will no longer allow (including paid lifetime!) users to opt-out! Also usually when you get something like this, its anonymous data collection. I know later its makes it sound like anonymous but it never actually says this. I still need to read through the privacy policy in full again. But this feels like it might break a EU data law and for sure the ones coming soon. (Plex is based in Delware & Switzerland)

To be fair I’ve had a task to try out Emby for a long while, but this begs the question of what happens to my Plex pass and why don’t Plex share collected data with us? Luckily plex data portability isn’t such a pain. Also its another reason why most of my media consumption is through Kodi not Plex.

Exposition, versions and the story of sad API lookups?

Donnie Darko

I recently watched Donnie Darko again. Always loved that film so picked Donnie Darko out of my movies, only to find something wasn’t right. Killing Moon was gone in favor of Never tear us apart. I was watching the directors cut of Donnie Darko not the original cinematic cut. Without spoiling it, the directors cut is full of scene explainers which makes a great film suddenly a bore, this is called narrative exposition.

As someone else said

For me this movie was a masterpiece that the director ruined by changing the music and adding too many scenes/extensions.

The movie worked as is so everything he extended seemed to drag it. It’s 20 minutes longer as a result.

And I thought the opening upbeat song “the killing moon” was perfect instead of “never tear us apart”.
In story-telling, you start with “world in balance” (happy 80s) in order to create the contrast when things go array. So “Killing moon” was the a much better choice than “Never tear us apart.”

But whats painful about the whole thing is, looking at my movies. I find 2 donnie darkos. Both named the same, same cover art, fan art, etc. Its not till you look at the folder names you can see the difference. As you can imagine this is very frustrating as it leads to trial and error to get the one you want.

Of course its not just Donnie Darko, I also have the directors cut of Lock Stock, Human Traffic and a few others. Each are identical till watched.

I asked on Twitter about this issue and actually got a message back from themoviedb, which is wonderful to read and hear.

Certainly can’t wait for this to come, as there seems to be no real alternative to this trial and error method at the moment? I don’t envy creating the API point for this as, some films have so many versions and variations. What even counts as a version or variation?

Advantages of 1gig broadband: Plex media server

Plex Py

The advantage of having 1gig broadband (hyperfast) is the change of behaviour. Yes you can consume more and very quickly but its the symmetric nature which makes it interesting.

I have been running Plex media server for a while mainly to keep a track of my media, as I’m still running Kodi as the front ends.

One feature of plex media server is the ability to stream media to friends. Sitting on 1gig, I can share with a few close friends without even noticing. Its pretty seamless too, as long as they are using plex as a client. Luckily there are clients for many operating systems and devices including the xbox, playstation, firetv,  chromecast, etc.

Plex media server share

Its good, I once had 4 different friends watching media from my single core celeron server one evening. Did I notice? Nope, except when I noticed the activity indicator was lit up.

This got me thinking theres got be a way to visualise this stuff? Of course others have thought about the same and I installed Plex py.

Plex Py

Pretty cool eh?

The only downside right now is my single core server with 5400rpm drives (helps with the cooling) is rubbish at transcoding full HD content, especially burning in subtitles. Maybe its time for a server upgrade?

I’m also not certain about running everything through Plex, wondering what other solutions there might be which can work in a similar way.

Sharing is caring…

Ian’s home cinema starts here…?

Ian's home projector test
Testing using Inception of course…

I have always been a fan of home cinema and had a pro-logic cinema setup way way back. Heck I even remember when I bought my first DVD player (Creative Encore 5X) and use to buy Region 1 DVDs for upwards of £30. It was great when I finally got a Dolby Digital cinema receiver. Must have warn out my first DVD from Amazon, Twister.

Anyway I just bought a second hand projector so I can finally have cinema nights at mine. I did consider getting a bigger TV but honestly I don’t see the point. Its not like I’m bothered about 4k and I already have a 3D smart TV and never used the 3D or Smart feature ever. I mean why bother when I got KODI (new name for XBMC) and a Chromecast just incase. I’m also not keen on getting a much bigger TV as it blocks the great view I have of Manchester. So a projector and screen made a lot of sense.

The projector I bought is a small Panasonic PT-AE100E and can support 720p and 1080i resolutions over VGA and Component connections (no digital connections at all). Its not bad, little noisy but compact.  I tested it on my black blinds but I’ve already got plans to get the IKEA Tupplur at 180cm wide. Looking at IKEA hackers I’m certainly not the only one.

  • Films – check
  • Kodi box – check
  • Home Cinema receiver – check
  • Projector – check
  • Pull down projector screen – need to order
  • New corner sofa – need to order
  • Popcorn maker – check
  • Friends to enjoy everything. – TBC 🙂

Look out for Ian’s home cinema nights soon… not quite a dinner party but its close enough.

Think IOT + Trakt + Shazam for video

https://twitter.com/cubicgarden/status/581556354155974656

Here’s one for anybody to take on…

Imagine a device like Amazon’s echo which ambiently shares what you are watching and also at what point…

It would operate similar to Trakt.TV’s live progress but rather than be constrained to an online web service, it would be a physical connected thing (IoT) which uses acoustic fingerprint technology similar to Shazam to automatically recognise what you are watching and where you currently are.

This is essential as on-demand viewing is changing the way we watch and consume media. This similar in concept to BBC prototype the Olinda. Think trakt crossed with Shazam and Olinda.

Whipclip reminded me of this, but I have been using Yatse with  Kodi or the Chromecast to share the shows I’m currently watching.  But I’d like to share the part of the video I’m watching really… This causes some issue with spoilers, but that could be worked out if you knew the episode and position of the person who is looking.

Lazyweb… make it be!

 

Which smart light technology works for me

I have been watching the Home automation market for a long while now and with all the security problems, have decided its time to get involved. Lights seem to be alright when it comes to security risk.

Checking out Amazon reviews, theres quite a bit of criticism about the Belkin Wemo compared to the Philips HueSam suggests LiFX as another option but I never heard of them.

So what am I after?

  • A range of LED bulbs and lights (bayonet and edison screw)
  • Support for Android at the minimum, IFTTT, Web and Linux would be great.
  • The ability to join my network either via Zigbee or something else.
  • Colour

After my brief twitter chat with Sam and Tony, I now know Philips Hue Lux is out, Wemo also maybe out due to the colour.  LiFX looks interesting but the lack of a wireless bridge worries me with bigger install plans. Plus I think there is a benefit to a bridge to connect other zigbee devices which are coming on to the market. Originally I was thinking about getting a almond plus router but then picked up the TPlink Archer D7 over the holidays at a good price.

It looks like the Philips Hue Lux is the best option to get started. With those I can hook it up to my Sleep as Android app, recreating my very old Philips wake up light.

I can then add a light to my living room for use while chilling out and watching films on xbmc/kodi.