wiki.9front.org/youtube.md -rw-r--r-- 1.1 KiB
b0f24297Sigrid Solveig Haflínudóttir 9p on unix: change the 9pfs url 5 months ago


Commit treason. It supports H.264, VP8, VP9 and AV1.

Treason works on 386, AMD64 and ARM64. Yes, lower resolution videos can be played on a Raspberry Pi 4.

Install nvi.

#Playing just audio alone

nvi -A 251 -a /fd/1 ybGOT4d2Hs8 | mcfs -t audio | audio/opusdec > /dev/audio

#Playing video and/or audio

The easiest way to play ANY video on Youtube is to use H.264 "baseline" stream. It's of pretty bad quality image-wise, but contains audio in the container itself and doesn't require too much CPU resources.

nvi -V 18 -v /tmp/vid.mp4 ybGOT4d2Hs8 && treason /tmp/vid.mp4 && rm /tmp/vid.mp4

If you want to find the best possible format(s), use the following:

nvi -a /tmp/audio -v /tmp/video ybGOT4d2Hs8 && treason -a /tmp/audio /tmp/video && rm /tmp/audio /tmp/video

You can put that script to $home/bin/rc/youtube and add a plumb rule for Youtube URLs, right before include basic:

type	is	text
data	matches	'https://(www.)?youtube[^ ]+'
plumb	start	window youtube ''''$0''''


No. It's great.


sigrid @ #cat-v or 9p.zone chat.