- mpv does not scan neighboring folder files automatically by default.
- Explicit playlists quickly separate autoplay expectations from playback failures.
- Scripts, frontends, ordering, bindings, and paths are the main fix targets.
- Confirm the Symptom With a Minimal Clean mpv Command
- Add Folder Autoplay Deliberately
- Check Configuration, Profiles, Bindings, and Scripts
- Verify File Paths, Ordering, Permissions, and Media Limits
- Use Logs and Runtime Information
- Run a Clean Temporary Test Before Broad Changes
- Quick Fix Checklist
- Frequently Asked Questions
When mpv finishes one local video but does not automatically play the next file in the same folder, the player is usually behaving as designed. Opening a single file gives mpv a one-item playlist. mpv does not automatically scan that file's directory and enqueue neighboring media by default. To get folder autoplay, you must open multiple files, create a playlist, use a compatible frontend, or install a trusted folder-loading script. If one of those methods is already configured, the likely causes are script errors, conflicting input bindings, profile rules, path handling, permissions, or an unexpected file order. The steps below isolate those possibilities without requiring you to erase your configuration or change unrelated playback settings.

Start with free Canva bundles
Browse the freebies page to claim ready-to-use Canva bundles, then get 25% off your first premium bundle after you sign up.
Free to claim. Canva-ready. Instant access.
1. Confirm the Symptom With a Minimal Clean mpv Command
Start by separating ordinary mpv behavior from a broken folder-autoplay customization. Open a terminal, Command Prompt, or PowerShell window and run mpv with configuration loading temporarily disabled.
1.1 Test one file without your configuration
Use the appropriate command, replacing the example path with a real local file:
- Windows:
mpv.exe --no-config "C:\Media\Episode 01.mkv" - Linux:
mpv --no-config "/home/user/Media/Episode 01.mkv" - macOS:
mpv --no-config "/Users/user/Media/Episode 01.mkv"
Let the file finish or seek close to its end. If mpv exits instead of opening Episode 02, that result is expected. The command supplied only one playable item, and --no-config prevents scripts or configuration rules from adding more.
Success at this stage means the file plays normally and mpv exits cleanly at its end. Stop investigating codecs, HDR, subtitles, and hardware decoding if that is exactly what happens. You have confirmed a playlist-construction issue rather than a decoding failure.
1.2 Test multiple files explicitly
Next, pass two or more files to mpv in the desired order:
- Windows:
mpv.exe --no-config "C:\Media\Episode 01.mkv" "C:\Media\Episode 02.mkv" - Linux or macOS:
mpv --no-config "/path/Episode 01.mkv" "/path/Episode 02.mkv"
If the second file starts when the first ends, mpv's playlist progression works. Stop changing playback options. Your practical fix is to supply a multi-item playlist, configure your file manager to send multiple selected files, or add folder-scanning behavior through a script or frontend.
If playback stops even though both files were supplied, inspect terminal output and the playlist. The second file might be unreadable, unsupported, inaccessible, or interpreted incorrectly because of shell quoting.
2. Add Folder Autoplay Deliberately
There is no general mpv switch that means “whenever I open one file, scan its folder and play every neighboring media file.” Options that load associated files should not be confused with building a playlist from every video in a directory. Folder autoplay normally comes from an autoload-style Lua script, a graphical frontend, a file-manager action, or a playlist prepared before mpv starts.
2.1 Use an autoload-style script
An autoload.lua-style script detects the currently opened local file, scans its directory for selected media extensions, sorts matching entries, and appends them to mpv's playlist. This provides the behavior many users expect from television and music applications.
Only install a script from a source you trust, and read its documentation. Place it in mpv's user scripts directory, which is typically the scripts subdirectory of the active mpv configuration directory. Exact configuration locations vary by operating system and installation method, so confirm yours through mpv's documentation or startup output rather than guessing.
Restart mpv after installing the script and open a local file from a directory containing at least two supported files. Check the playlist through the console, your frontend, or an appropriate playlist-viewing binding. Success means neighboring files appear as playlist entries and the next one opens after the current file ends. Once that happens, stop editing unrelated settings.
If the script does not work, verify the following:
- The file uses the expected
.luaextension and was not saved as.lua.txt. - The script is inside the active configuration directory's
scriptsfolder. - The script supports the extensions you are testing.
- The input is a local file rather than an online URL or network stream the script intentionally ignores.
- Terminal output does not report a Lua syntax error or missing dependency.
- A second folder-loading script is not simultaneously modifying the playlist.
2.2 Use a frontend or file manager
Some mpv frontends implement their own “open next file in folder” feature. In that arrangement, the frontend scans the directory and sends playlist commands to mpv. Check the frontend's folder, playlist, queue, and autoplay preferences. A frontend update or reset can disable those preferences even though mpv itself still plays normally.
A file manager may also launch mpv with only the file you clicked. Selecting several files and choosing “Open with mpv” can create a multi-item invocation, but behavior depends on the file manager and its application command. If the selection order is wrong, use a saved playlist instead of relying on the file manager's ordering.
2.3 Create an explicit playlist
An explicit playlist is the most predictable test and often the simplest permanent solution. Create a UTF-8 text file such as episodes.m3u containing one path per line:
/home/user/Shows/Episode 01.mkv
/home/user/Shows/Episode 02.mkv
/home/user/Shows/Episode 03.mkv
On Windows, absolute paths can be listed similarly:
C:\Shows\Episode 01.mkv
C:\Shows\Episode 02.mkv
C:\Shows\Episode 03.mkv
Open it with mpv --playlist=episodes.m3u, quoting the playlist path if it contains spaces. Relative entries are convenient when the playlist remains beside the media, while absolute paths are easier to diagnose.
Success means mpv reports multiple playlist entries and advances in the listed order. This result proves that mpv autoplay works when it receives a real playlist.
3. Check Configuration, Profiles, Bindings, and Scripts
If explicit multi-file playback succeeds under --no-config but fails during normal use, something in your configuration environment is changing playlist behavior or terminating mpv.
3.1 Inspect mpv.conf and active profiles
Search mpv.conf and included configuration files for options related to playlists, looping, idle behavior, end-of-file handling, scripts, and profiles. In particular, distinguish these behaviors:
loop-filerepeats the current file and therefore prevents normal advancement while active.loop-playlistcontrols repetition of the playlist but does not discover neighboring files.idlecan keep the player open after the playlist ends, but it does not add another file.- Profiles can activate conditionally based on protocol, filename, resolution, or another property.
Use --show-profile=PROFILE_NAME to print a named profile's contents. Also check included files and conditional profiles if behavior changes only for HDR videos, online URLs, certain directories, or specific formats.
Temporarily comment out one suspicious option at a time. Do not delete the whole configuration folder. Success means normal startup with your reduced configuration behaves like the clean explicit-playlist test.
3.2 Check input.conf
A key binding can issue quit, replace the playlist, clear it, load another file, or run a script command. Search input.conf for bindings associated with the key you use to skip, close, or navigate.
Pay special attention to custom bindings for playlist-next, playlist-prev, loadfile, and script messages. If pressing your “next” key exits or does nothing, test the same playlist without pressing it. Natural end-of-file advancement and a broken manual binding are separate symptoms.
3.3 Isolate scripts
Scripts can append files, remove playlist entries, alter end-of-file behavior, or react to file-loaded events. Move only the suspected folder-loading script temporarily to a safe location outside the scripts directory, then retest. Alternatively, start mpv with --no-config and explicitly load one script if its documentation supports that testing method.
If two autoload scripts are installed, enable only one. Duplicate scripts can create repeated entries, unpredictable ordering, or playlist replacement. Reintroduce other scripts individually after folder autoplay works.
3.4 Avoid changing unrelated playback options first
Subtitle selection, audio-track choice, video-track choice, output drivers, shaders, screenshot settings, and hardware decoding normally do not determine whether mpv scans a directory. They become relevant only when the next item is present in the playlist but fails during loading or playback.
For example, a forced audio or subtitle track can be unavailable in the next file, but mpv will commonly fall back or report the selection problem. A failing GPU output, HDR shader, or hardware decoder can make the next video appear not to start even though playlist advancement occurred. Test with --no-config before diagnosing those subsystems.

