Closed stax76 closed 2 months ago
console.lua simply ignores these https://github.com/mpv-player/mpv/blob/master/player/lua/console.lua#L1775-L1779
I don't know if we should be overflowing all the time though
I didn't realize there is a recursion issue in this code. Going for a walk or taking a break sometimes helps.
I thought using print instead of msg will solve the issue, it still happens.
I will try writing the log processing code without debug printing or append the debug messages to a debug-ouput.txt
text file instead.
You can use io.write()
.
I tried that before, and it didn't work, maybe I was doing something wrong. It turned out my code was very simple, and I didn't need debug printing for it.
local BluRayTitles = {}
mp.enable_messages("info")
mp.register_event('log-message', function(e)
if e.prefix ~= "bd" then
return
end
if contains(e.text, " 0 duration: ") then
BluRayTitles = {}
end
if contains(e.text, " duration: ") then
local match = string.match(e.text, "%d%d:%d%d:%d%d")
if match then
table.insert(BluRayTitles, match)
end
end
end)
What also works is using the run input command and this tool:
mpv Information
Other Information
Reproduction Steps
Lua script:
Command line:
mpv --config=no --quiet --geometry=99%:11% --script='D:\Projects\LUA\mpv-scripts\test.lua' --log-file=E:\Desktop\mpv-log.txt 'E:\Video\Movie\Und täglich grüßt das Murmeltier - 1993.mkv'
Terminal output:
Expected Behavior
Receiving messages with log level info.
Actual Behavior
Receiving only overflow messages.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.