Closed DReaper closed 2 months ago
To note, this issue is happening on the latest 7.1.1.0 version.
If I mount the iso file outside of mpv.net and open it through Open DVD/Blu-Ray Drive/Folder, it will playback fine. The issue is only if you attempt to direct play a DVD iso.
Looks like DVD iso handling was removed in newest version for some reason:
older mpv.net
handled this differently:
And unfortunately you can't use a lua script to handle this:
local function check_iso()
local path = mp.get_property("path")
local extension = string.match(path, "%.([^%.]+)$")
local extension = extension and extension:lower()
if extension == "iso" then
mp.register_event("end-file", function(event)
if event.reason == "error" then
if mp.get_property("bluray-device") == path then
mp.set_property("bluray-device", "")
mp.set_property("dvd-device", path)
mp.commandv("loadfile", "dvd://")
end
elseif mp.get_property("dvd-device") == path then
mp.set_property("dvd-device", "")
end
mp.unregister_event("end-file")
end)
mp.set_property("bluray-device", path)
mp.commandv("loadfile", "bd://")
iso_loaded=true
end
end
mp.register_event("file-loaded", check_iso)
mp.register_event("end-file", function(event)
if mp.get_property_bool("idle-active") then
if iso_loaded and (event.reason == "eof" or event.reason == "stop") then
mp.set_property("bluray-device", "")
mp.set_property("dvd-device", "")
iso_loaded=false
end
end
end)
because mpv.net
hijacks the iso loading instantly and the script never executes.
I was able to use MediaInfo to detect if the ISO file is DVD or Blu-ray, so this will be fixed in the next release.
public void LoadISO(string path)
{
using var mi = new MediaInfo(path);
if (mi.GetGeneral("Format") == "ISO 9660 / DVD Video")
{
Command("stop");
Thread.Sleep(500);
SetPropertyString("dvd-device", path);
LoadFiles(new[] { @"dvd://" }, false, false);
}
else
{
Command("stop");
Thread.Sleep(500);
SetPropertyString("bluray-device", path);
LoadFiles(new[] { @"bd://" }, false, false);
}
}
Describe the bug When playing a DVD .iso, it attempts to read it as a Blu-Ray, then fails to read. DVD playback has worked in older versions. I updated from 6.0.3.0, which worked. I am unsure if this broke in recent versions.
To Reproduce Click and drag any DVD .iso over to the player
Expected behavior In previous versions, a pop-up would ask whether it was a DVD or Blu-Ray. Selecting DVD would playback with no issues. This feature was implemented in 5.4.8.4 Beta
Additional context No issues with Blu-Ray playback, only DVDs.