• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Off Topic General Discussion MP4 with Dolby Vision to MKV

     
    • 0 Vote(s) - 0 Average

    MP4 with Dolby Vision to MKV

    Cannikin
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    Country:United States
    #1
    2024-03-05, 06:33 PM (This post was last modified: 2024-03-07, 05:23 PM by Cannikin. Edited 3 times in total.)
    Solved! See below

    Every search on Google for this topic seems to return the opposite problem: someone with an MKV with DV trying to turn it into an MP4.

    I've got plenty of MKV files with Dolby Vision, ripped with MakeMKV. But now I've got an MP4 file with DV and want to turn it into an MKV to go with the rest of my collection. When I run a typical ffmpeg command to change containers, I get an error:

    Code:
    ffmpeg -i movie.mp4 -map 0 -c copy movie.mkv
      [standard ffmpeg verbose output...]
    [matroska @ 0x11e028400] Tag dvh1 incompatible with output codec id '173' ([0][0][0][0])
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input
    Error initializing output stream 0:2 --

    I've seen that when doing the opposite people are using a -strict unofficial flag, but that didn't make a difference for me.

    The stream identifier looks like:

    Code:
    Stream #0:0(und): Video: hevc (Main 10) (dvh1 / 0x31687664), yuv420p10le(pc), 1920x1080 [SAR 1:1 DAR 16:9], 6829 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 23.98 tbc (default)
        Metadata:
          creation_time  : 2024-03-02T05:05:29.000000Z
          handler_name    : VideoHandler
          vendor_id      : [0][0][0][0]
          encoder        : DOVI Coding
        Side data:
          DOVI configuration record: version: 1.0, profile: 5, level: 3, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0

    Thanks for any help!

    Solved!

    Turns out MKVToolNix can work with MP4 files! Opening the .mp4 in the GUI and then just hitting "Start Multiplexing" actually worked: the resulting .mkv file plays with Dolby Vision on the Nvidia Shield and my LG G1. Opening the file in VLC shows a green tint, but I don't watch them in VLC!
    bitmap
    Offline

    Community Moderator

    Posts: 835
    Threads: 9
    Joined: 2023 Jul
    Reputation: 27
    #2
    2024-03-07, 01:36 PM
    What version of ffmpeg are you running? I don't see any documentation that suggests official DV support for any version, codec, or container.

    Every single time I've searched for how to handle DV, the only recommendation I've found is to use a project called something like dovi tool to extract the metadata and hevc, ffmpeg to re-mux, and mkvtoolnix to re-insert the metadata. I haven't gone through the process because I'm using AV1, which I'm unsure of actual DV support though I'm faking it by copying over the video metadata when I encode.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #3
    2024-03-07, 05:01 PM
    Dolby Vision Profile 5 HAS to be in MP4. You would need to use dovi_tool first to convert DV5 to DV8, which can then be placed in a MKV container.

    https://github.com/quietvoid/dovi_tool

    "Conversion mode 3" converts profile 5 to 8.1.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Cannikin
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Mar
    Reputation: 0
    Country:United States
    #4
    2024-03-07, 05:10 PM (This post was last modified: 2024-03-07, 05:15 PM by Cannikin. Edited 4 times in total.)
    Thanks for the replies!

    Yesterday on Reddit someone replied with "just use MKVToolNix" and it kind of warped my brain—I thought the MKVToolNix tools only worked with MKV files, I didn't realize it could operate on anything else, like an MP4. But sure enough I opened the MP4 in the GUI, hit Start Multiplexing, and the MKV that came out the other end had DV encoded!

    When I played that MKV in VLC it has the greenish tint, but is perfectly fine in my home theater setup (Nvidia Shield and an LG C1) so I'm pretty happy!

    Here's the original MP4 info from MediaInfo:

    Code:
    Video
    ID                                      : 1
    ID in the original source medium        : 4113 (0x1011)
    Format                                  : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                          : Main 10@L5.1@High
    HDR format                              : Dolby Vision, Version 1.0, Profile 7.6, dvhe.07.06, BL+EL+RPU, Blu-ray compatible / SMPTE ST 2086, Version HDR10, HDR10 compatible
    Codec ID                                : V_MPEGH/ISO/HEVC


    And the resulting MKV:

    Code:
    Video
    ID                                      : 1
    Format                                  : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                          : Main 10@L5.1@Main
    HDR format                              : Dolby Vision, Version 1.0, Profile 5, dvhe.05.06, BL+RPU
    Codec ID                                : V_MPEGH/ISO/HEVC

    Note Profile 5 here, whereas MKVs that I rip with MakeMKV show Profile 7.6. But again, they seem to play properly on the Shield. According to a random person on Reddit:

    Quote:Profile 5 is what the Shield was designed to play. This is what streaming services use. Profile 8 is not a film industry standard. It is converted from profile 7 or 5. It is used mostly to support media players that cannot play profile 7 at all. The Shield does play profile 7 RPU so converting will make no difference.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2024-03-07, 08:14 PM (This post was last modified: 2024-03-07, 08:14 PM by TheDreadPirate.)
    As I stated, Dolby Vision Profile 5 MUST be in an MP4 for it to work properly.  This is why the colors were off in VLC.  The only reason this MKV works in jellyfin on your shield is likely because it is being transcoded.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    ChocOrange
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Jun
    Reputation: 1
    #6
    2024-03-24, 03:51 PM
    (2024-03-07, 08:14 PM)TheDreadPirate Wrote: As I stated, Dolby Vision Profile 5 MUST be in an MP4 for it to work properly.  This is why the colors were off in VLC.  The only reason this MKV works in jellyfin on your shield is likely because it is being transcoded.

    The shield is perfectly capable of correctly handling DV profile 5 in .mkv files. I can play them correctly Jellyfin -> Kodi on shield -> TV.

    Here's a spreadsheet of DV compatability https://docs.google.com/spreadsheets/d/1...=427220017
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2024-03-24, 09:29 PM
    It can play it, sure. But is it transcoding? Is it actually HDR? THe DV spec for profile 5 requires MP4. If something can handle it in MKV that is out of spec.

    But thanks for sharing that observation. Good to know.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    ChocOrange
    Offline

    Junior Member

    Posts: 7
    Threads: 2
    Joined: 2023 Jun
    Reputation: 1
    #8
    2024-03-24, 11:12 PM
    (2024-03-24, 09:29 PM)TheDreadPirate Wrote: It can play it, sure.  But is it transcoding?  Is it actually HDR?  THe DV spec for profile 5 requires MP4.  If something can handle it in MKV that is out of spec.

    It is most definitely Dolby Vision as my Lg TV pops up with a playing Dolby Vision message, not HDR and not transcoding at all.

    I think you are confusing mp4 video with the mp4 container format. Both are named the same but are very different. One is a file format and the container is more like a zip file.
    Dolby vision mp4 video format can be added to the mkv container format and played with compatible hardware.
    Let's not forget the Nvidia Shield is fully certified for Dolby Vision so it won't play 'out of spec' files. Their license would be invalid.

    Care to share your link for the DV spec requiring mp4 for profile 5?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2024-03-25, 01:25 AM
    I am most definitely not mixing up the MP4 container with mpeg4 video.

    Having said that, it appears the MP4 requirement for DV5 is no longer true as of ~2021 it seems.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode