Headless Plex Client using HiFiBerry and Raspberry Pi 3

Plex media server is a great way to manage personal media collection (mp3 music, family videos and photos). I’ve been using Plex Media Server running in a Synology NAS for quite sometime to manage a sizeable collection of music, videos and photos.

I stream my personal collection, especially some of my favorite Indian musicians through the living room stereo and bedroom stereo (powered by a Class T Amplifier (Trends Audio Class-T TA 10.1) connected to a pair of Axiom speakers). This stereo system was running “Rasplex” for quite sometime on a Raspberry Pi with HifiBerry DAC+ Pro board, but lately been experiencing issues and bugs that’s been frustrating. And was looking for various alternatives that’ll seamlessly work with Plex to stream audio to my stereo. Recently, stumbled across a project promoted/implemented by Plex CTO to run PlexAmp run in Raspberry Pi.

This guide shows how I setup a headless PlexAmp using the latest build from Plex.


HifiBerry Board

Install Ubuntu Server in Raspberry Pi

  • Install Ubuntu 11 (bullseye) in server mode, no graphical display.
    • Follow the steps in this page to install Ubuntu Server in Raspberry Pi 3 (Link) or here .
  • install ssh server in the ubuntu server.
    • sudo apt-get install openssh-server
    • and enable it by running following (so that ssh server will start when the system reboots):
      • sudo systemctl enable –now ssh

