Dolby Vision and 1.15.1

Please post here for issues related to UHD discs
Message
Author
Grencola
Posts: 343
Joined: Sun Jan 27, 2019 5:19 pm

Re: Dolby Vision and 1.15.1

#406 Post by Grencola » Sun May 17, 2020 9:36 pm

shawnc22 wrote:
Sun May 17, 2020 9:05 pm
When I tried the nightly a couple weeks ago, only single layer profile 5 was working. Profile 4/6 TS files were playing in hdr10 only.
Thanks for testing! I knew about profile 5 working, so was hoping it would extend to 4/6 as well. that's a shame, maybe p5 fel and color space will be properly converted soon.

I suppose 'Play Using' in Kodi and choosing MX Player would work for now though, no?

shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision and 1.15.1

#407 Post by shawnc22 » Mon May 18, 2020 6:34 am

Grencola wrote:
Sun May 17, 2020 9:36 pm
shawnc22 wrote:
Sun May 17, 2020 9:05 pm
When I tried the nightly a couple weeks ago, only single layer profile 5 was working. Profile 4/6 TS files were playing in hdr10 only.
Thanks for testing! I knew about profile 5 working, so was hoping it would extend to 4/6 as well. that's a shame, maybe p5 fel and color space will be properly converted soon.

I suppose 'Play Using' in Kodi and choosing MX Player would work for now though, no?
Just tried it and maybe I'm doing it wrong, but I just get a popup saying "click ok when playback has ended" and nothing happens. I double checked playercorefactory.xml to make sure that it had the same filename for mxplayer as the one I had installed, but still nothing.

Kolci
Posts: 10
Joined: Fri May 08, 2020 11:35 am

Re: Dolby Vision and 1.15.1

#408 Post by Kolci » Mon May 18, 2020 7:59 am

Hi, where can you get tsMuxeR which does dvhe.08.06?

anothermkvuser
Posts: 20
Joined: Fri Mar 27, 2020 10:38 pm

Re: Dolby Vision and 1.15.1

#409 Post by anothermkvuser » Mon May 18, 2020 12:56 pm

SamuriHL wrote:
Fri May 15, 2020 4:15 pm
anothermkvuser wrote:
Fri May 15, 2020 1:02 pm
SamuriHL wrote:
Mon May 11, 2020 6:32 pm
I always assumed the MKV might change given that there is currently no player support, so, for me I used the MKV rip as an intermediary to the TS files. I'm prepared to rerip again.
Just to share: INFUSE 6 DOES play MKV. https://firecore.com/infuse

Scroll to the bottom for file support:
3GP, AVI, ASF, BDMV, DIVX, DVDMEDIA, DVR-MS, FLV, ISO/IMG, M2TS, M4V, MKV, MOV, MP4, MPEG, MTS, MXF, OGM, OGV, TS, VIDEO_TS, WEBM, WMV, WTV

Currently a 4kUHD (Blade Runner 2049 for ex.) 1.15.1 MKV with DV/ATMOS = plays 4k HDR (not Dolby Vision), and the sound comes over as 7.1.

I have the app running on a 4k Apple tv. The app is actively updated and a solid platform choice if you have an apple tv.

My ¢2
This isn't about if a player supports MKV. See the part I bolded there? It means infuse is exactly like every other player that supports MKV. The issue is having a player that plays DV in an MKV container, for which there isn't any right now.
SamuriHL,

Thank you for clarifying that so succenctly.

anothermkvuser
Posts: 20
Joined: Fri Mar 27, 2020 10:38 pm

Re: Dolby Vision and 1.15.1

#410 Post by anothermkvuser » Mon May 18, 2020 1:01 pm

Epedemic wrote:
Fri May 15, 2020 2:23 pm
There is no disc version of Blade Runner 2049 with DV...
I stand corrected.

anothermkvuser
Posts: 20
Joined: Fri Mar 27, 2020 10:38 pm

Re: Dolby Vision and 1.15.1

