Choosing YouTube quality over CLI

*nix specific usage questions
Setiawan
New Cone
New Cone
Posts: 5
Joined: 21 Feb 2021 16:15

Choosing YouTube quality over CLI

Postby Setiawan » 21 Feb 2021 16:25

I'm using VLC through its CLI on a Raspberry Pi 4 (no GUI OS installed).

If I open a YT video, say by entering

Code: Select all

vlc https://www.youtube.com/watch?v=xcJtL7QggTI
, some videos will stream at a lower quality than what is available through the same video in a browser, and a lower quality than what my display can handle.

That particular video isn't a good example, as it displays at 720p (there are higher resolutions available, but my system resolution is 640x480). Some videos will have 1080p available however, and only stream the 640x360 version for example.

Is there some way to choose the quality of the video that is streamed? I've tried researching this and some people mention being able to add a query to the end of the url (e.g. https://www.youtube.com/watch?v=xcJtL7QggTI&hd=1), but none of those solutions seemed to have worked.

So, does anyone know how to choose the resolution when streaming YT in VLC using the command line?

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Choosing YouTube quality over CLI

Postby Rémi Denis-Courmont » 21 Feb 2021 19:10

There is --preferred-resolution, but only audio+video formats can be selected.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Setiawan
New Cone
New Cone
Posts: 5
Joined: 21 Feb 2021 16:15

Re: Choosing YouTube quality over CLI

Postby Setiawan » 22 Feb 2021 02:08

Thanks Remi, are you able to give me example valid values? All I've found in regarding to --preferred-resolution arg is a stackoverflow thread, which says that you can pass in values like '240', '360', '480', '1080', or '-1' for best available resolution. However none of these values affect the stream quality for me.

Rémi Denis-Courmont
Developer
Developer
Posts: 15323
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Choosing YouTube quality over CLI

Postby Rémi Denis-Courmont » 22 Feb 2021 07:36

Probably there is no better quality available (with audio).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: Bing [Bot] and 37 guests