Configure and Enable HifiBerry Board

  • Follow instructions here to configure and enable Hifiberry board in ubuntu.
    • Hifiberry drivers are already included in the Linux Kernel for Raspberry Pi OS. So you just need to follow the instructions below.
    • vi /boot/config.txt file
      • comment out “dtparam=audio=on” line (Basically put a “#” in front of the line)
      • add audio=off to the “Enable DRM VC4 V3D driver” section
        • “dtoverlay=vc4-kms-v3d, audio=off” (I guess, this disables built-in driver!)
      • add following lines  to the same file.
        • dtoverlay=hifiberry-dacplus
        • force_eeprom_read=0
  • Then created /etc/asound.conf file with following:
                   pcm.!default {
                      type hw card 0
                   ctl.!default {
                      type hw card 0
  • Reboot “reboot”
  • run “aplay -l”
    • You should see following output:
    • card 0: sndrpihifiberry….

Install PlexAmp

Now that we’ve installed OS and HifiBerry is enabled and configured, next step is to install and enable PlexAmp client. As far I can tell, there is no guide to cleanly install and debug the client. I believe this software is still actively developed, but I was able to get it working with simple tweaks. Following is what I did:

  • To install PlexAmp (In server mode with no graphics) I followed instructions here.
  • first install nodejs server
    • sudo apt install nodejs
  • Download latest headless PlexAmp client for Raspberry Pi
  • Untar the file
    • tar -xvf Plexamp….tar.bz2
  • Go to “plexamp” directory
    • cd plexamp
  • Now run the node webserver
    • node js/index.js
    • Above step will start the PlexAmp client scripts that are part of the nodejs server.
  • At this point make sure you can see the “Raspberry PI” (screenshot below) in your iPhone or Android Plex client.
Check to make sure “hifiberry” shows up in the clients.
  • Once you confirm the PlexAmp client shows up in the iPhone app, you know the install and configuration is successful.
  • Next step is to make sure the PlexAmp client starts automatically when Raspberry OS bootsup. For doing that, you need to run PlexaAmp as a service.

sudo cp plexamp.service /lib/systemd/system/
sudo systemctl daemon-reload 
sudo systemctl enable plexamp
sudo systemctl start plexamp

That’s it.. you should be able to stream audio from your Plex app in iPhone, select PlexAmp as the client to play audio through your home stereo!. Enjoy.

If you are curious.. here is my setup:

Databricks vs Snowflake: Performance blog war!

Healthy and open competition is great for any industry, especially the technology industry that is super conscious of price/performance. Databricks and Snowflake are two great companies duking it out in this price/performance game recently. They’ve published blogs with claims and counter claims. Great insights provided by both blogs and interesting read as well. If you are too rushed to read the entire blog(s), the images below gives you a snapshot of what is said in the blogs. Enjoy!.

Earlier this month, Databricks published a blog claiming “World record” performance for processing 100TB tpc-ds benchmark. It also said corroboration by Barcelona┬ásupercomputing center (BCS). And squarely aimed it at Snowflake!https://databricks.com/blog/2021/11/02/databricks-sets-official-data-warehousing-performance-record.html

Chart 1: Elapsed time for test derived from TPC-DS 100TB Power Run, by Barcelona Supercomputing Center.

Source link

Chart 2: Price/Performance for test derived from TPC-DS 100TB Power Run, by Barcelona Supercomputing Center.

Source link

Yesterday, Snowflake published a counter blog (written by the founders benoit and thierry). Basically says, you don’t need a third party, just do it yourself in our cloud platform, it is so simple to verify!!.https://www.snowflake.com/blog/industry-benchmarks-and-competing-with-integrity/

Source Link

Source Link

Nikola Motors Fraud

How to Lie Your Way to $34 Billion. If you want to understand what happened to the Tesla’s challenger in the EV trucking industry, this short video is a great start. It is astonishing that even after federal lawsuit and proving that the entire thing is fake, this company is still worth $5B!. Hopefully they’ve something substantial that is not known to general public.

Tech-A-Week: DeepFake – Game of Thrones in real life

Game of Thrones – Faceless Men

For Game of thrones fans the episode when faceless men was introduced was a shocking but confusing one. Faceless men are the ones that have the ability to change their faces and capability to shape shift to appear as a different person. They follow the “many-faced God”, are trained to relinquish their former identifies, feelings, aspirations to become “no-one”. They use their ability to shape shift to efficiently carry out assassinations and carry out their tasks with ease.

In Real life, at least in the digital world, a combination of advancements in machine learning algorithms, faster processing power, huge amount of face data makes it possible to “face-shift” someone with another. This new technology is called “DeepFake”. There are plenty of examples of this new crazy technology online.

DeepFake: Layman’s definition

DeepFake is fancy name for “Face swapping” in videos. Take a famous person’s video, or a movie scene or any video for that matter then using software to replace Person A’s face with Person B’s face! .

Why is this a big deal?

Changing a person’s face in a photo is not that difficult, anybody with a decent phone or computer photo editing software can do it. Photos are stationary and doesn’t move, just replacing a face is not a big deal. However, video is a whole another ball game. you need a sophisticated and powerful software to replace a face in a video. Hollywood studios could do it with their arsenal of computer graphics machines and technical experts. check out the trailer and the backstory for “Gemini Man” movie.

So far it was not available for common people, but now a technical advancement called “DeepFake” is enabling anybody with a phone to create totally compelling video by replacing someones face. On one hand it is a great, exciting and on the other it is disturbing someone could do this with ease just with a phone.

Pretty impressive Bill Hader video in which his face changes to Tom Cruise and to Arnold Schwarzenegger.

Advancements in DeepFake:

In the last few months DeepFake “how to” videos and libraries have been exploding online. Mostly they are for entertaintment value. Some are complex step-by-step instructions (check the section towards the end of this blog if you are technically inclined to try this yourself).

There are also simple, user friendly apps in phones available to “wow” your friends (and probably creep out some).

One such example is an app called Reface ( Android and iOS) from an Ukranian startup, that is taking the online world by storm.

Experts are already cautioning against the negative consequences of this technology. It will be really difficult to distinguish (at least online) between real and fake videos. What will be negative consequence of the app especially in the election year?


Interesto Meter

Investment Potential: Low

Entertainment value: Huge

Social Impact: Huge (potential to wreck havoc with a deluge of fake videos created by rival political ideologues, fake videos by disgruntled employees or ex-lovers etc)

Technically inclined!?: Continue reading…

Face or image recognition is not rocket science these days. Facebook and Google have been using image recognition in their platforms for several years now. If you ever used Google photos you’ll have experienced image recognition. Google photos can accurately identify a “Cat” without needing to supply “meta-data” to specify a photo contains contain. It recognizes by training itself using millions of cat photos and pin-pointedly identify Cat and even has the ability to distinguish between Cat and for example, Tiger.

However, recently there are advancements in the science of video editing to replace a face of pone person with another has been making big strides. below are two open source software examples that provides enough arsenals for someone to create DeepFake programs with relatives little effort.

  1. Faceswap
  2. DeepFace Lab

Here is a video that gives step by step instructions using DeepFaceLab to reface Elon Musk to use Robert Downing Jr’s face.