-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MKV Dolby Vision Support #7667
MKV Dolby Vision Support #7667
Conversation
Just for the sake of convenience, here is some test material with DV profile 5 and 8 (video only, no audio in the files): |
Great stuff @steffenmanden! I tested locally and ExoPlayer properly extracts the DV info. I'm working on cutting them down to the first few frames to be of a smaller file size so I can included them in this PR as test media. |
During the process of generating small enough MKV test media for this PR, I determined I needed to start from shorter mp4 test media as there isn't a current MKV editor that will properly handle Dolby Vision. I also noticed that ExoPlayer currently lacks Dolby Vision mp4 tests, even though it support Dolby Vision within mp4's already. I generated short mp4 test media from Dolby's public Dolby Vision sample's using Dolby's public mp4 muxer/demuxer and have included tests to validate them in this PR as well. If you take a look at the Will update again when MKV test media is included. Dolby's public Dolby Vision samples can be found here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! Unit tests for MKV would really be helpful. Hope you manage to generate test content :)
...y/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
Outdated
Show resolved
Hide resolved
...ry/extractor/src/test/java/com/google/android/exoplayer2/extractor/mp4/Mp4ExtractorTest.java
Outdated
Show resolved
Hide resolved
...y/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
Outdated
Show resolved
Hide resolved
...y/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java
Outdated
Show resolved
Hide resolved
just wanted to note that mkvtoolnix now supports DV data and therefore mkv testdata should be possible to make for the testcase |
@kim-vde Apologies for the delay. MKV test files have been added |
Thanks @willtrking. Do you confirm that the test assets have been generated from public content and can therefore be open-sourced? |
MediaInfo will be adding support for recognizing Dolby Vision inside MKV files in their next release: MediaArea/MediaInfo#478 (comment) Very excited for this PR as it's the missing piece of the Dolby Vision playback puzzle! Thanks so much @willtrking! |
Yes @kim-vde, as mentioned these were generated from Dolby's public samples at the link below https://developer.dolby.com/tools-media/sample-media/video-streams/dolby-vision-streams/ |
Hi @willtrking, I am afraid that it is not sufficient for the samples to be public in order to use them as test contents. My previous message was incorrect, sorry for that. We need to make sure that we are allowed by Dolby to modify the samples and add them to our tests. I don't think it is the case here (see the Terms of use). Maybe you know more about this? An alternative would be to use content that you own. |
The problem is that not just anyone can create Dolby Vision clips in something like iMovie—you need to apply for and purchase a plugin from Dolby in order to create Dolby Vision-enabled content and add it into a professional video editing suite, like Davinci Resolve. I imagine not many people outside of professional film editors have access to these tools. @willtrking I'm not familiar enough with the data structure of these video clips...is it possible to just munge the actual video content with random characters, but keep the DV metadata intact? If not, is there anything we can do for now to get the code merged until we can find public domain clips @kim-vde? Can @willtrking remove the tests that depend on the embedded video clips until we can replace them? |
I see @kim-vde Unfortunately I'm not really able to produce dolby vision content at home, at least easily or cheaply. I found open source dolby vision content from Netflix at the link below, but this content uses a version of the Creative Commons license that specifically states that any content that is altered may not be shared, and the content would need to be altered to make it small enough to be a reasonable test. https://opencontent.netflix.com/ I could simply remove the test media from the PR if that would be acceptable. |
@ybai001 Do you have any minimal Dolby Vision media we could add to the project to use for testing? Thanks! |
Munging the data is an interesting idea @cannikin, it may actually be possible to do using dolby's mp4 demuxer. If this worked, it would result in a final video final that contains a partial piece of the original Dolby Vision metadata from the dolby vision data linked above, plus a video I created. The file would, of course, still contain some amount of data that is covered by Dolby's Terms of Use as I cannot produce the Dolby Vision metadata on my own. I'm not enough of a licensing expert to know if that would be acceptable @kim-vde |
As far as i can see, no terms are listed for the LG demo files: |
@steffenmanden to my knowledge, that source (4kmedia.org) is not associated with LG, which would mean the content may have terms located elsewhere |
Another thing I thought about was reaching out to users in a thread like this https://liftgammagain.com/forum/index.php?threads/dolby-vision-and-textless.14828/ and see if someone that already has a license can help us out by generating some clips and giving them to us under something like the MIT license. |
Here's a post over at makemkv.com where someone created a 10 second DV file from scratch: https://makemkv.com/forum/viewtopic.php?p=95224&sid=7675e2b1d2b2d4e8f6ece2fd45ef0af1#p95224 They're not 100% sure it works because they don't have a device capable of playing DV, but it sounds like this PR should be able to test it! |
I merged the PR without the tests. The samples from LG cannot be used because we need a clear and specific license. And even if we find content that’s clearly licensed, we would probably need to change the structure of our code in order to include this license, which seems too much overhead. So I suggest we only add tests if the content is owned by the PR writer or is derived from content that is already in our test samples. Dolby Vision tests would still be very helpful (for MKV or for MP4) so, if you are able to generate such content, please open a new PR to add the tests. |
Thank you @kim-vde ! |
@willtrking I found some test samples that can be used (Dolby Vision.zip). Could you make one of them shorter, transcode it to Matroska and add MP4 and Matroska tests (or explain me how to do it)? Thanks! |
This adds in support for reading Dolby Vision data from MKV files per the modifications to the Matroska spec here ietf-wg-cellar/matroska-specification#390
This should address #7267