mpv-player / mpv

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

Support double-clicking Bluray on OS X #226

Closed tewe closed 9 years ago

tewe commented 11 years ago

Finder treats every folder called BDMV that contains an index.bdmv file as a package. Double-clicking those launches QuickTime, which just displays an error.

I used Platypus to assign the UTI public.avchd-collection (via LSItemContentTypes in Info.plist) to the shell script

mpv bd:// --bluray-device="`dirname "$1"`"

and can now simply double-click Blurays to play them. It'd be nice if that was built into the mpv application bundle.

ChrisK2 commented 11 years ago

oh yes, that would be nice.

pigoz commented 11 years ago

The problem is you would have to know somehow that the file you are opening is a BD to handle this accordingly. I will try to get a hold of a BDMV sample to see if something can be done.

tewe commented 11 years ago

You can ask LS for the UTI, or apply the heuristic I described.

PS actually I pass bd://1 bd://2 bd://3 bd://4 (none of my discs have more) so I can use the playlist keys to change titles

ghost commented 11 years ago

This pretty much would require recognizing whether something is a bluray image in mpv. If that is possible, a similar trick to ifo_stream_open() in stream_dvd.c could be used, or something similar. (The DVD one is a bit hacky...)

pigoz commented 10 years ago

I don't think I will ever work on this. Marking it as developer-needed so that 'Someone' hopefully picks it up.

tewe commented 10 years ago

I suppose the code has to be added in osdep/macosx_application.m handleFiles.

Anybody know how bluray_device is set in the command line version, without following the main() flow?

ghost commented 10 years ago

Ping?

tewe commented 10 years ago

I'm still using the same workaround as when I started the issue, now at https://github.com/tewe/Launch-Blu-Ray

I don't have the time to understand how command line mpv starts up, so I can't modify the Mac code.

ghost commented 10 years ago

Now mpv can automatically recognize BDMV dirs and directly open them.

tewe commented 10 years ago

You can drag folders onto the .app and it works. Nice!

But you cannot associate BDMV with mpv, so that they become double-clickable. The plist would need the UTI, and probably a change to the Cocoa code.