Subtitles not rendered if no language is identified

Issue #730 resolved
Former user created an issue

As explained on this forum topic, I suspect that despite having an embedded subtitle, certain files (in this case a MKV anime release) that do not have specified a subtitle language will not render any text.

This has been tested on a Sharp Aquos TV:

Comments (11)

  1. Former user Account Deleted

    In addition to the above, I discovered that subtitles do work on my Boxee Box, probably because the file in question does not require transcoding. The subtitles do not work via MediaBrowser (tested with Chrome/Flash and iOS7).

  2. Sergey

    I do get the reasoning behind "wontfix" resolution, but still, it would be nice to have an option for users who know what they are doing and just want to make things work. That's why, as a proposition, I sketched this dirty patch. In org.serviio.library.local.EmbeddedSubtitles in function getLanguageCode() I change the following string:

    return this.languageCode;
    

    to this:

    return ( ( this.languageCode == null ) || ( "".equals(this.languageCode) ) ) ? "und" : this.languageCode;
    

    Looks awful, but gets the job done: you can add an "und" to the end (or in the middle, that's up to you) of "Preferred language" list and that's it.

  3. Petr Nejedly repo owner

    can you post ffmpeg -i for your file?

    I'm thinking instead of hacking it, i could have another checkbox to use the "default" subtitles track if the language doesn't match any.

  4. Sergey

    The checkbox would be great!

    Here is an ffmpeg -i for one of the typical files with no defined language code: ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers built on Nov 19 2014 22:12:09 with gcc 4.7.2 (GCC) configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs erver --enable-memalign-hack --enable-libmp3lame --enable-libass --enable-librtm p --enable-fontconfig --enable-libfreetype --enable-zlib --enable-libx264 --enab le-libspeex --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x86 --enable-runtime-cpudetect --enable-pthreads --target- os=mingw32 --cross-prefix=i686-w64-mingw32- --enable-gpl --pkg-config=pkg-config

      libavutil      54. 14.100 / 54. 14.100
      libavcodec     56. 12.101 / 56. 12.101
      libavformat    56. 14.100 / 56. 14.100
      libavdevice    56.  3.100 / 56.  3.100
      libavfilter     5.  2.103 /  5.  2.103
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  1.100 /  1.  1.100
      libpostproc    53.  3.100 / 53.  3.100
    Input #0, matroska,webm, from 'L:\dlna-tests\c3.mkv':
      Metadata:
        encoder         : libebml v1.2.2 + libmatroska v1.3.0
        creation_time   : 2012-01-10 17:55:06
      Duration: 00:02:33.40, start: 0.000000, bitrate: 3713 kb/s
        Stream #0:0: Video: h264 (High 10), yuv420p10le, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
        Stream #0:1: Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
        Stream #0:2: Subtitle: ass (default)
        Stream #0:3: Attachment: ttf
        Metadata:
          filename        : Arial Rounded MT.ttf
          mimetype        : application/x-truetype-font
        Stream #0:4: Attachment: ttf
        Metadata:
          filename        : ARRBD_ECL2.ttf
          mimetype        : application/x-truetype-font
        Stream #0:5: Attachment: ttf
        Metadata:
          filename        : ARTIS___xy.ttf
          mimetype        : application/x-truetype-font
        Stream #0:6: Attachment: ttf
        Metadata:
          filename        : BodoniXT.ttf
          mimetype        : application/x-truetype-font
        Stream #0:7: Attachment: ttf
        Metadata:
          filename        : Brianne_s_hand.ttf
          mimetype        : application/x-truetype-font
        Stream #0:8: Attachment: ttf
        Metadata:
          filename        : CALIST.TTF
          mimetype        : application/x-truetype-font
        Stream #0:9: Attachment: ttf
        Metadata:
          filename        : CartoonDemiBold.ttf
          mimetype        : application/x-truetype-font
        Stream #0:10: Attachment: ttf
        Metadata:
          filename        : corbel.ttf
          mimetype        : application/x-truetype-font
        Stream #0:11: Attachment: ttf
        Metadata:
          filename        : LBLACK.TTF
          mimetype        : application/x-truetype-font
        Stream #0:12: Attachment: ttf
        Metadata:
          filename        : LondonTwo.ttf
          mimetype        : application/x-truetype-font
    
  5. Gerard Martin

    I posted about this issue here: http://forum.serviio.org/viewtopic.php?f=3&t=19302 . Glad to see it's being considered, at least.

    The majority of my JP audio/EN subtitles library is arranged as Dvvarf's file above is, with the 'default' flag set on the subtitle track.

    The behaviour of other players (mpv, VLC, etc.), and hence all of the JP audio/EN subs media I have, also seems to fit with the Matroska technical specs (http://www.matroska.org/technical/specs/index.html) which states under FlagDefault: "Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference." - that is, subtitles are shown if the default flag is set, and not shown if it is not.

    I'm thinking instead of hacking it, i could have another checkbox to use the "default" subtitles track if the language doesn't match any.

    I would love to see this.

  6. Petr Nejedly repo owner

    added a checkbox to fallback to the default track if there is no language match for the embedded subtitles.

  7. Log in to comment