💾 Archived View for sdf.org › ralfwause › gemini › plan9_video.gmi captured on 2023-03-20 at 18:23:17. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Getting video playback and Youtube on 9Front

Plan9 is not directly what you would call a multimedia OS, yes, even in the Bell Labs era it had an audio player and Page is quiet capable of displaying digital imagery, but video? Not really. But thanks to the various fanatics to program for this system there is now treason. Yes, it may be no VLC, but you can watch videos in various formats.

The installation is very simple (i shamelessly plug this from the great [1] "Plan 9 Desktop Guide"):

%<--------------------------------------------------------------

; mkdir /tmp/treason

; cd /tmp/treason

; hget https://ftrv.se/_/treason.gz | gunzip | disk/mkext -d .

; ./treason/install.rc

; treason der_film.mkv # watch some vids :)

%<--------------------------------------------------------------

So, the next thing that is missing is a Youtube downloader, i personally have settled for nvi, which is obtainable form shithub:

nvi on Shithub

The last thing that i was missing for myself was the option to search youtube from the shell. The Youtube web interface is not really compatible with any of the browsers available on 9Front so it allways was a bit fumbling to get search results to download.

At some point it was just a bit TOO fumbly for me so i began to think about a solution, there is invidious (lets just say a custom backend for youtube) and i have a nice networking os with many little tools at hand... so i hacked this little script together:

%<--------------------------------------------------------------

!/bin/rc

hget 'https://y.com.sb/search?q='$1 | grep '<p dir|Watch on YouTube' | sed 's/<p dir="auto">/Title: /' | sed s/.*'?v='/'Video: '/ | sed s/'">'// | sed 's/\<\/p\>//' | sed 's/ *//'

%<--------------------------------------------------------------

Its not very sophisticated but it gets the job done, it simply sends the search request it gets via its first argument to an invidious server, cuts everything which is not a video title or the video id from the results page in delivers a readable plain text list of the search results.

[1] Plan9 Desktop Guide

<- Back to main capsule