475 lines
11 KiB
HTML
475 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'; font-src 'self' data:; img-src 'self' data:; connect-src 'self'; base-uri 'self'; form-action 'self' https://defcon.social https://bsky.app;">
|
|
<meta http-equiv="X-Content-Type-Options" content="nosniff">
|
|
<link rel="stylesheet" href="../assets/css/style.css">
|
|
<link rel="icon" type="image/x-icon" href="../favicon.ico">
|
|
<script>
|
|
// Apply theme immediately to prevent flash
|
|
(function() {
|
|
const theme = localStorage.getItem('theme') ||
|
|
(window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
})();
|
|
</script>
|
|
<title>mpv Cheatsheet - Cheatsheets - Launch Pad</title>
|
|
</head>
|
|
<body>
|
|
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
|
|
<svg class="theme-icon theme-icon-moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
|
|
<svg class="theme-icon theme-icon-sun" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="display: none;"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
|
|
</button>
|
|
<br/><br/>
|
|
<div class="name">
|
|
__ _______________________ _________._________________________
|
|
\_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/
|
|
| __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_
|
|
| \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \
|
|
\___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ /
|
|
\/ \/ \/ \/ \/ \/ \/
|
|
</div>
|
|
<div class="blog-page-header">
|
|
<div class="blog-header-content">
|
|
<a href="/cheatsheets" class="back-link" title="Back to Cheatsheets">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" class="home-icon"><path fill="currentColor" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>
|
|
</a>
|
|
<h1 class="blog-page-title">mpv Cheatsheet</h1>
|
|
</div>
|
|
</div>
|
|
<div class="blog-post-container">
|
|
<div class="blog-posts-container" style="max-width: 900px; margin: 0 auto;">
|
|
<div class="blog-post">
|
|
<div class="blog-post-content">
|
|
<p><a href="index.html">← Back to cheatsheets</a></p>
|
|
<p><a href="../index.html">← Home</a></p>
|
|
<hr>
|
|
<h2>Basic Playback</h2>
|
|
<ul>
|
|
<li>mpv <file> - Play a file</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv <url> - Play from URL</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv <file1> <file2> - Play multiple files</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv --playlist=<file> - Play playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv --shuffle - Shuffle playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv --loop=<N> - Loop N times (0 = infinite)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>mpv --loop-file=inf - Loop current file infinitely</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Playback Controls</h2>
|
|
<h3>Space and Enter</h3>
|
|
<ul>
|
|
<li>Space - Pause/Resume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Enter - Pause/Resume (alternative)</li>
|
|
</ul>
|
|
<h3>Seeking</h3>
|
|
<ul>
|
|
<li>← - Seek backward 5 seconds</li>
|
|
</ul>
|
|
<ul>
|
|
<li>→ - Seek forward 5 seconds</li>
|
|
</ul>
|
|
<ul>
|
|
<li>↑ - Seek forward 60 seconds</li>
|
|
</ul>
|
|
<ul>
|
|
<li>↓ - Seek backward 60 seconds</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+← - Seek backward 1 second</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+→ - Seek forward 1 second</li>
|
|
</ul>
|
|
<ul>
|
|
<li>[ - Decrease playback speed</li>
|
|
</ul>
|
|
<ul>
|
|
<li>] - Increase playback speed</li>
|
|
</ul>
|
|
<ul>
|
|
<li>{ - Halve playback speed</li>
|
|
</ul>
|
|
<ul>
|
|
<li>} - Double playback speed</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Backspace - Reset playback speed</li>
|
|
</ul>
|
|
<ul>
|
|
<li>, - Step backward frame</li>
|
|
</ul>
|
|
<ul>
|
|
<li>. - Step forward frame</li>
|
|
</ul>
|
|
<h3>Volume</h3>
|
|
<ul>
|
|
<li>- - Decrease volume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>+ or = - Increase volume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>9 - Decrease volume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>0 - Increase volume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>m - Mute/Unmute</li>
|
|
</ul>
|
|
<h3>Playlist Navigation</h3>
|
|
<ul>
|
|
<li>> - Next file in playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>< - Previous file in playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>p - Previous file in playlist (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>n - Next file in playlist (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>P - Show playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>j - Next entry in playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>J - Previous entry in playlist</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Video</h2>
|
|
<ul>
|
|
<li>f - Toggle fullscreen</li>
|
|
</ul>
|
|
<ul>
|
|
<li>T - Toggle stay-on-top</li>
|
|
</ul>
|
|
<ul>
|
|
<li>t - Toggle subtitle visibility</li>
|
|
</ul>
|
|
<ul>
|
|
<li>s - Cycle through subtitles</li>
|
|
</ul>
|
|
<ul>
|
|
<li>S - Cycle through subtitles (backward)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>v - Toggle subtitle visibility</li>
|
|
</ul>
|
|
<ul>
|
|
<li>V - Toggle subtitle visibility (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>z - Adjust subtitle delay backward</li>
|
|
</ul>
|
|
<ul>
|
|
<li>x - Adjust subtitle delay forward</li>
|
|
</ul>
|
|
<ul>
|
|
<li>c - Cycle through audio tracks</li>
|
|
</ul>
|
|
<ul>
|
|
<li># - Cycle through audio tracks (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>b - Cycle through video tracks</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+ - Cycle through video tracks (alternative)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Advanced Controls</h2>
|
|
<ul>
|
|
<li>i - Show file information (press again for extended info)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>I - Show extended file information</li>
|
|
</ul>
|
|
<ul>
|
|
<li>o - Show on-screen display (OSD)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>O - Show OSD (alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>P - Show progress bar</li>
|
|
</ul>
|
|
<ul>
|
|
<li>d - Cycle through deinterlacing modes</li>
|
|
</ul>
|
|
<ul>
|
|
<li>D - Cycle through deinterlacing modes (backward)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>r - Cycle through aspect ratio</li>
|
|
</ul>
|
|
<ul>
|
|
<li>A - Cycle through aspect ratio (backward)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+ - Cycle through video filters</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+ - Cycle through video filters (backward)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Screenshots</h2>
|
|
<ul>
|
|
<li>s - Take screenshot (with subtitles)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>S - Take screenshot (without subtitles)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+s - Take screenshot (with subtitles, alternative)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+S - Take screenshot (without subtitles, alternative)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Audio</h2>
|
|
<ul>
|
|
<li>1 - Decrease audio delay</li>
|
|
</ul>
|
|
<ul>
|
|
<li>2 - Increase audio delay</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+ - Cycle through audio filters</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+ - Cycle through audio filters (backward)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Window Management</h2>
|
|
<ul>
|
|
<li>q - Quit mpv</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Q - Quit mpv (save position)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>ESC - Quit mpv</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Ctrl+q - Force quit</li>
|
|
</ul>
|
|
<ul>
|
|
<li>w - Toggle window decorations</li>
|
|
</ul>
|
|
<ul>
|
|
<li>W - Toggle window decorations (alternative)</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Command Line Options</h2>
|
|
<h3>Playback</h3>
|
|
<ul>
|
|
<li>--start=<time> - Start at specific time (e.g., --start=30 or --start=0:30)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--end=<time> - End at specific time</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--length=<time> - Play for specific duration</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--speed=<factor> - Set playback speed (e.g., --speed=1.5)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--volume=<0-100> - Set initial volume</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--mute - Start muted</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--fullscreen or -fs - Start in fullscreen</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--no-fullscreen - Don't allow fullscreen</li>
|
|
</ul>
|
|
<h3>Video</h3>
|
|
<ul>
|
|
<li>--vo=<driver> - Video output driver (e.g., --vo=gpu, --vo=xv)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--vf=<filter> - Video filter (e.g., --vf=scale=1920:1080)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--hwdec=<api> - Hardware decoding (e.g., --hwdec=vaapi, --hwdec=nvdec)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--no-video - Disable video output</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--video-aspect=<ratio> - Set aspect ratio (e.g., --video-aspect=16:9)</li>
|
|
</ul>
|
|
<h3>Audio</h3>
|
|
<ul>
|
|
<li>--ao=<driver> - Audio output driver</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--af=<filter> - Audio filter</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--no-audio - Disable audio</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--audio-channels=<channels> - Set audio channels</li>
|
|
</ul>
|
|
<h3>Subtitles</h3>
|
|
<ul>
|
|
<li>--sub-file=<file> - Load subtitle file</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--sub-delay=<sec> - Subtitle delay in seconds</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--sub-scale=<factor> - Subtitle scale factor</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--sub-pos=<0-100> - Subtitle position (0=top, 100=bottom)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--sub-color=<color> - Subtitle color</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--sub-font=<font> - Subtitle font</li>
|
|
</ul>
|
|
<h3>Playlist</h3>
|
|
<ul>
|
|
<li>--playlist-start=<index> - Start at playlist index</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--shuffle - Shuffle playlist</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--loop-file=<N> - Loop file N times</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--loop-playlist=<N> - Loop playlist N times</li>
|
|
</ul>
|
|
<h3>Advanced</h3>
|
|
<ul>
|
|
<li>--config-dir=<path> - Use custom config directory</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--input-conf=<file> - Use custom input config</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--script=<file> - Load Lua script</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--ytdl-format=<format> - YouTube-DL format selection</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--cache=<size> - Cache size in KB</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--no-cache - Disable cache</li>
|
|
</ul>
|
|
<ul>
|
|
<li>--profile=<name> - Use profile from config</li>
|
|
</ul>
|
|
<hr>
|
|
<h2>Configuration</h2>
|
|
<h3>Config File Location</h3>
|
|
<ul>
|
|
<li>~/.config/mpv/mpv.conf (main config)</li>
|
|
</ul>
|
|
<ul>
|
|
<li>~/.config/mpv/input.conf (input bindings)</li>
|
|
</ul>
|
|
<h3>Common Settings</h3>
|
|
<pre><code># Video
|
|
vo=gpu
|
|
hwdec=vaapi
|
|
|
|
# Audio
|
|
audio-device=auto
|
|
|
|
# Subtitles
|
|
sub-auto=fuzzy
|
|
sub-file-paths=subs:subtitles
|
|
|
|
# Playback
|
|
save-position-on-quit
|
|
watch-later-options=start
|
|
|
|
# Interface
|
|
osd-level=1
|
|
osd-duration=2000
|
|
|
|
# Performance
|
|
cache=yes
|
|
cache-secs=60</code></pre>
|
|
<hr>
|
|
<h3>Example Key Bindings</h3>
|
|
<pre><code># Custom seek
|
|
LEFT seek -5
|
|
RIGHT seek 5
|
|
UP seek 60
|
|
DOWN seek -60
|
|
|
|
# Custom volume
|
|
KP0 add volume -2
|
|
KP1 add volume 2
|
|
|
|
# Custom playlist
|
|
Ctrl+LEFT playlist-prev
|
|
Ctrl+RIGHT playlist-next</code></pre>
|
|
<hr>
|
|
<h2>Tips</h2>
|
|
<ul>
|
|
<li>Use mpv --list-options to see all available options</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --list-properties to see all properties</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --input-conf=<file> to test input configs</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --profile=<name> for different use cases</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --ytdl-format=best for YouTube videos</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --no-video for audio-only playback</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --loop=inf for continuous playback</li>
|
|
</ul>
|
|
<ul>
|
|
<li>Use mpv --shuffle with playlists for random order</li>
|
|
</ul>
|
|
<hr>
|
|
<p><a href="index.html">← Back to cheatsheets</a></p>
|
|
<p><a href="../index.html">← Home</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script async type="text/javascript" src="../blog/analytics.js"></script>
|
|
<script src="../theme.js"></script>
|
|
</body>
|
|
</html> |