4. Verify File Paths, Ordering, Permissions, and Media Limits
4.1 Quote paths correctly
Spaces, brackets, apostrophes, ampersands, and shell metacharacters can alter a command. Quote each path rather than quoting an entire multi-file command as one string. Shell wildcard expansion also differs among PowerShell, Command Prompt, Bash, and Zsh.
If a wildcard command produces unexpected results, print the generated paths first or create an M3U playlist. An explicit playlist removes uncertainty about which files were passed to mpv.
4.2 Understand file ordering
Folder order is not universally defined. A script might sort lexically, naturally, by modification time, or according to filesystem enumeration. Lexical ordering can place Episode 10 before Episode 2. Zero-padding names such as Episode 02 produces more predictable lexical ordering.
Do not assume the order shown in a graphical file manager is the order a script receives. Confirm the actual mpv playlist. If sequence matters, use a manually reviewed playlist.
4.3 Check access to the next file
Verify that your user account can read the next file and traverse its parent directories. On macOS, the terminal application or frontend may need permission to access protected folders. Sandboxed or packaged applications can also have narrower filesystem access than a terminal-launched mpv process.
Network shares may disconnect, sleep, or require authentication. Test by opening the supposed next file directly with --no-config. If it cannot play independently, fix that access or media problem before returning to autoplay.
4.4 Separate local folders from URLs and streams
An online URL has no local neighboring folder for mpv to scan. A website playlist must be supplied by the site extractor, yt-dlp integration, a frontend, or an explicit list of URLs. Network streams may be endless, so mpv never reaches an end-of-file event that would trigger the next playlist entry.
If yt-dlp is involved, test a local two-file playlist first. Then confirm that yt-dlp is installed through a trusted channel, available on the executable path, and able to process the URL independently. Do not treat an extractor or network failure as a folder-autoplay failure.
5. Use Logs and Runtime Information
Run mpv from a terminal so errors remain visible. Increase relevant logging and save it to a file when the failure is intermittent:
mpv --msg-level=all=v --log-file=mpv-folder-test.log --playlist=episodes.m3u
Verbose logs can contain local paths and URLs, so review them before sharing. Search near the end of the first file for playlist movement, file-loading messages, script errors, access failures, demuxer errors, and output initialization failures.
5.1 Inspect the playlist and tracks
The stats overlay, commonly opened with i under default bindings, helps confirm decoding and output details. Terminal output and frontend playlist displays are more useful for confirming whether another file is queued. Track information can reveal whether the second file loaded but has no selected video or audio track.
If the log shows the next filename followed by GPU, display-server, audio-backend, or hardware-decoder errors, playlist advancement is working. Narrow the test by removing custom shaders and trying software decoding with --hwdec=no. Change the video or audio output only when logs implicate that subsystem.
If the log never lists a second playlist item, focus on playlist creation, the folder-loading script, or the frontend. HDR settings, screenshots, subtitles, and codecs cannot load an item that was never queued.
6. Run a Clean Temporary Test Before Broad Changes
Use a temporary directory containing three short, known-good local files with simple names such as 01.mp4, 02.mp4, and 03.mp4. Avoid network shares, symbolic links, exotic characters, external subtitle files, and online resources during this test.
- Play
01.mp4with--no-configand confirm that mpv exits afterward. - Run mpv with all three filenames and confirm automatic advancement.
- Create an M3U containing all three files and test it.
- Start mpv normally and repeat the explicit-playlist test.
- Enable one folder-autoload script or frontend folder option and open only
01.mp4. - Confirm that all three files appear in the playlist in the expected order.
Stop as soon as the desired behavior works consistently. Reintroduce profiles, bindings, scripts, shaders, hardware decoding, subtitles, HDR processing, and IPC integrations one at a time only if you disabled them. This preserves a clear connection between each change and its result.
7. Quick Fix Checklist
- Remember that opening one file does not make stock mpv scan its folder.
- Test two explicit filenames with
--no-config. - Use an M3U playlist when order must be deterministic.
- Install one trusted autoload-style script if you want automatic folder scanning.
- Enable the relevant folder-playlist option when using a frontend.
- Check that the script supports the tested file extension.
- Remove duplicate folder-loading scripts.
- Check
loop-file, profiles, and custom end-of-file behavior. - Inspect
input.confif manual next-file navigation is broken. - Quote paths and verify the next file opens directly.
- Use terminal logs to distinguish a missing playlist item from a playback failure.
- Do not troubleshoot yt-dlp or HDR unless logs show the next item was actually loaded.
8. Frequently Asked Questions
8.1 Why does mpv close after one file?
If mpv was given one file, its playlist contains one item. When that item ends, the playlist is complete and mpv normally exits unless idle behavior is configured. Supply multiple files, open a playlist, or use a folder-loading script.
8.2 Is there an mpv option that automatically scans the current folder?
Folder scanning is commonly implemented through scripts or frontends rather than ordinary single-file playback. Do not assume options for associated or external files create a playlist of neighboring videos. Test an autoload-style script or generate an explicit playlist.
8.3 Why does the next-file key not work?
The command cannot advance when the playlist contains only one item. If multiple items are visible, inspect input.conf for a conflicting binding and check whether loop-file is active. Test natural end-of-file advancement separately from the keyboard shortcut.
8.4 Why are files playing in the wrong order?
Your script, shell, frontend, and file manager may use different sorting rules. Use zero-padded numbers or a reviewed M3U playlist. The order in mpv's actual playlist is the authoritative order.
8.5 Can subtitles, HDR, or hardware decoding stop autoplay?
They do not normally prevent folder discovery. However, they can cause the already-queued next file to fail during initialization. If logs show the next filename, test without configuration and, when appropriate, with --hwdec=no. If no next filename appears, return to playlist construction.
8.6 Does folder autoplay work for YouTube URLs or live streams?
A web URL is not part of a local folder, and a live stream may never end. Use an explicit URL playlist or supported extractor-provided playlist. Diagnose yt-dlp, authentication, and network access separately from local folder autoplay.