[lug] (Raspberry Pi) media center control?

Michael J. Hammel mjhammel at graphics-muse.org
Sat Jun 12 15:19:38 MDT 2021


On Sat, 2021-06-12 at 07:28 -0600, Davide Del Vento wrote:
> On Fri, Jun 11, 2021 at 11:09 PM MIchael J. Hammel <
> mjhammel at graphics-muse.org> wrote:
> > I built my own distro (PiBox) for the RPi that I use to play videos
> 
> Cool. Do you use VLC for that? Or what? 

I use omxplayer which is hardware accelerated and doesn't have a UI.  I
wrote small front end UI (GTK + Cairo) that allows selection of a video
that then launches omxplayer to play it.  The UI supports the Pi
touchscreen to move forward, back, pause, next video, etc.  It also
supports keyboard arrow keys, though that's optimized for the teeny
handheld keyboard I use.

Actually, the front end is called VideoFE and it reads a db of video
files that is generated using VideoLib, a Java app I wrote that will
scan your videos (your movie and TV dvds) and try to match them with
TheMovieDB.org or TheTVDB.com.  If there is more than one match you can
select the correct one.  Once it's done and your satisfied it generates
a JSON db and stores it in the directory where the video files are.  If
you put this on a USB stick then VideoFE can find it cuz it's
automounted by PiBox.

Similar functionality in MusicFE, though it uses a shell script to
generate the DB and the MusicFE UI is more like the CD Carousel while
VideoFE is a simple list with poster art and descriptions for each
video.

> My stereo does not have HDMI, but I connect the Pi with a regular
> mini-TRS-to-RCA and that problem is solved anyway.

Basically what I do for the headphones.  I have PiBox automatically
route audio to the RCA port and disable HDMI for the Media System
because that's it's use case (consumer device orientation, again).
 
> Well, that part I know. I am somewhat audiophile (not extremist), but
> for that I use my SACD reader rather than the Pi. For the Pi I can
> live with it, and after all if it's coming off youtube....

Oddly, I work for a traditionally-audio company (QSC) but know next to
nothing about audio.  I'm there to make SBCs bells and whistles work so
app devs can do something interesting with them.

> The question was more about the software side, such as is a 
> Raspberry Pi 3 adequate to run VLC, youtube, Vimeo and the likes?
> Perhaps in a single tab browser?

Browsers are memory hogs and a Pi doesn't have a lot of memory.  A Pi
would be better providing web services (aka serving video files) to a
remote client running a browser.  

Originally PiBox was going to use surf (see suckless.org), a simplistic
and lightweight browser, as a front end to playing videos from the
Internet.  But even that requires WebKitGTK which is HUGE compared to
everything else I put in the rootfs.  So I dropped that idea and went
to writing my own front end to omxplayer.  Much, much lighter weight. 
It also led to PiCam, which uses omxplayer to play webcam video via
mjpeg-server.  The trick:  only UI at a time is running - no running
simultaneous apps.  However, there is a web interface that lets you
stream the webcam to a remote browser.  

But my usecase changed way back then and I dropped the idea of trying
to play everyone elses videos.  So I'm not trying to support playing
youtube, vimeo and the like.  There are other projects for that.

I could play remote videos if I have the specific URL of the video (not
the youtube page or the Vimeo page but the actual MP4 URL).  omxplayer
does support this.  I'm actually adding code to make a kiosk that can
play a video list that is setup remotely, allowing a user to change the
videos at will.  Someone asked for that but then bailed, but I'm still
trying to finish that project anyway.  Seemed like a cool idea.
  
> That phone is a computer. Unfortunately people want to use that
> computer only to extract money from your wallet in exchange for some
> eye candy, but occasionally there are good pieces of software -- very
> hard to find hence me asking.

True.  That's why I want a PinePhone.  So I can make a phone do
something useful. Plus it's fun just to see if I can make my custom
distro sing on that hardware.  Just to prove I can.  Keeps me
young(ish).  :-)

-- 
Michael J. Hammel
mjhammel at graphics-muse.org
michaelhammel at acm.org




More information about the LUG mailing list