I found the internal LG Player used by plex, support Profile 5 and Profile 8 in mp4 containers, and both triggers Dolby vision.
There are some caveats to making everything work flawless.
- mp4 cannot be remuxed with FFmpeg right now, they just don’t trigger Dolby vision. I also have issues with GPAC as a muxer. Hanging. The only reliable muxer for me was mp4box.
- Audio on the internal player might get choppy on the internal player or plex, is that is the case, remux the mp4, or the mkv to an mp4 with mp4box but set the interleave to 240 ms instead of the default 1 second. [-inter 240] that will fix any audio choppiness.
- Of course, DTS and Dolby TrueHD are not supported, also, any mp4 with TrueHD will not play correctly, at least on my tries, including adding an AC-3 track at the beginning. So if the track is in there, it makes it not playable.
My current ‘flawless’ pipeline to convert MKV DV to MP4 DV playable by Plex in the LG is the following:
- Extract the video track (input.h265) from the mkv, with mkvextract or Inviska Mkv Extract
- Use the Dolby Vision mp4muxer.exe tool to reprocess the video. IDK why this step is needed, but if I skipped it doesn’t work, maybe it adds some headers.
- For Profile 5
mp4muxer.exe -o output_vid.mp4 -i input.h265 --dv-profile 5 - For Profile 8
mp4muxer.exe -o output_vid.mp4 -i input.h265 --dv-profile 8 --dv-bl-compatible-id 1
- For Profile 5
- Mux Audio and Subtitles with ffmpeg.
ffmpeg.exe -i input.mkv -c:a copy -vn -map 0 -map_chapters 0 -c:s mov_text output_aud.mp4 - Mux all together with mp4box
mp4box -add output_vid.mp4 -add output_aud.mp4 -inter 240 output.mp4
Additionally, if the track has TRUE HD remove it, or convert it to something else, you can include a DTS track (that will not break the mp4), but in that case, is heavily recommended that you add an AC-3/FLAC/AAC track first so playback will start with that default track in plex. Because the other know limitations of plex, try to not include any image-based subtitles, if they’re present remove them or convert them into a text subtitle first (srt). Image subtitles will force transcoding and make the video unusable, also DTS but IDK why.
EDIT 1: If you have a multiaudio release with lots of audio tracks reduce the interleave (-inter 240) to (-inter 120) or further.
EDIT 2: Some mkv (h265 video stream) have TRASH NALs after the ending, is that is the case when you process the H265 with ffmpeg, you will see ffmpeg saying invalid NALs. The H265 stream needs to be cut at that time. Otherwise, the Dolby Vision mp4muxer will return an empty file. I created a tool for it and can be requested via PM.