mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.02k stars 2.88k forks source link

Support DVD menus #14370

Open Igetin opened 3 months ago

Igetin commented 3 months ago

Expected behavior of the wanted feature

Mpv should support viewing/browsing DVD menus. This should work when reading a disc directly, as well as when opening a VIDEO_TS directory. Ideally, both mouse and keyboard navigation should work. For example, VLC supports all these use cases.


I am aware of the wiki FAQ entry for DVD menus. The entry was written in 2019, and by a developer no longer associated with the project. The last (now closed) issue about this is also from over four years ago.

So, I'm opening this feature request since there does not already seem to be an open issue to track it. And I'm wondering whether the situation is still the same.

Marth64x commented 2 months ago

DVD is a difficult format to work with and the libraries are very old. If a particular menu has value for you, you can actually demux it with ffmpeg now but you will need to know the coordinates of the menu (which I admit is not user-friendly to find or list right now).

Play with mpv (example, menu PGC#18 in VTS#1): ./mpv/build/mpv --demuxer-lavf-o-add=menu=1 --demuxer-lavf-o-add=menu_vts=1 --demuxer-lavf-o-add=pgc=18 "av://dvdvideo:MyDVD.iso"

Extract from DVD: ffmpeg -f dvdvideo -menu 1 -menu_vts 1 -pgc 18 -i MyDVD.iso -c copy MyMenu.mkv

I have found that outside of using menus to figure out which title is which in a complex DVD, the only practical value they usually add is background music or some gallery features (which you can extract with ffmpeg now)

Igetin commented 2 months ago

Does the mpv/FFmpeg thing work with extracted DVDs (just a VIDEO_TS folder, no ISO)? And how does one figure out the coordinates of the menu?

My personal issue is the navigation specifically.

I have Disney DVDs that contain dozens and dozens of old animated short films. The DVD menu has nice features like listing the films in alphabetical or chronological orders. Much nicer than playing a guessing game with the extracted VOB files (and then you also need to know which point you should seek into to find a specific short).

VLC does this fine, but mpv is my preferred player, so I just think it would be nice to have the same functionality there.

Marth64x commented 2 months ago

Does the mpv/FFmpeg thing work with extracted DVDs (just a VIDEO_TS folder, no ISO). And how does one figure out the coordinates of the menu?

Yes, it accepts all structures dvdread accepts (VIDEO_TS folder, ISO, actual drive, ...). There are bugfixes and improvements on the way to further improve the demuxer in other ways.

Right now the best way to identify the menu coordinates is to use PgcDemux or PgcEdit, the tools work in WINE.

My personal issue is the navigation specifically.

If DVD is extracted to say, MKV, one title at a time and labeled, one can navigate to chosen segment via filesystem and should never have to deal with the menu again.

mlindner commented 2 months ago

I'll second this and also suggest that bd menus should be added as well. There's been tons of requests to add bluray/dvd menus back.

MPV originally supported bluray and dvd menus but support was stripped out by wm4 because he hated it. (Similar to how he hated many good things. To wm4 if it was something he didn't personally use then it was bad. )

Perhaps this old code can be brought back again. Here's the pull request from when bluray menu support was added: https://github.com/mpv-player/mpv/pull/676 And then bluray and dvd menu support was stupidly removed by wm4 here in these four commits: https://github.com/mpv-player/mpv/commit/f792f56440c33fae4f027518fe999daa9e8d3771 https://github.com/mpv-player/mpv/commit/1ef7820e6e2a581ee0c3f4b5e4086b8d2f95945e https://github.com/mpv-player/mpv/commit/c844d57489fa83c0db66f84285ca1c07f6c71c6b https://github.com/mpv-player/mpv/commit/525ada8c7ac69da5bb0c1977f519ff40c4390b4a

mlindner commented 2 months ago

Does the mpv/FFmpeg thing work with extracted DVDs (just a VIDEO_TS folder, no ISO). And how does one figure out the coordinates of the menu?

Yes, it accepts all structures dvdread accepts (VIDEO_TS folder, ISO, actual drive, ...). There are bugfixes and improvements on the way to further improve the demuxer in other ways.

Right now the best way to identify the menu coordinates is to use PgcDemux or PgcEdit, the tools work in WINE.

My personal issue is the navigation specifically.

If DVD is extracted to say, MKV, one title at a time and labeled, one can navigate to chosen segment via filesystem and should never have to deal with the menu again.

Menus are part of the experience of using a bluray format and that should be kept.

Marth64x commented 2 months ago

Menus are part of the experience of using a bluray format and that should be kept.

Of course they are. But they're a hassle to implement and deal with for both DVD and BD formats. To each their own, but one can demux the disc features to meaningfully labeled Matroska files and organize with file system...

llyyr commented 2 months ago

Menus are part of the experience of using a bluray format and that should be kept.

You're welcome to contribute the code in a way that's not invasive to the core and maintain it

kasper93 commented 1 month ago

Menus are part of the experience of using a bluray format and that should be kept.

Of course they are. You can buy standalone blu-ray player for very cheap to get full experience. Menus are interface optimized for certain input method / viewing environment.

As for mpv, patches welcome. We always welcome new contributions, especially for such high requested feature.

not invasive to the core

This is not fully the only reason it were removed. I've looked at history and wm4 removed way more than necessary, if it were a truly code quality issue. Maybe he just didn't like disc formats or had another motives, I don't know. But lots of navigation featured for dvd/bd were removed for no good reason. Not saying full menu support, but just jumping through titles/angles and so on. This could be very easily re-implemented. Like I said contributions are welcome. I'm sure there are people willing to work on this, right?

Marth64x commented 1 month ago

I'm sure there are people willing to work on this, right?

I am planning to add ability to list playable artifacts (titles, angles, etc.) to ffmpeg demuxer, but it will take some time and has a chance to be rejected. But as seeking is done now (pending patch review cycle), that is my next and probably final feature goal for the demuxer.

kasper93 commented 1 month ago

I am planning to add ability to list playable artifacts (titles, angles, etc.) to ffmpeg demuxer

mpv already has own demuxer, that works good and even reads those, but after removal few years back it is not exposed to user control.