Skip to content

Commit 730f00d

Browse files
committed
Add DTS support for .mp4 and .m2ts and add DV support for .mkv
1 parent 606a312 commit 730f00d

File tree

6 files changed

+28
-11
lines changed

6 files changed

+28
-11
lines changed

README.txt

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This archive contains libraries and scripts needed to restore DTS playback
2-
on LG Smart TVs, such as OLED CX models.
2+
as well as add Matroska DV support on LG Smart TVs, such as OLED CX models.
33

44
See https://github.com/RootMyTV/RootMyTV.github.io/issues/72 for details.
55

@@ -23,7 +23,6 @@ Limitations:
2323
------------
2424

2525
- Root required (https://github.com/RootMyTV/RootMyTV.github.io/issues/85)
26-
- Only mkv playback supported (no .mp4, no .dts).
2726
- Only PCM stereo downmix supported (no multichannel, no passthrough).
2827
- The libraries and scripts have been designed for LG OLED CX models.
2928
While there is a good chance that, if your TV is not too dissimilar to
@@ -38,9 +37,9 @@ Installation:
3837
- Open a root shell to your TV *using ssh* (not telnet!)
3938
- Download, extract and run the installer by issuing something like:
4039
cd ~
41-
wget https://github.com/lgstreamer/dts_restore/archive/refs/tags/1.2.tar.gz
42-
tar -xzvf 1.2.tar.gz
43-
./dts_restore-1.2/install.sh
40+
wget https://github.com/lgstreamer/dts_restore/archive/refs/tags/2.0.tar.gz
41+
tar -xzvf 2.0.tar.gz
42+
./dts_restore-2.0/install.sh
4443

4544

4645
Uninstallation:
@@ -49,7 +48,7 @@ Uninstallation:
4948
- Open a root shell to your TV
5049
- Run the commands:
5150
cd ~
52-
./dts_restore-1.2/uninstall.sh
51+
./dts_restore-2.0/uninstall.sh
5352
- Fully power off or reboot your TV.
5453

5554

@@ -66,15 +65,33 @@ Additional notes:
6665
- If you want to adjust the stereo downmix settings, you can edit the
6766
[downmix] section from /var/lib/webosbrew/init.d/restore_dts (permanent)
6867
of /etc/gst/gstcool.conf (temporary).
68+
- It is possible to disable DV support by simply creating a /tmp/dv_disable
69+
file on your system. If that file is found, then hybrid DV + HDR media
70+
will play as HDR. If using https://github.com/andrewfraley/magic_mapper
71+
you can map a DV enable/disable toggle by following the steps described
72+
at https://gist.github.com/pbatard/ea04494c0de63cd5d38b1f607ef64fbd.
73+
- Depending on how they were mastered, hybrid DV + HDR media may use HDR
74+
rather than Dolby Vision. If that is the case, this is because the DV
75+
configuration used is *INCOMPATIBLE* with LG's implementation (meaning
76+
that trying to force DV over HDR would not work anyway).
77+
- Depending on how they were mastered, hybrid DV + HDR media playing as
78+
DV may display a black screen when not started from the beginning (i.e.
79+
after performing a seek or resuming to a non 00:00:00 timestamp). If
80+
that is the case, use the disable DV switch above to play as HDR.
6981

7082

7183
Source code:
7284
------------
7385

74-
- libgstmatroska.so was compiled from the 1.14.4 LG 'gst-plugins-good'
75-
source for OLED CX models, with matroska audio DTS demuxing re-enabled.
86+
- libgstmatroska.so, libgstisomp4.so and libgstisomp4_1_8.so were compiled
87+
from the 1.14.4 LG 'gst-plugins-good' source for OLED CX models, with
88+
audio DTS demuxing re-enabled (and for Matroska Dolby Vision support added).
7689
The complete source for it, along with compilation instructions, can be
7790
found at: https://github.com/lgstreamer/gst-plugins-good
91+
- libgstmpegtsdemux.so was compiled from the 1.14.4 LG 'gst-plugins-bad'
92+
source for OLED CX models, with audio DTS demuxing re-enabled.
93+
The complete source for it, along with compilation instructions, can be
94+
found at: https://github.com/lgstreamer/gst-plugins-bad
7895
- libgstlibav.so was compiled from the 1.14.4 LG 'gst-libav' source for
7996
OLED CX models with the following changes applied for DTS (dca) decoding:
8097
* Force stereo downmix always.

gst/libgstisomp4.so

1.88 MB
Binary file not shown.

gst/libgstisomp4_1_8.so

1.15 MB
Binary file not shown.

gst/libgstlibav.so

0 Bytes
Binary file not shown.

gst/libgstmatroska.so

21.7 KB
Binary file not shown.

install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22
# DTS playback restoration script for LG OLED CX
3-
# Copyright (c) 2022-2024 Pete Batard <pete@akeo.ie>
3+
# Copyright (c) 2022-2025 Pete Batard <pete@akeo.ie>
44
# See https://github.com/RootMyTV/RootMyTV.github.io/issues/72#issuecomment-1343204028
55

66
# Get the path where the script is located.
@@ -93,7 +93,7 @@ cat <<EOS > $SCRIPT_DIR/init_dts.sh
9393
#!/bin/bash
9494
9595
# Override the GST plugins that were nerfed by LG
96-
for lib in libgstmatroska.so libgstlibav.so; do
96+
for lib in libgstisomp4.so libgstisomp4_1_8.so libgstmatroska.so libgstlibav.so; do
9797
if [[ -f $GST_SRC/\$lib ]]; then
9898
echo "Installing /usr/lib/gstreamer-1.0/\$lib override"
9999
mount -n --bind -o ro $GST_SRC/\$lib /usr/lib/gstreamer-1.0/\$lib
@@ -138,5 +138,5 @@ ln -s $SCRIPT_DIR/init_dts.sh $INIT_DIR/restore_dts
138138
if [[ ! -f /tmp/gstcool.conf ]]; then
139139
echo "Running $INIT_DIR/restore_dts"
140140
source $INIT_DIR/restore_dts || exit 1
141-
echo "DTS playback has been permanently re-enabled - Enjoy!"
141+
echo "DTS and MKV DV playback have been enabled - Enjoy!"
142142
fi

0 commit comments

Comments
 (0)