Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitle downloaded even when there are embedded subtitles #1023

Open
dinojr opened this issue Jan 18, 2021 · 1 comment · May be fixed by #1154
Open

Subtitle downloaded even when there are embedded subtitles #1023

dinojr opened this issue Jan 18, 2021 · 1 comment · May be fixed by #1154

Comments

@dinojr
Copy link

dinojr commented Jan 18, 2021

For some files, subliminal downloads an english subtitle even though there is already an embedded subtitle in the file.

Here is the output of ffmpeg -i showing the embedded subtitle:
ffmpeg -i The\ Mandalorian\ S01E01.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'The Mandalorian S01E01.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2019-11-12T00:01:01.000000Z
    encoder         : Lavf58.34.101
  Duration: 00:38:46.21, start: 0.000000, bitrate: 3246 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x804 [SAR 1:1 DAR 160:67], 2857 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default)
    Metadata:
      creation_time   : 2019-11-12T00:01:01.000000Z
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      creation_time   : 2019-11-12T00:01:01.000000Z
      handler_name    : SoundHandler
    Side data:
      audio service type: main
    Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      creation_time   : 2019-11-12T00:01:01.000000Z
      handler_name    : SubtitleHandler
    Stream #0:3(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      creation_time   : 2019-11-12T00:01:01.000000Z
      handler_name    : SubtitleHandler

Here are some parts of the debug

subliminal --debug download -l en The\ Mandalorian\ S01E01.mp4