#411 Post by anothermkvuser » Mon May 18, 2020 1:04 pm

olevelo wrote:
Fri May 15, 2020 3:49 pm
anothermkvuser wrote:
Fri May 15, 2020 1:02 pm
SamuriHL wrote:
Mon May 11, 2020 6:32 pm
I always assumed the MKV might change given that there is currently no player support, so, for me I used the MKV rip as an intermediary to the TS files. I'm prepared to rerip again.
Just to share: INFUSE 6 DOES play MKV. https://firecore.com/infuse

Scroll to the bottom for file support:
3GP, AVI, ASF, BDMV, DIVX, DVDMEDIA, DVR-MS, FLV, ISO/IMG, M2TS, M4V, MKV, MOV, MP4, MPEG, MTS, MXF, OGM, OGV, TS, VIDEO_TS, WEBM, WMV, WTV

Currently a 4kUHD (Blade Runner 2049 for ex.) 1.15.1 MKV with DV/ATMOS = plays 4k HDR (not Dolby Vision), and the sound comes over as 7.1.

I have the app running on a 4k Apple tv. The app is actively updated and a solid platform choice if you have an apple tv.

My ¢2
He meant there's no MKV player support for DV. There are plenty of apps that we're all aware of already for non-DV MKV.
Understood! No MKV player support with Dolby Vision playback. Thus using MKV rip as in intermediary format to TS file.

SamuriHL
Posts: 2324
Joined: Mon Jun 14, 2010 5:32 pm

Re: Dolby Vision and 1.15.1

#412 Post by SamuriHL » Mon May 18, 2020 1:27 pm

We'll get to where we want to be some day. Which is having a player that supports DV and ATMOS in MKV containers. That wasn't even a remote possibility only a few months ago. Now it's not only possible, but, there's a path to getting there. These are very exciting times and we owe a LOT of gratitude to the people who've been working diligently to make this all happen. A lot of time and effort has been poured into learning about Dolby Vision and the different profiles involved. Those people are to be commended for getting us to this point!

eladkse
Posts: 12
Joined: Fri Mar 20, 2020 2:34 pm

Re: Dolby Vision and 1.15.1

#413 Post by eladkse » Mon May 18, 2020 1:43 pm

Woodstock wrote:
Sat May 16, 2020 3:59 pm
I have nothing with DV content, so I cannot test this, but...

With 3D content, there is a selectable "MVC" track you can disable. Maybe the same is available for DV?

Click on the triangle next to the main title in the left menu, and expand the list of tracks within it. Is there a DV track listed? If so, you can un-check that to leave it unripped.
Thanks for the suggestion, but as mentioned by another poster, this isn't the case for DV.

It would be ideal to have it this way though.

box4m
Posts: 68
Joined: Tue Sep 10, 2019 7:23 pm

Re: Dolby Vision and 1.15.1

#414 Post by box4m » Mon May 18, 2020 4:17 pm

anothermkvuser wrote:
Mon May 18, 2020 1:01 pm
Epedemic wrote:
Fri May 15, 2020 2:23 pm
There is no disc version of Blade Runner 2049 with DV...
I stand corrected.
really?

Grencola
Posts: 343
Joined: Sun Jan 27, 2019 5:19 pm

Re: Dolby Vision and 1.15.1

#415 Post by Grencola » Mon May 18, 2020 5:12 pm

shawnc22 wrote:
Mon May 18, 2020 6:34 am
Grencola wrote:
Sun May 17, 2020 9:36 pm
shawnc22 wrote:
Sun May 17, 2020 9:05 pm
When I tried the nightly a couple weeks ago, only single layer profile 5 was working. Profile 4/6 TS files were playing in hdr10 only.
Thanks for testing! I knew about profile 5 working, so was hoping it would extend to 4/6 as well. that's a shame, maybe p5 fel and color space will be properly converted soon.

