Linux Crumbs
Simbiotic - A Cyberpunk Thriller Novel

Kodi Add Downloaded Subtitle to DVD Playback

Summary

This tutorial describes how to configure Kodi to add a downloaded subtitle to DVD playback.

Sometimes a DVD such as Supernatural Season 10 does not include English subtitles. Fortunately there is a way to add subtitles to a DVD episode while it is playing. This tutorial describes how to configure and use Kodi to add custom .srt subtitles to DVD playback.

These steps were documented using Kodi 15.2 which is installed on Mythbuntu 14.04 with MythTV 0.27. Also included are some steps for Kodi 17.6 under LibreELEC 8.2.3 on a Raspberry Pi.

Contents

Initial Setup

The following one-time initial set up is required to enable the use of custom subtitle files with Kodi.

Create Subtitles Folder

On the PVR use a terminal window or Kodi to create a folder to hold subtitles.

For example:

mkdir ~/subtitles
  • On Mythbuntu the full path is /home/{yourusername}/subtitles/
  • On LibreELEC the full path is /storage/subtitles/

Note that we can create subfolders under the subtitles folder to hold the subtitle files .srt for an entire season of a TV Show.

Configure Kodi Subtitles

With Kodi running:

  1. Navigate to System -> Settings -> Video -> Subtitles.

    On Kodi 17.6 use System -> Settings -> Player -> Language.

  2. Ensure/set the following:

    Enable parsing for closed captions:   ENABLED
    Subtitle storate location:            Custom location
    - Custom subtitle folder              ~/subtitles

    Kodi subtitle configuration

Add Keyboard Shortcuts

Add some keyboard shortcuts to make it easier to choose the subtitle .srt file and also to adjust subtitles and audio sync.

The keys we wish to re-map are:

Keyboard Key       Function
----------------   ---------
F5                 Activate the OSD audio settings window
Ctrl+Left          Subtitle delay minus
Ctrl+Right         Subtitle delay plus
Ctrl+Shift+Left    Audio delay minus
Ctrl+Shift+Right   Audio delay plus

The following keys I have not yet figured out how to map on the Mediagate or Rosewill MCE Remote controls.

MCE Remote Key     Function
----------------   ---------
DVD Menu           Activate the OSD audio settings window
Angle (Green)      Subtitle delay minus
Audio (Yellow)     Subtitle delay plus
  1. Edit the ~/.kodi/userdata/keymaps/keymap.xml file.

    nano ~/.kodi/userdata/keymaps/keymap.xml
  2. Copy and paste the following contents.

    <keymap>
      <FullscreenVideo>
        <keyboard>
          <F5>ActivateWindow(osdaudiosettings)</F5>
          <left mod="ctrl">subtitledelayminus</left>
          <right mod="ctrl">subtitledelayplus</right>
          <left mod="ctrl,shift">audiodelayminus</left>
          <right mod="ctrl,shift">audiodelayplus</right>
        </keyboard>
      </FullscreenVideo>
    </keymap>
  3. Save and exit the editor with Ctrl+X.

Add Silver VRC-1100 Remote Shortcuts

Add some Silver VRC-1100 Vista MCE remote control shortcuts to make it easier to choose the subtitle .srt file and also to adjust subtitles and audio sync.

The keys we wish to re-map are:

Remote Key         Function
----------------   ---------
Yellow             Activate the OSD audio settings window
Blue               Subtitle delay minus
Green              Subtitle delay plus
Below Blue         Audio delay minus
Below Green        Audio delay plus
Info               Info
  1. Edit the ~/.kodi/userdata/keymaps/keymap.xml file.

    For LibreELEC with VRC-1100 remote control:

    nano ~/.kodi/userdata/keymaps/keymap.xml
  2. Copy and paste the following contents.

    <keymap>
      <FullscreenVideo>
        <keyboard>
          <t mod="ctrl,shift">ActivateWindow(osdaudiosettings)</t>
          <m mod="ctrl">subtitledelayminus</m>
          <i mod="ctrl">subtitledelayplus</i>
          <g mod="ctrl">audiodelayminus</g>
          <t mod="ctrl">audiodelayplus</t>
          <return mod="win,alt">Info</return>
        </keyboard>
      </FullscreenVideo>
    </keymap>
  3. Save and exit the editor with Ctrl+X.

Locate, Download, and Extract Subtitles

  1. Perform an Internet search to locate subtitle files (.srt).

    For example a search of "subtitle supernatural season 10" might yield TVsubtitles.net: Download supernatural season 10 subtitles.

  2. Download subtitle files.

    E.g., TVsubtitles.net: Download supernatural season 10 subtitles

  3. Transfer file to PVR

    For example from a terminal session:

    scp -p ~/Downloads/"Supernatural - season 10.en.zip" pvr@192.168.1.55:/home/pvr/subtitles
  4. Extract subtitle files on PVR

    For example from a terminal session:

    ssh pvr@mythpvr
    cd ~/subtitles
    mkdir Supernatural-10
    unzip -d Supernatural-10 "Supernatural - season 10.en.zip"
    exit

Play DVD Episode and Select Subtitle

  1. In Kodi select PLAY DISC

  2. In DVD specific menu select and play an episode

  3. Press M or Green button on MCE remote.

  4. Navigate to Audio icon (3rd from right) and press Enter.

    Kodi Audio Icon

  5. Choose Browse for subtitle..., select appropriate file, and press Enter.

    Kodi Pick File

  6. Navigate to Subtitle icon (5th from right) and select Next until chosen subtitle file is shown.

    Kodi Subtitle Icon

  7. Press Escape or Back button on MCE remote.

    The chosen subtitles should now be displayed. :-)

References

While researching how to use subtitle files with Kodi media center I found the following references useful:

The Medusa Deception novel - free first in series
News   Documentation     Copyright (c) 2013-2024 Curtis Gedak

Get GParted at SourceForge.net. Fast, secure and Free
	Open Source software downloads Valid HTML 4.01! Correct CSS!