DEBUG:subliminal.cli:Collecting path The Mandalorian S01E01.mp4
INFO:subliminal.core:Scanning video 'The Mandalorian S01E01.mp4' in ''
DEBUG:subliminal.core:Size is 944029203
DEBUG:subliminal.core:Found subtitles {'The Mandalorian S01E01.fr.srt': <Language [fr]>}
INFO:subliminal.core:Refining video with hash
DEBUG:subliminal.refiners.hash:Computing hashes for 'The Mandalorian S01E01.mp4'
DEBUG:subliminal.refiners.hash:Computed hashes {'opensubtitles': 'fce93c51d64fe228', 'shooter': '3d8604553e1d79ff046012b67f2a5b3e;b86604b85b52b2bede4aff88c55b826e;0570296baac54cab665008eb1728dc7e;a8fcaa83e73db1c26938024a76bb3a04', 'thesubdb': '499be8e12e8160326188fb4a30403a5d'}
INFO:subliminal.core:Refining video with metadata
DEBUG:subliminal.refiners.metadata:Unsupported video extension .mp4
INFO:subliminal.core:Refining video with tvdb
INFO:subliminal.refiners.tvdb:Searching series 'The Mandalorian'
DEBUG:subliminal.refiners.tvdb:Found 2 results
DEBUG:subliminal.refiners.tvdb:Found exact match on series 'The Mandalorian'
DEBUG:subliminal.providers.tvsubtitles:Found subtitle <TVsubtitlesSubtitle '310007' [en]>
ERROR:subliminal.utils:Request timed out. Provider thesubdb
INFO:subliminal.core:Discarding provider thesubdb
INFO:subliminal.score:Computing score of <ShooterSubtitle 'https://www.shooter.cn/api/subapi.php?fetch=MTYxMDk3MTI1OHxZc1JVNHRJMDFPVjdHbm1fM3pFYVNNX3h6X3pjZHhXUXVLZ2E3R2tTc3ZtSXB6ZnVnSUpodHREaUFCOE5FOEt5SFZiSjJkU19mRFB0SjlDdmNWNFYzd0pIV2pZUExPTTZ4MjVQMzQ5aTZkVDJXX3ZqaTEtWFMtRWVmMGswLVowdFMzb2dMUT09fJT4JfWJolNjEJEGnkSsI4v28sHHUfYKcAc4NGFBiUCJ&nonce=%B9%A3p%A0%EF%BF%94V%9C%0D.%D4%FCi5%9C' [en]> for video <Episode [The Mandalorian2019 s01e01]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'hash'}
DEBUG:subliminal.score:Keeping only hash match
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 810 with final matches {'hash', 'hearing_impaired'}
INFO:subliminal.score:Computing score of <ShooterSubtitle 'https://www.shooter.cn/api/subapi.php?fetch=MTYxMDk3MTI1OHxTQ01UQ05GNk0xWHUxYU1zMVI4Z1dMN0gyT3BUY1UzaWw4RnMwekRuVjBSSFFuZzUyYjRHVGJ1WXJySjRCTGdzZklXSlhKUmdmdGZZa1NMM0ZsblBCNG93YXg1Sno5Y3JkQXAwbGJRUU5JX0ZSSEdtQU84SV94SGd3ZXQ5SmpfWC1tdUF2UT09fLvRgaV7BkrrytkEDX9F8v35UCXXo3MVAK-cmQTxs_LW&nonce=%D6%E7%18nkU%2C%80%2F%FE%7B%2B%E5%C6%EF%FB' [en]> for video <Episode [The Mandalorian2019 s01e01]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'hash'}
DEBUG:subliminal.score:Keeping only hash match
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 810 with final matches {'hash', 'hearing_impaired'}
INFO:subliminal.score:Computing score of <ShooterSubtitle 'https://www.shooter.cn/api/subapi.php?fetch=MTYxMDk3MTI1OHx6bl81UDdwU3FqdnR1RDB6X0VGVTdCb3p2c3NKalBZVU83R09Rb253UTNqNVdhSlVWM3NRdlRvQVV5a2NPVlpEV2ZzTk1EekN0dTg4bkJRbVBmanVlWTJobVhnREliN3I0ak82ZDBIT09zcXl6cTBMN0k5WkZjMlVtTWhGY3EybzJKTEtsZz09fJ0tTptnORW_gXZDK22QMr_DWudsD0yzuWFjXNPOEQab&nonce=%09%9C%FC%14%A67%22%8E%7DR%F9%9Di%CE%9F%F5' [en]> for video <Episode [The Mandalorian2019 s01e01]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'hash'}
DEBUG:subliminal.score:Keeping only hash match
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 810 with final matches {'hash', 'hearing_impaired'}
INFO:subliminal.score:Computing score of <TVsubtitlesSubtitle '310007' [en]> for video <Episode [The Mandalorian2019 s01e01]> with {'hearing_impaired': False}
DEBUG:subliminal.score:Using scores {'hash': 809, 'series': 405, 'year': 135, 'country': 135, 'season': 45, 'episode': 45, 'release_group': 15, 'streaming_service': 15, 'source': 7, 'audio_codec': 3, 'resolution': 2, 'video_codec': 2, 'hearing_impaired': 1}
DEBUG:subliminal.score:Found matches {'season', 'series', 'country', 'episode', 'year'}
DEBUG:subliminal.score:Matched hearing_impaired
INFO:subliminal.score:Computed score 766 with final matches {'season', 'series', 'hearing_impaired', 'country', 'episode', 'year'}
INFO:subliminal.core:Downloading subtitle <ShooterSubtitle 'https://www.shooter.cn/api/subapi.php?fetch=MTYxMDk3MTI1OHxZc1JVNHRJMDFPVjdHbm1fM3pFYVNNX3h6X3pjZHhXUXVLZ2E3R2tTc3ZtSXB6ZnVnSUpodHREaUFCOE5FOEt5SFZiSjJkU19mRFB0SjlDdmNWNFYzd0pIV2pZUExPTTZ4MjVQMzQ5aTZkVDJXX3ZqaTEtWFMtRWVmMGswLVowdFMzb2dMUT09fJT4JfWJolNjEJEGnkSsI4v28sHHUfYKcAc4NGFBiUCJ&nonce=%B9%A3p%A0%EF%BF%94V%9C%0D.%D4%FCi5%9C' [en]>
INFO:subliminal.providers.shooter:Downloading subtitle <ShooterSubtitle 'https://www.shooter.cn/api/subapi.php?fetch=MTYxMDk3MTI1OHxZc1JVNHRJMDFPVjdHbm1fM3pFYVNNX3h6X3pjZHhXUXVLZ2E3R2tTc3ZtSXB6ZnVnSUpodHREaUFCOE5FOEt5SFZiSjJkU19mRFB0SjlDdmNWNFYzd0pIV2pZUExPTTZ4MjVQMzQ5aTZkVDJXX3ZqaTEtWFMtRWVmMGswLVowdFMzb2dMUT09fJT4JfWJolNjEJEGnkSsI4v28sHHUfYKcAc4NGFBiUCJ&nonce=%B9%A3p%A0%EF%BF%94V%9C%0D.%D4%FCi5%9C' [en]>
INFO:subliminal.subtitle:Guessing encoding for language en
DEBUG:subliminal.subtitle:Trying encodings ['utf-8', 'latin-1']
INFO:subliminal.subtitle:Guessed encoding latin-1
INFO:subliminal.subtitle:Guessing encoding for language en
DEBUG:subliminal.subtitle:Trying encodings ['utf-8', 'latin-1']
INFO:subliminal.subtitle:Guessed encoding latin-1
DEBUG:subliminal.core:All languages downloaded
Downloading subtitles  [####################################]  100%               
@dinojr
Copy link
Author

dinojr commented Feb 17, 2021

It turns the problem comes from the tx3g subtitle format embedded in the mp4 video. The same video transcoded to a mkv container, with the subtitle embedded in ass format with handbrake doesn't have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant