Remuxing Dolby Vision for LG 2023+ TV
Posted: Thu Jan 18, 2024 7:57 am
A modern LG 2023+ TV supports Dolby Vision, but only from MP4 and MPEGTS containers.
I want to remux a Dolby Vision video stored in an MKV, to an MP4 or MPEGTS container without any transcoding.
The renderer profile seems to have this accurately configured.
The problem seems to be that if a video cannot be directly streamed, such as an MKV containing Dolby Vision video, it will only ever transcode into the singular transcode target specified by TranscodeVideo. Which for this renderer is set to MPEGTS-H265-AC3. This nearly always causes the audio to be transcoded, from DTS/EAC3 into AC3. Even if I used a different TranscodeVideo option, there is no singular transcode target that would avoid transcoding.
Is there a way to configure UMS to prefer remux, over transcode if possible? From browsing the code this doesn't seem to be case.
To be clear, for MKV-DolbyVision-DTS and MKV-DolbyVision-EAC3 media, the best choice would be to remux to MP4 or MPEGTS, but instead it always transcodes the audio too, which is not needed as those formats are supported per the renderer profile.
Also, in the logs I see "the file is a strict Dolby Vision profile and ffmpeg seems to not preserve Dolby Vision data (worth re-checking periodically)". I wonder if this is fixed as I can do "ffmpeg -i input.mkv -c copy -strict unofficial out.mp4" to manually remux a video and Dolby Vision is preserved with the latest ffmpeg.
I want to remux a Dolby Vision video stored in an MKV, to an MP4 or MPEGTS container without any transcoding.
The renderer profile seems to have this accurately configured.
Code: Select all
TranscodeVideo = MPEGTS-H265-AC3
Supported = f:mkv v:av1|h264|h265|mp4|mpeg2|vp8|vp9 a:aac-lc|ac3|dts|dtshd|he-aac|eac3|lpcm|mp3|mpa|opus si:ASS|SUBRIP hdr:hdr10|hlg m:video/x-matroska
Supported = f:mov v:av1|h264|h265|mp4 a:aac-lc|ac3|ac4|eac3|he-aac|mp3 m:video/quicktime
Supported = f:mp4|m4v v:av1|h264|h265|mp4 a:aac-lc|ac3|ac4|dts|dtshd|eac3|he-aac|mp3 si:TX3G hdr:dolbyvision|hdr10|hlg m:video/mp4
Is there a way to configure UMS to prefer remux, over transcode if possible? From browsing the code this doesn't seem to be case.
To be clear, for MKV-DolbyVision-DTS and MKV-DolbyVision-EAC3 media, the best choice would be to remux to MP4 or MPEGTS, but instead it always transcodes the audio too, which is not needed as those formats are supported per the renderer profile.
Also, in the logs I see "the file is a strict Dolby Vision profile and ffmpeg seems to not preserve Dolby Vision data (worth re-checking periodically)". I wonder if this is fixed as I can do "ffmpeg -i input.mkv -c copy -strict unofficial out.mp4" to manually remux a video and Dolby Vision is preserved with the latest ffmpeg.