Skip to content

Instantly share code, notes, and snippets.

@jbelloncastro
Last active March 28, 2020 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbelloncastro/47d6a6b461091d3d285b3801f9f9f2b8 to your computer and use it in GitHub Desktop.
Save jbelloncastro/47d6a6b461091d3d285b3801f9f9f2b8 to your computer and use it in GitHub Desktop.
Search in youtube using youtube-dl and pipe the audio to VLC
#!/bin/bash -x
search="$@"
vlc_options=":sout=#transcode{vcodec=none,scodec=none}:http{mux=ogg,dst=:8080/} :no-sout-all :sout-keep"
youtube-dl "ytsearch1:$search" -r 200k -f 'bestaudio[ext=m4a]' -o - | cvlc - ${vlc_options}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment