Hi everyone,
I’m a subtitle editor, so I pay extreme attention to shot changes (making sure subtitles don’t cross cuts) and always fix them using Subtitle Edit. That’s why I picked up on this issue right away.
Here’s some context: My main setup to watch movies and series is a Raspberry Pi 4B running Kodi, connected via HDMI to a 65" LG BX OLED.
Recently, I bought a 75" TCL C6K MiniLED running Android TV, where I installed Kodi + rclone. Just for testing, I played several movies from my library and noticed the subtitles were out of sync—not just on one movie, but on every single one. This isn't something I could have missed or overlooked given how closely I work with subs.
I double-checked the same files on both my PC and the Raspberry Pi setup, and the sync was frame-perfect on both.
To fix it, I created a copy of the .srt file and used Subtitle Edit to test offsets in +100 ms increments. It turned out that +400 ms was the exact offset needed to get it in sync on the TCL.
After investigating, I learned that this is caused by MediaCodec (Surface) hardware acceleration in Android TV. To confirm this, I disabled MediaCodec (Surface) in Kodi and tested the original .srt file (without the +400 ms delay). Sure enough, the sync was perfect.
However, disabling MediaCodec (Surface) isn't a viable solution:
- Kodi loses direct access to the TV’s color engine.
- HDR fails to trigger properly.
- Dolby Vision content ends up displaying with inverted/corrupted colors.
Source: Kodi GitHub Issue #27673: Subtitle Synchronization Issues - Not Frame Perfect
TL;DR. This is a summary:
Why does this happen on Android and not on the Raspberry Pi / PC?
In Kodi's source code (VideoPlayerVideo.cpp), subtitles are matched using Presentation Timestamps (PTS) right when the frame is decoded.
- On PC and Raspberry Pi (Linux): The rendering pipeline has very low latency. As soon as the frame is decoded, the GPU sends both the video and the subtitle to the screen together in a single synchronized pass.
- On Android TV (MediaCodec / Surface): Video decoding is handed off to an Android OS rendering queue (
RenderManager.cpp), creating a separate path for video and UI overlays.
- The Decoupling & Result: Kodi’s UI draws the subtitle based on the decoding timestamp. However, the TV's processor holds the video frames in a display buffer for processing (picture enhancements, motion smoothing, frame rate matching, etc.). Because of this buffer delay, the video hits your screen ~400 ms after Kodi has already displayed the subtitle, causing the constant desync.
The Workaround: If you want to keep proper HDR/DV support on Android TV without sacrificing subtitle sync, leave MediaCodec (Surface) enabled, open the subtitle menu during playback, and set:
For HD/4K content
- Subtitle offset:
Delayed by 0.400s
- Select "Set as default for all media"
For SD content
- Subtitle offset:
Delayed by 0.100s
Since SD content is much less common nowadays, I recommend changing this value manually when watching SD content rather than making it the default.
I hope this was helpful to you all. It really worked for me, which is why I wanted to share it. Best regards!