-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoload.lua Loads files incorrectly and behaves erratically #5618
Comments
Maybe a log file with the script actually doing some work, preferably? |
Ah, my bad. Here is an update. I have a folder with 64 video files, the name syntax is normal. Example: Same behavior as I mentioned earlier, all with the same file extension and normal file names. Log file:Preview of behavior: (Screen Capture - MP4 - 1.7 MB)As you can see from the preview, when I playnext on 03 it starts 03 again and the playlist becomes bigger, if I keep triggering play next a few times, same thing happens again. |
Just wanted to add a note, this behavior isn't constant in all folders. By that I mean, in other folders/files it behaves normally. Not sure if that would be of any help identifying the issue. Edit:Also tested on Debian Stretch, mpv 0.27.2 (deb-multimedia). Same behavior. Can upload screen capture for this as well if needed. |
Is drive Y: maybe a network mount? |
It is, yes. Since you implied it could be a network mount issue, I copied that folder to my E: drive (HDD), and the problem didn't occur. Everything works well. I guess this happens over network mounts. (tested on Windows 10 and Debian Stretch) Any suggested solution? Or do you need me to provide more information? |
Run this version of autoload with log-file as well. I can't reproduce it here. |
Done. Problem still occurs. Log file: https://0x0.st/smGg.txt |
Also, just in case, this is my mpv.conf. |
Could you run this version? Should be the last one needed. |
Done. Problem still occurs. I'm up for testing as many files as you'd need. If this is a problem not just isolated to me, I'll gladly help. |
Wait, nevermind, files are already sorted, but for some reason when you change to episode 04 it thinks it's still in position 3. Run this version again, please. |
Still occurs. The behavior is really odd. When I start the first file, the playlist only consists of that file (1/1). When I trigger play next the playlist then gets generated correctly in the correct position (2/64). When I reach the third file (fourth on Linux) the playlist gets bigger, from 64 to 128, 187 and so on. |
I wonder if it's because you move to the next playlist item before the script finishes. It takes a whole second to run |
Aha. You are absolutely right. I tested with the latest autoload.lua you posted and the unmodified stable one, works on both. Waiting 3-4 seconds between each file before triggering "play next" makes autoload.lua behave normally. I have no idea if this matters, but I'm on a Gigabit network, read/write speeds from that NAS averages around 600Mbps (60MB). Does that mean I need to find a way to optimize my mounts specifically for mpv/autoload.lua? |
Both work perfectly, problem is fixed completely. Which one do you think I should stick with? Also, do you need the log files for those as well? Side note, have to say, thanks so much for the response time and the effort. I'm beyond impressed, |
No need for logfiles, thanks for testing. I went with the first one. Less changes and less global variable usage. |
Overall, just shuffled code around and added a few debugging messages for future issues. The issue could be reproduced easily by quickly navigating through the playlist inside a network mount. Closes mpv-player#5618
The screenshot doesn't specify what version you're using. |
I'm using version 0.29.0-88-317d3ac266 in Windows, in windows also i'm having same issue. Thanks, |
Linux version - git-2018-07-22-45beb70 |
mpv version and platform
mpv 0.28.0 on Windows 10 x64
Reproduction steps
Have autoload.lua active and place video files in a folder with different names and extensions, for example:
Expected behavior
Video files would play one after the other, in order.
Actual behavior
Random order of playing, and the same files are appended over and over to the playlist if you keep triggering "play next" a few times. So let's say the folder contains 300 video files, with "play next" a few times, it plays in random order or completely restarts order, then the playlist will indicate that it now contains 600 entries, then 900 and so on.
I keep track of playlist by displaying
${playlist-pos-1}/${playlist-count}
in the OSD.Log file
https://paste.ubuntu.com/p/SKJfRNCd4G/
autoload.lua
Currently using the latest stable release of autoload.lua, unmodified.
Further explanation:
The reason I listed examples of the filenames is because I'm not really sure what's causing the problem, different extensions, specific characters used in filenames, the number of files or a mixture of all.
I've tried to represent some of the weird filenames exactly because there are definitely weirdly named files in there, though the total files is 305 in one of my folders, but it occurs in other folders as well with more files.
The text was updated successfully, but these errors were encountered: