Command line YouTube in VLC player - quality control?

command-line, vlc, youtube

Solution

Go to VLC directory from command prompt and then type

vlc "http://www.youtube.com/watch?v=v0faacLn8K4&fmt=18"

Works for me.

Problem

I'm trying to make a little script which involves playing YouTube videos from the command line using VLC. I'm using Windows 7 with VLC in the search path. Typing ``` vlc http://www.youtube.com/watch?v=v0faacLn8K4 ``` plays the video, but always at the highest quality. In the internet browser, appending the term '&fmt=18' forces a low-resolution mode. However, using this in the command line, ``` vlc http://www.youtube.com/watch?v=v0faacLn8K4&fmt=18 ``` gives an error: ``` ´fmt´ is not recognized as an internal or external command, operable program or batch file. ``` I've tried quoting the url with various quotes, to no avail. The entire link gets passed to VLC, including the quotes. What's the solution to this? Is there a VLC switch for selecting stream quality? The VLC command-line help may have the answer, but understanding the meaning of all the switches is a little beyond me. Music credit: By Your Side by Breakbot

Original source