I was sitting in front of my raspberry pi and asked myself: "What if X Servers, Windowmanagers and all the other graphical stuff would heve never been invented ? .. How would pepole watch youtube videos.". Beside the fact that the possibility of having youtube in this very special case is really small, this type of question reveals that it was not one of my brightest moments ... but it lead me to a really cool attempt how to watch videos in ascii art.
As written here mplayer has a cool feature for all of us that are not able to start a X server. It enables its users to view a video in ascii art by selecting the correct output mode. So with a downloaded file things are easy:
mplayer -vo aa movie.avi
# .. also with options
mplayer -vo aa:extended:driver=curses:contrast=50 movie.avi
# or color
mplayer -vo caca movie.avi
What leads to the following output:
Cool - isn't it ? But the initial question has not been answered yet: How to watch YouTube videos in ascii ?
Ok, here the solution is to download the video first or stream it directly into mplayer. Here is my final script that could be run on a raspberry.
mplayer -vo caca -cookies -cookies-file /tmp/ytcookie.txt ffmpeg://$(youtube-dl -g --cookies=/tmp/ytcookie.txt $1)
So if we save this script into a file called ytascii.sh then we can run it like this:
And yes - it works with the https url that you see in your browser whie watching a youtube video: