All Projects → Samillion → mpv-ytdlautoformat

Samillion / mpv-ytdlautoformat

Licence: AGPL-3.0 license
A simple mpv script to auto change ytdl-format for Youtube and Twitch

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to mpv-ytdlautoformat

cfg
my dotfiles
Stars: ✭ 26 (-13.33%)
Mutual labels:  mpv, mpv-script
mpv-search-page
An in-window search page for mpv player
Stars: ✭ 32 (+6.67%)
Mutual labels:  mpv, mpv-script
mpvacious
Adds mpv keybindings to create Anki cards from movies and TV shows.
Stars: ✭ 286 (+853.33%)
Mutual labels:  mpv, mpv-script
mpv-scripts
A collection of scripts for mpv player
Stars: ✭ 138 (+360%)
Mutual labels:  mpv, mpv-script
mpv-youtube-upnext
A userscript for MPV that allows you to play "up next"/recommended youtube videos ⏭️
Stars: ✭ 29 (-3.33%)
Mutual labels:  mpv, mpv-script
videoclip
Easily create videoclips with mpv.
Stars: ✭ 49 (+63.33%)
Mutual labels:  mpv, mpv-script
mpv-repl
A graphical REPL for mpv input commands
Stars: ✭ 70 (+133.33%)
Mutual labels:  mpv, mpv-script
mpv-osc-morden
Another mpv osc script
Stars: ✭ 149 (+396.67%)
Mutual labels:  mpv, mpv-script
mpv-gif-generator
Creates animated gifs using mpv hotkeys
Stars: ✭ 32 (+6.67%)
Mutual labels:  mpv, mpv-script
mpv crop script
A Lua script to take cropped screenshots in mpv, sans external dependencies
Stars: ✭ 77 (+156.67%)
Mutual labels:  mpv, mpv-script
immersive
Language learning mpv script for looking up words within mpv and generating Anki cards
Stars: ✭ 43 (+43.33%)
Mutual labels:  mpv, mpv-script
MPV lazy
🔄 mpv player 播放器折腾记录 windows conf ; 中文注释配置 快速帮助萌新入门 ; mpv-lazy 懒人包 win10 x64
Stars: ✭ 615 (+1950%)
Mutual labels:  mpv, mpv-script
mpv-youtube-download
A userscript for MPV that allows you to download youtube audio and video with one key press 💾
Stars: ✭ 16 (-46.67%)
Mutual labels:  mpv, mpv-script
Intersubs
Interactive subtitles for mpv. Instantly translate selected word/sentence.
Stars: ✭ 111 (+270%)
Mutual labels:  mpv
Play With Mpv
Chrome extension that allows you to play videos in webpages like youtube with MPV instead
Stars: ✭ 163 (+443.33%)
Mutual labels:  mpv
Mpvc
An mpc-like control interface for mpv.
Stars: ✭ 94 (+213.33%)
Mutual labels:  mpv
Webm.py
🎞 Cross-platform command-line WebM converter
Stars: ✭ 93 (+210%)
Mutual labels:  mpv
Mpv
🎥 Command line video player
Stars: ✭ 17,018 (+56626.67%)
Mutual labels:  mpv
Mpv Scripts
Various scripts for mpv
Stars: ✭ 164 (+446.67%)
Mutual labels:  mpv
Ytcc
Command line tool to keep track of your favorite playlists on YouTube and many other places.
Stars: ✭ 92 (+206.67%)
Mutual labels:  mpv

mpv-ytdlautoformat

A simple mpv script to automatically change ytdl-format, specifically if the URL is Youtube or Twitch.

This script supports and works with multi-purpose playlists. For example, if you have a playlist that includes Youtube URLs, Vimeo URLs and local files.

If the URL is Youtube or Twitch, ytdl-format is set to: 480p, 30 FPS and no VP9 codec.

Otherwise, ytdl-format is set to: Best video quality, 30 FPS and no VP9 codec.

Options

If you would like to add more domains to have ytdl-format automatiaclly changed for them, simply add them to the StreamSource set.

To adjust quality of matched domains, edit changedQuality value.

Affects matched and non-matched domains:

  • To enable VP9 codec, change enableVP9 to true.
  • To change frame rate, adjust FPSLimit, default is 30.

FPS (frame rate) can be more than 30, however, it depends on some factors:

  • Can the video stream run that limit?
  • Can your hardware run that limit?

That is why frame rate is set to 30 by default, which is the default in most streaming and video websites.

How is this script useful?

Some streaming websites do not offer multi-quality per video. So if you have ytdl-format in mpv.conf set to only play 480p or 720p videos, mpv/youtube-dl or mpv/yt-dlp will not run it because it cannot find a video with the specified format.

This script helps you set a lower or a specific quality for some websites, while leaving the rest as default. That way all video streams will play and you won't have to keep editing mpv.conf each time to make it work.

Changes to mpv configuration made by the script

The script will override any ytdl-format you have set in mpv.conf or in commandline to the values you have set within the script.

No files are edited or changed in any way, the script simply changes ytdl-format value, so whatever is in mpv.conf or CLI is ignored.

How to install

Simply place ytdlautoformat.lua in the corresponding mpv scripts folder of your operating system:

  • Windows: %APPDATA%\mpv\scripts\ or C:\users\USERNAME\AppData\Roaming\mpv\scripts\
  • Linux: ~/.config/mpv/scripts/ or /home/USERNAME/.config/mpv/scripts/
  • Mac: ~/.config/mpv/scripts/ or /Users/USERNAME/.config/mpv/scripts/

How to uninstall

The script doesn't change or alter configuration in other files, so removing the ytdlautoformat.lua script from the mpv scripts folder is all that is needed to uninstall/disable.

Preview/Demo

A screenshot of the script running and showing process and changes in a playlist.

mpv-ytdlautoformat preview

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].