I suppose 'Play Using' in Kodi and choosing MX Player would work for now though, no?
Just tried it and maybe I'm doing it wrong, but I just get a popup saying "click ok when playback has ended" and nothing happens. I double checked playercorefactory.xml to make sure that it had the same filename for mxplayer as the one I had installed, but still nothing.
it should be something like this:

Code: Select all

<playercorefactory>
    <players>
        <player name="MXPlayerPro" type="ExternalPlayer" audio="false" video="true">
            <filename>com.mxtech.videoplayer.pro</filename>
            <hidexbmc>true</hidexbmc>
            <playcountminimumtime>120</playcountminimumtime>
        </player>
    <rules action="prepend">
        <rule filetype ="ts" player="MXPlayerPro"/>
    </rules>
</playercorefactory>

shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision and 1.15.1

#416 Post by shawnc22 » Mon May 18, 2020 5:49 pm

Grencola wrote:
Mon May 18, 2020 5:12 pm
shawnc22 wrote:
Mon May 18, 2020 6:34 am
Grencola wrote:
Sun May 17, 2020 9:36 pm

Thanks for testing! I knew about profile 5 working, so was hoping it would extend to 4/6 as well. that's a shame, maybe p5 fel and color space will be properly converted soon.

I suppose 'Play Using' in Kodi and choosing MX Player would work for now though, no?
Just tried it and maybe I'm doing it wrong, but I just get a popup saying "click ok when playback has ended" and nothing happens. I double checked playercorefactory.xml to make sure that it had the same filename for mxplayer as the one I had installed, but still nothing.
it should be something like this:

Code: Select all

<playercorefactory>
    <players>
        <player name="MXPlayerPro" type="ExternalPlayer" audio="false" video="true">
            <filename>com.mxtech.videoplayer.pro</filename>
            <hidexbmc>true</hidexbmc>
            <playcountminimumtime>120</playcountminimumtime>
        </player>
    <rules action="prepend">
        <rule filetype ="ts" player="MXPlayerPro"/>
    </rules>
</playercorefactory>
Yep that's what I have except for the free version. I also went a bit further with the rules to default everything to MXPlayer. I know the configuration's getting picked up because it's trying to launch an external player, but nothing's happening except for the popup. I wonder if there're additional arguments that I have to pass to the player block to get it working

Grencola
Posts: 343
Joined: Sun Jan 27, 2019 5:19 pm

Re: Dolby Vision and 1.15.1

#417 Post by Grencola » Mon May 18, 2020 7:44 pm

shawnc22 wrote:
Mon May 18, 2020 5:49 pm
Yep that's what I have except for the free version. I also went a bit further with the rules to default everything to MXPlayer. I know the configuration's getting picked up because it's trying to launch an external player, but nothing's happening except for the popup. I wonder if there're additional arguments that I have to pass to the player block to get it working
on my firestick I have to launch mx player first before launching kodi so that it's running in the background. for some reason kodi doesn't want to perform a fresh start, but seems ok to call on it from the background.

shawnc22
Posts: 637
Joined: Tue Jan 21, 2020 7:40 am

Re: Dolby Vision and 1.15.1

#418 Post by shawnc22 » Mon May 18, 2020 9:06 pm

Grencola wrote:
Mon May 18, 2020 7:44 pm
shawnc22 wrote:
Mon May 18, 2020 5:49 pm
Yep that's what I have except for the free version. I also went a bit further with the rules to default everything to MXPlayer. I know the configuration's getting picked up because it's trying to launch an external player, but nothing's happening except for the popup. I wonder if there're additional arguments that I have to pass to the player block to get it working
on my firestick I have to launch mx player first before launching kodi so that it's running in the background. for some reason kodi doesn't want to perform a fresh start, but seems ok to call on it from the background.
I made sure mxplayer was still running the background, but still no go either. I'll install VLC player later just to see if it can launch an external player at all, or is it just an issue with mxplayer.

edit: Figured out the problem, it was because I was trying to play a file over an smb share. I thought browsing to the file in Kodi might get around that limitation in mxplayer, but guess not. Playing a local file works, but looks like the latest mxplayer update (5-11) broke DV playback. The same file that I had tested with weeks ago is playing in hdr10 only now, oh well.

QuillzToxic
Posts: 5
Joined: Fri Jan 25, 2019 8:37 pm

Re: Dolby Vision and 1.15.1

#419 Post by QuillzToxic » Mon May 18, 2020 11:35 pm

I managed to get the ts file running in mxplayer using my DLNA server, however it is very stuttery and then crashes on the Sheild TV Pro 2019, any ideas?

Mediainfo:
Image

yusesope
Posts: 221
Joined: Sun Jul 28, 2019 3:34 am

Re: Dolby Vision and 1.15.1

#420 Post by yusesope » Tue May 19, 2020 5:14 pm

Hello guys!
Today I had two hours free so I took a look at the ExoPlayer code.

I state that I do not program in Java, I do not know how the MKV container is structured (until now I did not know what "CodecPrivate" was) and I do not have an Android device capable of playing movies in 4K and especially with Dolby Vision.

The written code is clearly ugly AF but it does its dirty job (you can't expect more from one who writes lines of code as a hobby).
In the LogCat, I read:

Code: Select all

com.google.android.exoplayer2.demo D / EventLogger: [] Track: 0, id = 1, mimeType = video/dolby-vision, codecs = dvhe.07.06, res = 3840x2160, supported = NO_UNSUPPORTED_TYPE
I think I did it but I can't continue with the code debugging because my device doesn't have the correct hardware decoder.

So Programmers take one step forward (if you clearly own a new Shield 2019).
  1. Clone the ExoPlayer source code (HERE) and install Android Studio (HERE)
  2. Before you start, edit the media.exolist.json file (ExoPlayer-release-v2\demos\main\src\main\assets\) as follows:

    Code: Select all

    [
      {
        "name": "Dolby Vision inside the MKV container",
        "samples": [
          {
            "name": "Test File",
            "uri": "http://IP_ADDR:PORT/TEST_FILE.mkv",
            "extension": "mkv"
          }
        ]
      }
    ]
    Clearly replace the IP_ADDR, PORT and TEST_FILE.mkv entries and set up an HTTP server on your PC. You can use whatever you want (Apache, Nginx, etc ...). The simplest solution is to open a command window inside the folder that contains the file to be tested and run:

    Code: Select all

    python -m http.server 
    If you downloaded my tool you can use the interpreter present in the "python-3.7.6.amd64" folder.
    Be careful though: if you use the Python server, do your tests with small files (60 sec). The server does not support partial requests (Byte-range request) so you would have to download dozens of GB of data before starting playback.
  3. HERE you will find the archive with the three files that I modified.
    Replace

    Code: Select all

    ExoPlayer-release-v2\library\core\src\main\java\com\google\android\exoplayer2\video\HevcConfig.java
    ExoPlayer-release-v2\library\core\src\main\java\com\google\android\exoplayer2\extractor\mkv\MatroskaExtractor.java
    ExoPlayer-release-v2\demos\main\src\main\AndroidManifest.xml
    with those in the archive.
  4. Now open Android Studio, Import Project (Gradle, etc ...), select the folder "ExoPlayer-release-v2", wait for the IDE to finish its configuration and then start a debug session or directly build an apk (demo app) to be installed on the Shield.

The basic idea is to emulate the behavior of the "parseVideoSampleEntry" method in the "AtomParsers" class (ExoPlayer-release-v2\library\core\src\main\java\com\google\android\exoplayer2\extractor\mp4\AtomParsers.java).
In particular:

Code: Select all

else if (childAtomType == Atom.TYPE_dvcC || childAtomType == Atom.TYPE_dvvC) {
  DolbyVisionConfig dolbyVisionConfig = DolbyVisionConfig.parse(parent);
  if (dolbyVisionConfig != null) {
    codecs = dolbyVisionConfig.codecs;
    mimeType = MimeTypes.VIDEO_DOLBY_VISION;
  }
}

From what I understand mike has positioned the Atom boxes that interest us within the CodecPrivate area.
So, inside the MatroskaExtractor class I added the "findDolbyVisionBox" method.

Code: Select all

private byte[] findDolbyVisionBox(byte[] codecPrivate) {
  byte[] dvccBox = {100, 118, 99, 67};
  byte[] dvvcBox = {100, 118, 118, 99};
  byte[] emptyBox = {};
  byte[] boxSize = new byte[4];
  ArrayList<byte[]> DolbyVisionBoxesType = new ArrayList<byte[]>(
      Arrays.asList(dvccBox, dvvcBox)
  );
  for (int indexBoxType = 0; indexBoxType < DolbyVisionBoxesType.size(); indexBoxType++) {
    byte[] boxType = DolbyVisionBoxesType.get(indexBoxType);
    for (int pos = 0; pos <= codecPrivate.length - boxType.length; pos++) {
      int j = 0;
      while (j < boxType.length && codecPrivate[pos + j] == boxType[j]) {
        j++;
      }
      if (j == boxType.length) {
        System.arraycopy(codecPrivate,pos - boxSize.length, boxSize, 0, boxSize.length);
        byte[] boxContent = new byte[ByteBuffer.wrap(boxSize).getInt()];
        System.arraycopy(codecPrivate,pos + boxType.length, boxContent, 0, boxContent.length);
        return boxContent;
      }
    }
  }
  return emptyBox;
}
The latter searches for one of the boxes of interest and if one is found it calculates the size and returns the content (otherwise an empty box is returned)
I used the new method inside "initializeOutput".
At the point where the configuration for the HEVC stream is initialized ("case CODEC_ID_H265:") I added:

Code: Select all

byte[] dolbyVisionBoxContent = findDolbyVisionBox(codecPrivate);
if (dolbyVisionBoxContent.length > 0) {
  DolbyVisionConfig dolbyVisionConfig = DolbyVisionConfig.parse(new ParsableByteArray(dolbyVisionBoxContent));
  if (dolbyVisionConfig != null) {
    codecs = dolbyVisionConfig.codecs;
    mimeType = MimeTypes.VIDEO_DOLBY_VISION;
  }
}

I have doubts:
  • Is there a better way to parse "CodecPrivate"?
    On-line I have not found anything about it.
  • I realized that the "HevcConfig" class finishes analyzing codecPrivate right in correspondence of the dvcC box. So I modified the "HevcConfig" class to set the "dataPos" field i've added with the last buffer position at the end of the codecPrivate parsing.
    With the last known position it is much easier to analyze the remaining part of codecPrivate: I created the "logMyDoubts" method which is equivalent to "findDolbyVisionBox" but much more efficient (returns an error log visible in LogCat).

    Code: Select all

        private void logMyDoubts(byte[] codecPrivate, int buffPos){
          int lengthUnprocessedData = codecPrivate.length - buffPos;
          byte[] unprocessedData = new byte[lengthUnprocessedData];
          System.arraycopy(codecPrivate, buffPos, unprocessedData, 0, unprocessedData.length);
          ParsableByteArray unprocessedDataParsableByteArray = new ParsableByteArray(unprocessedData);
          int boxSize = unprocessedDataParsableByteArray.readInt();
          String boxType = unprocessedDataParsableByteArray.readString(4);
          byte[] boxContent = new byte[boxSize - 8];
          unprocessedDataParsableByteArray.readBytes(boxContent,0,boxContent.length);
          Log.e("yusesope msg",String.format("I've found %s",boxType));
        }
    I don't know if the behavior I have observed is always reproducible:
    mike, do the atom boxes just follow one after another until the end of codecPrivate?
  • The hvcE box was not taken into consideration by the developers of ExoPlayer. We have to understand how to use it!

Post Reply