summaryrefslogtreecommitdiffstats
path: root/.config/mpv/script-opts
diff options
context:
space:
mode:
Diffstat (limited to '.config/mpv/script-opts')
-rw-r--r--.config/mpv/script-opts/mpv_thumbnail_script.conf143
-rw-r--r--.config/mpv/script-opts/quality-menu.conf103
2 files changed, 246 insertions, 0 deletions
diff --git a/.config/mpv/script-opts/mpv_thumbnail_script.conf b/.config/mpv/script-opts/mpv_thumbnail_script.conf
new file mode 100644
index 0000000..80a3c22
--- /dev/null
+++ b/.config/mpv/script-opts/mpv_thumbnail_script.conf
@@ -0,0 +1,143 @@
+# The thumbnail cache directory.
+# On Windows this defaults to %TEMP%\mpv_thumbs_cache,
+# and on other platforms to ${TEMP} or ${XDG_CACHE_HOME} or /tmp in the subfolder mpv_thumbs_cache
+# The directory will be created automatically, but must be writeable!
+# Use absolute paths, and take note that environment variables like %TEMP% are unsupported (despite the default)!
+cache_directory=/tmp/mpv_thumbs_cache
+
+# Whether to generate thumbnails automatically on video load, without a keypress
+# Defaults to yes
+autogenerate=yes
+
+# Only automatically thumbnail videos shorter than this (in seconds)
+# You will have to press T (or your own keybind) to enable the thumbnail previews
+# Set to 0 to disable the check, ie. thumbnail videos no matter how long they are
+# Defaults to 3600 (one hour)
+autogenerate_max_duration=3600
+
+# Use mpv to generate thumbnail even if ffmpeg is found in PATH
+# ffmpeg is slightly faster than mpv but lacks support for ordered chapters in MKVs,
+# which can break the resulting thumbnails. You have been warned.
+# Defaults to yes (don't use ffmpeg)
+prefer_mpv=yes
+
+# Explicitly disable subtitles on the mpv sub-calls
+# mpv can and will by default render subtitles into the thumbnails.
+# If this is not what you wish, set mpv_no_sub to yes
+# Defaults to no
+mpv_no_sub=no
+
+# Enable to disable the built-in keybind ("T") to add your own, see after the block
+# Defaults to no
+disable_keybinds=yes
+
+# The maximum dimensions of the thumbnails, in pixels
+# Defaults to 200 and 200
+thumbnail_width=200
+thumbnail_height=200
+
+# The thumbnail count target
+# (This will result in a thumbnail every ~10 seconds for a 25 minute video)
+# Defaults to 150
+thumbnail_count=150
+
+# The above target count will be adjusted by the minimum and
+# maximum time difference between thumbnails.
+# The thumbnail_count will be used to calculate a target separation,
+# and min/max_delta will be used to constrict it.
+
+# In other words, thumbnails will be:
+# - at least min_delta seconds apart (limiting the amount)
+# - at most max_delta seconds apart (raising the amount if needed)
+# Defaults to 5 and 90, values are seconds
+min_delta=5
+max_delta=90
+# 120 seconds aka 2 minutes will add more thumbnails only when the video is over 5 hours long!
+
+# Parameter that mpv should use for hardware decoding
+# If properly configured can really improve thumbnail generation speed and cpu load
+# Default to no, see https://mpv.io/manual/master/#options-hwdec for the values
+mpv_hwdec=no
+
+# Parameter that mpv should use for seeking
+# yes extracts the exact frame
+# no extracts the closest keyframe, faster but less precise
+# Default to yes
+mpv_hr_seek=yes
+
+
+# Remote options
+
+
+# Below are overrides for remote urls (you generally want less thumbnails, because it's slow!)
+# Thumbnailing network paths will be done with mpv (leveraging youtube-dl)
+
+# Allow thumbnailing network paths (naive check for "://")
+# Defaults to no
+thumbnail_network=no
+
+# Same as autogenerate_max_duration but for remote videos
+# Defaults to 1200 (20 minutes)
+remote_autogenerate_max_duration=1200
+# Override thumbnail count, min/max delta, as above
+remote_thumbnail_count=60
+remote_min_delta=15
+remote_max_delta=120
+
+# Try to grab the raw stream and disable ytdl for the mpv subcalls
+# Much faster than passing the url to ytdl again, but may cause problems with some sites
+# Defaults to yes
+remote_direct_stream=yes
+
+# Enable storyboards (requires yt-dlp in PATH). Currently only supports YouTube and Twitch VoDs
+# Defaults to yes
+storyboard_enable=yes
+# Max thumbnails for storyboards. It only skips processing some of the downloaded thumbnails and doesn't make it much faster
+# Defaults to 800
+storyboard_max_thumbnail_count=800
+# Most storyboard thumbnails are 160x90. Enabling this allows upscaling them up to thumbnail_height
+# Defaults to no
+storyboard_upscale=no
+
+
+# Display options
+
+
+# Move the thumbnail up or down
+# For example:
+# topbar/bottombar: 24 (default)
+# rest: 0
+vertical_offset=24
+
+# Adjust background padding
+# Examples:
+# topbar: 0, 10, 10, 10
+# bottombar 10, 0, 10, 10 (default)
+# slimbox/box: 10, 10, 10, 10
+pad_top=10
+pad_bot=0
+pad_left=10
+pad_right=10
+
+# If enabled pad values are screen-pixels, else video-pixels.
+# Defaults to yes
+pad_in_screenspace=yes
+
+# Calculate pad into the offset
+# Defaults to yes
+offset_by_pad=yes
+
+# Background color in BBGGRR
+background_color=000000
+
+# Alpha: 0 - fully opaque, 255 - transparent
+# Defaults to 80
+background_alpha=80
+
+# Keep thumbnail on the screen near left or right side
+# Defaults to yes
+constrain_to_screen=yes
+
+# Do not display the thumbnailing progress
+# Defaults to no
+hide_progress=no
diff --git a/.config/mpv/script-opts/quality-menu.conf b/.config/mpv/script-opts/quality-menu.conf
new file mode 100644
index 0000000..8b34f7e
--- /dev/null
+++ b/.config/mpv/script-opts/quality-menu.conf
@@ -0,0 +1,103 @@
+# KEY BINDINGS
+
+# move the menu cursor up
+up_binding=UP WHEEL_UP
+# move the menu cursor down
+down_binding=DOWN WHEEL_DOWN
+# select menu entry
+select_binding=ENTER MBTN_LEFT
+# close menu
+close_menu_binding=ESC MBTN_RIGHT
+
+# youtube-dl version(could be youtube-dl or yt-dlp, or something else)
+ytdl_ver=yt-dlp
+
+# formatting / cursors
+selected_and_active=▶ -
+selected_and_inactive=● -
+unselected_and_active=▷ -
+unselected_and_inactive=○ -
+
+# font size scales by window, if false requires larger font and padding sizes
+scale_playlist_by_window=yes
+
+# playlist ass style overrides inside curly brackets, \keyvalue is one field, extra \ for escape in lua
+# example {\\fnUbuntu\\fs10\\b0\\bord1} equals: font=Ubuntu, size=10, bold=no, border=1
+# read https://aegi.vmoe.info/docs/3.0/ASS_Tags/ for reference of tags
+# undeclared tags will use default osd settings
+# these styles will be used for the whole playlist. More specific styling will need to be hacked in
+#
+# (a monospaced font is recommended but not required)
+style_ass_tags={\\fnmonospace\\fs25\\bord1}
+
+# Shift drawing coordinates. Required for mpv.net compatiblity
+shift_x=0
+shift_y=0
+
+# paddings for top left corner
+text_padding_x=5
+text_padding_y=10
+
+# Screen dim when menu is open
+curtain_opacity=0.7
+
+# how many seconds until the quality menu times out
+# setting this to 0 deactivates the timeout
+menu_timeout=6
+
+# use youtube-dl to fetch a list of available formats (overrides quality_strings)
+fetch_formats=yes
+
+# list of ytdl-format strings to choose from
+quality_strings_video=[ {"4320p" : "bestvideo[height<=?4320p]"}, {"2160p" : "bestvideo[height<=?2160]"}, {"1440p" : "bestvideo[height<=?1440]"}, {"1080p" : "bestvideo[height<=?1080]"}, {"720p" : "bestvideo[height<=?720]"}, {"480p" : "bestvideo[height<=?480]"}, {"360p" : "bestvideo[height<=?360]"}, {"240p" : "bestvideo[height<=?240]"}, {"144p" : "bestvideo[height<=?144]"} ]
+quality_strings_audio=[ {"default" : "bestaudio"} ]
+
+# automatically fetch available formats when opening an url
+fetch_on_start=yes
+
+# show the video format menu after opening an url
+start_with_menu=no
+
+# include unknown formats in the list
+# Unfortunately choosing which formats are video or audio is not always perfect.
+# Set to true to make sure you don't miss any formats, but then the list
+# might also include formats that aren't actually video or audio.
+# Formats that are known to not be video or audio are still filtered out.
+include_unknown=no
+
+# hide columns that are identical for all formats
+hide_identical_columns=yes
+
+# which columns are shown in which order
+# comma separated list, prefix column with "-" to align left
+#
+# for the uosc integration it is possible to split the text up into a title and a hint
+# this is done by separating two columns with a "|" instead of a comma
+# column order in the hint is reversed
+#
+# columns that might be useful are:
+# resolution, width, height, fps, dynamic_range, tbr, vbr, abr, asr,
+# filesize, filesize_approx, vcodec, acodec, ext, video_ext, audio_ext,
+# language, format, format_note, quality
+#
+# columns that are derived from the above, but with special treatment:
+# size, frame_rate, bitrate_total, bitrate_video, bitrate_audio,
+# codec_video, codec_audio, audio_sample_rate
+#
+# If those still aren't enough or you're just curious, run:
+# yt-dlp -j <url>
+# This outputs unformatted JSON.
+# Format it and look under "formats" to see what's available.
+#
+# Not all videos have all columns available.
+# Be careful, misspelled columns simply won't be displayed, there is no error.
+columns_video=-resolution,frame_rate,dynamic_range|language,bitrate_total,size,-codec_video,-codec_audio
+columns_audio=audio_sample_rate,bitrate_total|size,language,-codec_audio
+
+# columns used for sorting, see "columns_video" for available columns
+# comma separated list, prefix column with "-" to reverse sorting order
+# Leaving this empty keeps the order from yt-dlp/youtube-dl.
+# Be careful, misspelled columns won't result in an error,
+# but they might influence the result.
+sort_video=height,fps,tbr,size,format_id
+sort_audio=asr,tbr,size,format_id