ref: b962b3f7da70cc249ae70c77d513a0af0306a154 wiki.9front.org/youtube.md -rw-r--r-- 1.2 KiB
b962b3f7kvik cwfs: link to a backup-to-usb article 1 year, 4 months ago


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

NOTE one does not simply commit treason on anything other than AMD64 or 386. No videos for Raspi users, sorry. You can still play audio only on other arches though.

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.