mpv
mpv copied to clipboard
Playback hangs when loadfile input command is used from script
mpv Information
mpv v0.40.0-61-g44816ef8f Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Apr 13 2025 13:53:36
libplacebo version: v7.350.0 (v7.349.0-65-g2bd627f8)
FFmpeg version: N-119224-gbf327ac676
FFmpeg library versions:
libavcodec 62.0.101
libavdevice 62.0.100
libavfilter 11.0.100
libavformat 62.0.100
libavutil 60.1.100
libswresample 6.0.100
libswscale 9.0.100
Other Information
- Linux version: Ubuntu 24
- GPU Model: NVIDIA GT 1030
- Window Manager and Version: Gnome X11
- Source of mpv: mpv-build current master
- Latest known working version: v0.39
Reproduction Steps
When I call loadfile from script from key binding, the video file opens, but it doesn't play, it hangs at position 0, the play/pause button indicates it's playing, nothing happens when pressing the button, it starts playing when the seek bar is clicked.
It works correctly when I call loadfile from the console.
The logic of the code is to cycle pause if the playlist isn't empty, if the playlist is empty, a defined video folder is loaded.
It worked with v0.39.
The code:
mp.register_script_message("cycle-pause", function ()
local count = mp.get_property_number("playlist-count")
if count > 0 then
mp.command("cycle pause")
else
if is_windows then
mp.command("loadfile 'E:\\Video\\YouTube'")
else
mp.command("loadfile '/mnt/Media/Video/YouTube'")
end
end
end)
Expected Behavior
Video file plays.
Actual Behavior
Video playback hangs.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- [x] I tested with the latest mpv version to validate that the issue is not already fixed.
- [x] I provided all required information including system and mpv version.
- [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [x] I attached the full, untruncated log file.
- [x] I attached the backtrace in the case of a crash.
Might be related to
[ 2.951][d][vo/gpu] Resizing texture: 2304x1296
[ 2.951][d][vo/gpu/libplacebo] Allocating 12976128 memory of type 0x1 (id 7) in heap 0: unknown
[ 2.952][e][vo/gpu/libplacebo] Allocation of size 12M failed: VK_ERROR_OUT_OF_DEVICE_MEMORY!
Do you have RBAR enabled? Does it also happens with --gpu-api=opengl?
Do you have RBAR enabled?
No
Does it also happens with
--gpu-api=opengl?
Yes
It happens with v0.39 too, I notice now. A system change I did today was:
sudo apt install libshaderc-dev
My NVIDIA GT1030 card has only 2 GB memory.