YouTube on the N900 again: NotPipe + nplay, a modern ffmpeg player that plays 240p/360p smoothly (Claude'd, experimental)
galleryFollow-up to the podcast post, where I said YouTube on the phone itself was hopeless. It is not, if you stop asking YouTube directly and stop using the system's video decoder. Everything below was tested on one N900, and it is experimental.
How it works: NotPipe (a touch GUI in Python 3) asks a public Invidious instance for the search results and the stream addresses (so it is not YouTube's own API), downloads the video and the sound in 4 MB pieces with curl, and plays the two files with nplay, a small player I Claude'd on top of a modern ffmpeg 9 built for the N900. The idea came from notPipe for old Android phones (thanks to gohoski).
Why not the stock player: GStreamer's ffdec_h264 gives 5 to 10 fps even at 144p, and the DSP decoders only take the Baseline profile (YouTube sends Main/High). The ffmpeg build with NEON decodes 360p at about 39 fps and 144p at 159 fps. In practice: 240p is smooth, 360p mostly smooth, 480p is too slow.
What you get:
- search with thumbnails, Watch (downloads into a cache and plays) and Download (joins into one MP4 in
MyDocs/Videos, visible in the file manager), a queue, and a "Cached videos" list that plays without any network, - a player that copies the stock one: tap to show the controls, orange seek bar, a volume slider that sets the system volume (the status menu agrees with it), Backspace quits, the screen stays on while playing,
- packages
notpipe-hildon,nplay,ffmpeg(andpython3-hildonlite0.5.0 for the thumbnails) in the apt repository (see post 2):apt-get install notpipe-hildon.
Honest limits: it depends on public Invidious servers, and when I tested only one answered, so it can stop working any day. Some videos give HTTP 403 (YouTube refuses the instance's address). No live streams, no channels/playlists yet, and the video has to download before it plays. The phone has little free RAM, so close other applications.
Sources: https://github.com/n900-resurrection (apps/ffmpeg, apps/nplay, apps/notpipe-hildon in the main project). A longer write-up with the numbers is on the project site: https://n900-resurrection.github.io