YT & Twitch streams on Windows with VLC not working? Try MPV Player!
mpv is "a free, open source, and cross-platform media player".

https://mpv.io/

Win, Mac, Linux, BSD, ARM ... source code versions available.

https://mpv.io/installation/


The advantage of running video streams in an external video player, instead within a browser:

+ WAY less overhead (CPU/GPU). Use a hw monitoring sw and see how little resources a video player is using, compared to streaming videos from a web browser.

I can watch 1080p@60FPS on a Raspberry Pi 4 with 1/5th of the resources a browser would use.

+ Customization! Color, Brightness, Aspect Ratio, Contrast, Shaders ... = very useful when watching bad quality or overly bright or dark videos!

+ No tracking (cookies what?)

+ no ads (unless they are within the video itself)

+ Stream or record (easier to stream the video in-house or record it - though, you can use sw of your choice for the latter). VLC though has way more features and I would recommend VLC instead.



On Windows, I have trouble running YT and Twitch streams from the VLC player (not browser plugin). There are YT and Twitch LUA scripts you can replace, but that does not work on my Win11. You can also find browser extensions "Play-with-VLC", but users report mixed results trying both.

Using mpv player is super easy, even though it has no GUI as such:

1. Open the mpv.exe directory in a terminal (cmd.exe or powershell). Then type:

.\mpv.exe https://www.twitch.tv/esl_dota2

2. Use or create a simple link-file with the URL you want and drag+drop it into the player or unto the mpv.exe

This method works with other websites too, but it all depends on how the video stream or video clip is embedded inside the visited website. I assume, ffmpeg and widevine (DRM) must be installed on the Windows user/client side for this to work at all.
< >
Beiträge 15 von 5
Thanks Adam.

What if I have really slow internet, can I input the amount of bandwidth I want mpv to use from the command line?

What about the commercials will they play in mpv? I really like commercial and I feel like the person I am watching playing games for a living should make more money then I do.
Zuletzt bearbeitet von LeviathanWon; 27. Feb. 2024 um 19:20
1.

Good question!

The answer is: yes you can.

I only do this on Linux. Do not know, if this works on Mac/Windows (but should, IF you have yt-dlp and ffmpeg installed).

mpv.exe ytdl-format=bestvideo[height<=?720]+bestaudio/best https://www.youtube.com/url

You are basically telling the server to give you a lower quality format, which results in lower use of bandwidth.

Most common formats are - as you certainly know - 240, 360, 480, 720 ... but Twitch also uses explicit 720p@60, etc.

Which formats are available of any given video can be checked by using yt-dlp (youtube-dl) and the -F command:

.\yt-dlp.exe -F https://www.youtube.com/url-you-want-to-watch


==============
Here is a link to a discussion thread, that goes into more detail:

https://github.com/mpv-player/mpv/issues/4241
==============

2.

As stated above, Third-Party ads do not work ... on your end.

Viewing videos or streams via a dedicated video player, means you are just 'triggering' the server to start the video from the served URL.

You are not using a web browser, so the web analytics and monitoring and ad triggering scripts and protocols, etc are not happening.

If you 'like' ads and are concerned about monetization of your favorite streamers, this method is not for you. You can just use the Twitch/YT own video player settings to lower the quality of the video, which will lower the bandwidth you will use.
Cool 144p or 160p maybe for me... thanks... I just have to go on knowing that those ad's will never reach me again.
Zuletzt bearbeitet von LeviathanWon; 27. Feb. 2024 um 21:02
Ursprünglich geschrieben von LeviathanWon:
Can you try it at 160?

It depends on what the server is offering you.

A simple

yt-dlp.exe -F https://www.your-video

... check will list all available formats. If 160p is listed, you can chose it with this line:

mpv.exe --ytdl-format=video[height=160]

==========

VLC Player offers you in Tools>Preferences>Video(All)>Input/Codes>Preferred Video Resolution to choose as low as 240p. Not sure, how this works with streaming. Again, VLC does not work for me, maybe it works for you.

==========

A completely different method is to use a web browsers 'developer tools' option.

If you open dev tools (Firefox, Chrome, Edge, etc) F12 key, you will see the developer tools console. Click on the Network tab and on the far right, you will see the drop-down tab, which is set by default to "No Throttling".

There, you have the option to mimic a different connection type. Lowest is GPRS. This only works while the console runs and it might not even work at all. It is not meant for 'users', rather for webdev testing.
Zuletzt bearbeitet von Adam Beckett; 27. Feb. 2024 um 21:30
Good to know about the webdev testing. So I can still connect with a modem from the early 90's and use the "best" web browsers... knowing someone out there has accounted for me being poor.
< >
Beiträge 15 von 5
Pro Seite: 1530 50

Geschrieben am: 27. Feb. 2024 um 18:32
Beiträge: 5