rixtox / mp4dovi

Change Dolby Vision codec in MP4 files from dvhe to dvh1 for Apple QuickTime conformance.
MIT License
110 stars 7 forks source link

Additing mp4dovi to homebrew #1

Closed wyq977 closed 2 years ago

wyq977 commented 2 years ago

Thx a lot for this useful tool. Now i can playback some DV files on macOS with ease.

I found this is quite a common problem with ppl using macos as many players dont support DV videos properly yet... See discussion: https://github.com/mpv-player/mpv/issues/7326, https://www.v2ex.com/t/698508, https://v2ex.com/t/783200

So I submit ur tool to homebrew, see PR here, hoping it will be approved and folks out there could use it if you dont mind.

But if you dont want it on homebrew I will close the PR.

BTW, I am not familar with video audio codec not to mention the profile DV has like: https://developer.dolby.com/platforms/apple/macos/os-support/, Detailed discussion: https://forum.makemkv.com/forum/viewtopic.php?t=18602&start=3450.

It seems to me that DV on macos only support profile 5, even tho I have no idea what that is

Thx again!

rixtox commented 2 years ago

I don't mind you submit it to Homebrew if you can.

iOS & macOS & tvOS all have CoreMedia & AVFoundation system libraries for media playback. Apps that use these libraries are likely to gain support for P5 and P8.4 Dolby Vision. Usually Apple's system apps use these libraries so TV.app and QuickTime would support the above Dolby Vision profiles. So does a few third party apps like Infuse also use these libraries.

Some other thrid party apps like VLC, nPlayer however, ships and use their own media playback libraires that doesn't support Dolby Vision.

For more about Dolby Vision profiles, you can read their official document: https://www.diversifiedvideosolutions.com/Dolby_Vision/Dolby_Vision_profiles_and_levels-Dolby_Laboratories.pdf

Note that P8.4 is a special level Dolby specifically developed it for Apple, which uses HLG OETF for better color on mobile devices.

In theory, dvhe and dvh1 should be equivalent, but somehow Apple prefers and only supports dvh1 for file playback, and it's been mentioned in this document: https://developer.apple.com/av-foundation/High-Dynamic-Range-Metadata-for-Apple-Devices.pdf

But strangely, if you convert your media into HLS streaming format, Apple would accept dvhe as well: https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices/hls_authoring_specification_for_apple_devices_appendixes

wyq977 commented 2 years ago

ty for the quick reply. Had to dig a bit further about the profiles later.

Regarding homebrew, it seems that they require a test case, despite its possible to just download a mp4 file and run it. Some metadata retrieval tools like ffmepg or exiftool are needed for validating if its dvh1 for the test case in homebrew ruby file.

I am not familar with go and I am not aware of ways to get a test case without using other tools for now.