On ascii, youtube and letting go

I’m once again late to the party.

Last month I found out I was “some sort of heathen” when the fact that I had never watched Jurassic Park was discovered. But this time it’s apparently worse, you see, Jurassic Park was a monster film released when I was a little girl scared of her own shadow (my shadow still scares me some times, but over the years we’ve established a truce and we live in a state of uneasy peace) so it was more or less understandable that I had not watched it–even if that didn’t make me any less of a heretic.

Not having watched any of frozen’s let it go videos on youtube until yesterday on the other hand is apparently inexcusable. In fact, my boyfriend claims I am not myself but an alien clone that was left behind after the real me was abducted. According to him, any other explanation would be far fetched and wholly implausible. Judging by this the song is apparently available in at least 25 languages so there was nowhere on the planet where I could have stayed hidden from it so long, making outer space the only possibility.

What makes it worse is that the entire world got over that song months ago! Do you think you had it bad back then when you had this song on your head and there was no way to get it out? At least you could share it with other people! Now I’m the only person left in the world with that song in her head and I can’t share it to anyone. I had never felt that lonely, every time I link it to friends they tell me they have already watched it 92789 times and, no matter how much they claim to love me, aren’t going to start again for my sake.

How to watch youtube videos (or any video really) in your text-mode terminal.

So I’ve been hard at work in making them more interesting. I figured, what if Frozen’s let it go was good, watching it from your terminal was surely better, so I thought of a way to do it. I knew mplayer had an ascii video mode but I didn’t know how to get it to stream youtube videos, mpv on the other hand does have a feature to stream youtube videos directly, but it lacks the terminal output. Then I remembered youtube-dl, and thought that maybe, with some terminal magic I could pipe youtube-dl‘s output into mplayer.

youtube-dl http://www.youtube.com/watch?v=OC83NA5tAGE -o - | mplayer -vo aa -monitorpixelaspect 0.5 -

Make sure to change the url to something else if you don’t feel like watching let it go one more time, it even works for non-youtube sites.

Keep in mind that this opens a new window to play the video in, if you want it to play on your terminal you’ll need to specify driver=curses, you also may want to use -q on youtube-dl to get rid of the unnecessary text output. Also, on my first try the aspect ratio was way off, I checked mplayer‘s man page and there was a note on the aa entry about using -monitorpixelaspect 0.5 to fix it.

Packages I needed:

  • youtube-dl to download and pipe the streams.
  • mplayer to play them.
  • aalib to make them awesome.
  • xorg-x11-fonts-misc depending on what output you want to use, you may not need this one.

I got these from the fedora repos, equivalent packages should be easy to find on every distribution. As far as I know there’s nothing linux specific to this, so if you happen to be a windows or mac user and feel like trying this, it shouldn’t be too hard to get either.

While perusing mplayer’s man page for fixes for the aspect ratio I discovered there are two other ascii outputs built in, one is caca and the other is matrixview. caca depends on cacalib, and is pretty much the same thing as aa except with color output. I tried it with a smaller font on xterm and it looked much crisper, but it was too resource intensive for me to capture a proper video on my meager hardware so I just snapped some pictures:

frozencaca01 frozencaca02 frozencaca03 frozencaca04 frozencaca05 frozencaca06 frozencaca07 frozencaca08 frozencaca09 frozencaca10 frozencaca11

Lastly, there’s matrixview. This one isn’t truly a text output mode, it’s opengl based and you won’t get it to play on a terminal. In its defense I’ll say that it does one thing and it does it well, even if that thing is turning your video into a transition scene from the matrix! You can change the number of rows and columns by changing the numbers on rows= and cols=. Keep in mind, however, that the man page warns against using numbers that are not multiples of 16. I didn’t actually test what happens if the number isn’t a multiple of 16, mostly out of fear of summoning Shub-Mannurath, Outer God of man pages. But if you don’t believe in such things you can try it out and tell me in the comments, just don’t say I didn’t warn you if a harbinger of the apocalypse shows up at your house.

youtube-dl http://www.youtube.com/watch?v=OC83NA5tAGE -o - | mplayer -vo matrixview:cols=400:rows=320 -

Isn’t it interesting that there is both an european spanish and an american spanish version of this song and they seem to have different lyrics? I wonder if the same happens to the american french and european french versions, they seemed like they were sung by the same singer…

11 Responses

  1. A. Guy
    A. Guy 27/04/2014 at 17:05 | | Reply

    Nice! What is the command to get the caca version? My font is too big but i like the color.

    1. Gaz
      Gaz 27/04/2014 at 21:07 | | Reply

      Just replace `aa` in the command line with `caca`

  2. redneck Steve
    redneck Steve 27/04/2014 at 17:43 | | Reply

    “Frozen” movie as an example. Fail!

  3. Kassidy
    Kassidy 27/04/2014 at 21:33 | | Reply

    Re LatAm and EU Spanish, this is pretty much always the case, and isn’t limited to Disney songs. Just about every film has a separate translation and voice-over for each region. If you want to see the really sad side of YouTube, it’s watching the comment wars between LatAm ES bashing the EU translation/dub and the EU ES doing likewise for the LatAm counterpart.

  4. tehdog
    tehdog 27/04/2014 at 22:35 | | Reply

    Just as a note:

    vlc -V aa ‘https://www.youtube.com/watch?v=m8e-FF8MsqU’

    also works.

  5. jdp
    jdp 28/04/2014 at 00:08 | | Reply

    Well, this is the first I’ve ever heard of the song! It was lonely out in space..

    Tangentially related: http://www.youtube.com/watch?v=cV1M1y595_U

  6. Pof Magicfingers (@PofMagicfingers)

    About your last paragraph, I’m french, from France. And I confirm you french and canadian french dubbing are almost always different. I may add, I’d rather watch a TV show or a movie with canadian french dubbing. Why ? Because they don’t try to make up jokes that works in french, they just say it as it would literally translate from english. It’s more raw and close to original.

  7. Sean Brown
    Sean Brown 11/12/2014 at 02:06 | | Reply

    I was able to find youtube-dl and install it via terminal on OSX, but I haven’t had any luck finding mplayer or aalib. Do you have links to instructions/command line instructions?

Leave a Reply