Not all Pi tastes the same...
This is a tale of warning.
So, probably like many people, I thought I'd build a little special-purpose video player. This one is for my daughter, who loves Disney movies, but the basic principle of turning a general-purpose computer into a fixed-purpose video player with a simple interface, has surely come up millions of times. Indeed, HDMI video capability is probably one of the main reasons people choose a "Pi" type computer, instead of something like Arduino.
So I thought, this should be pretty straightforward. Heh heh. First, I built some nice-looking hardware, basically a set-top box with three buttons: back-arrow, play, and forward-arrow. The idea is that the arrows will choose which video to play, putting up a still cover-image for each video in turn as it scrolls through a directory full of videos (stored on removable USB stick). When the desired video is on-screen, pressing Play will of course play it (and subsequent Play presses will pause/unpause). Any clicking of the arrows during play will stop the video and return to the selector screens (my daughter doesn't need/want the capability to fast-forward or rewind within videos). Once the hardware was built, simple matter of software, right? Free video players already exist which do all the hard work, such as MPV; I just need to read the state of my buttons, put still images up on screen, and then fork off instances of the video player with the selected files. Maybe a Python script could do this; about time I learned Python I guess. Or just C and popen(), etc..
But here's the thing. Some Pi is better than other Pi. I originally based the hardware on the Orange Pi Zero2, a nice, cheap, and seemingly full-featured variant of these ARM SBCs. Seemed to be a welcome alternative to Raspberry Pi, which is annoying and inconvenient in several ways, as well as not being priced so nicely these days. Clear signs of a company in need of some capable competition.
(In case there's any doubt, all of this is under Debian Linux.)
I was thrilled when everything seemed to work on the Orange Pi Zero2, even including WiFi. The other Pi I had used, i.e., Raspberry Pi 3B, never got WiFi working, but that is par for the course with Linux on many types of hardware so I didn't mind. Ran an Ethernet cable, which did work fine, and everything else about the RPi3B was good for the purpose at hand.
But I could never get the Orange Pi to play my videos. I tried several different players, including MPV, VLC, and MPlayer, and I installed other libraries and software such as ffmpeg. I flailed around, trying to figure out which video codecs to use, I tried converting my videos into various formats and resolutions which might be easier to play, etc., etc., and once or twice I saw a few flickery frames flash by, and somehow Firefox was able to play videos, albeit in a very choppy way which always seemed to cut out and freeze after about 15 seconds, but wow. I thought, maybe all my fussing about with libraries has broken what was originally a functional video system, so I reinstalled the Debian image provided by OrangePi, and I tried just opening the file manager on the desktop and clicking on a video file (which calls upon MPV by default). No joy, only amazement. The Internet is full of long & tiresome discussions about video issues with Orange Pi, going back to 2020 and before. With all that know-it-all attitude flying around, and three years later, surely the basics should be sorted by now? Nope, not at all. Don't be fooled by the pretty X Windows desktop, the Orange Pi Zero2 is not actually able to stream video on HDMI. Something about the GPU and video acceleration and whatever, but frankly, I don't give a damn. Fix it, develop it, then advertise the product. Whatever.
So I switched out the OPiZero2 for the RPi3B. Slightly bigger footprint, doesn't hurt a thing in my unit. No WiFi, less convenient during development but once this thing is built, it won't need or want Internet connection in normal operation. And, video "just works". I'm so appreciative to all the free-software folk who are behind this simple fact. And I hope they get to the Orange Pi, sooner or later. I'll report back here, if anything ever changes WRT video on the OPiZero2. But I don't want to become an expert in porting Linux video systems to new, partially-documented GPUs, myself. I've got plenty of other projects on my plate, and this particular one is supposed to be "easy". I kinda hate continuing to use and depend upon Raspberry Pi. I don't consider them to be an ideal solution to any given problem or design, given the weird politics and intentional limited availability of the hardware. Kinda like using MS-Windows. But "just works" is a compelling advantage.
Comments
Post a Comment