do you know of a command line tool, that plays YouTube videos in the terminal? I does not have to show the YouTube-video. In fact I dont even want the original video.
But on top, a kind of graphical (equalizer, waveform - like) visualization would be cool, but not necessary…
# Get whichever format is best
youtube-dl --extract-audio --audio-format best <URL>
# Get an mp3
youtube-dl --extract-audio --audio-format mp3 <URL>
I don’t know of any terminal players which encorporate a visualizer though there’s projects that do the equalizer by itself. An easy way to combine the two in one window would be using screen or tmux.
ffplay is what you want to use. It has several options for the display of the audio spectrum. Just pipe the output of the youtube-dl into ffplay: (It takes a few seconds to get enough data to start the playback)