morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.79k stars 218 forks source link

No Results from Subscene with Asian Shows #963

Closed ghost closed 4 years ago

ghost commented 4 years ago

Describe the bug Unable to get results from Subscene.com provider when searching for subtitles for episodes of ongoing Asian TV shows.

To Reproduce Steps to reproduce the behavior:

  1. Have The World of the Married show imported in Sonarr
  2. Search for The World of the Married in Bazarr
  3. Click Manual Search (person icon) for epsiode
  4. See No Subtitles Found For This Episode

Expected behavior Should be able to retrieve the following subtitles from Subscene.com: 부부의 세계-The.World.of.the.Married.E12.200502.1080p.JTBC.WEB-DL.H264.AAC-AppleTor-VIU

Screenshots image image

Software (please complete the following information):

Additional context Logs attached bazarr.log

morpheus65535 commented 4 years ago

@ratoaq2 any hint about this one?

Traceback (most recent call last):
  File "/app/bazarr/bazarr/../libs/knowit/api.py", line 64, in know
    result = provider.describe(video_path, context)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 230, in describe
    data = self.executor.extract_info(video_path)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 89, in extract_info
    json_dump = self._execute(filename)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 123, in _execute
    return ensure_text(check_output([self.location, '-v', 'quiet', '-print_format', 'json',
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-sexagesimal', '/movies/Movies/ヱヴァンゲリヲン新劇場版:序 (2007)/ヱヴァンゲリヲン新劇場版:序 (2007) - [Remux-1080p AVC TrueHD 6.1] - Radarr.mkv']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/bazarr/bazarr/list_subtitles.py", line 116, in store_subtitles_movie
    subtitle_languages = embedded_subs_reader.list_languages(reversed_path)
  File "/app/bazarr/bazarr/embedded_subs_reader.py", line 25, in list_languages
    data = api.know(file)
  File "/app/bazarr/bazarr/../libs/knowit/api.py", line 70, in know
    raise KnowitException(debug_info(context=context, exc_info=True))
knowit.api.KnowitException: 
+-------------------------------------------------------+
|                   KnowIt 0.3.0-dev                    |
+-------------------------------------------------------+
|                   /usr/bin/ffprobe                    |
|                        v4.2.1                         |
|                                                       |
|                        enzyme                         |
|                         0.4.1                         |
+-------------------------------------------------------+
|                   profile: default                    |
+-------------------------------------------------------+
Traceback (most recent call last):
  File "/app/bazarr/bazarr/../libs/knowit/api.py", line 64, in know
    result = provider.describe(video_path, context)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 230, in describe
    data = self.executor.extract_info(video_path)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 89, in extract_info
    json_dump = self._execute(filename)
  File "/app/bazarr/bazarr/../libs/knowit/providers/ffmpeg.py", line 123, in _execute
    return ensure_text(check_output([self.location, '-v', 'quiet', '-print_format', 'json',
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-sexagesimal', '/movies/Movies/ヱヴァンゲリヲン新劇場版:序 (2007)/ヱヴァンゲリヲン新劇場版:序 (2007) - [Remux-1080p AVC TrueHD 6.1] - Radarr.mkv']' returned non-zero exit status 1.

+-------------------------------------------------------+
|      Please report any bug or feature request at      |
|       https://github.com/ratoaq2/knowit/issues.       |
+-------------------------------------------------------+
ratoaq2 commented 4 years ago

ffprobe is failing. I suggest the user to execute the ffprobe against that file and check the output / error

morpheus65535 commented 4 years ago

@TheEarlOfMillenium please test this media file to see if ffprobe can analyze it.

ghost commented 4 years ago

@morpheus65535

Here is the probe on the file you mentioned above (Evangelion 1.11 You Are Not Alone 2007) https://pastebin.com/F8N0pKqS

Here is also another ffprobe of an episode of an asian show where no results are returned from Subscene: https://pastebin.com/m6FW3amq

morpheus65535 commented 4 years ago

Your log file specify that /usr/bin/ffprobe is version 4.2.1 but the output from ffprobe you just provided are from version 3.4.6... Any idea why this happen?

ghost commented 4 years ago

Running bazarr in docker. The 3.4.6 version is from Ubuntu on the server. I'll try and get v4xx for Ubuntu and try again.

Using this docker image btw linuxserver/bazarr:development

ghost commented 4 years ago

Here is the result using ffprobe version 4.2.1

morpheus65535 commented 4 years ago

@ratoaq2 looks good to me. Strange...

ratoaq2 commented 4 years ago

Could you run with all the parameters as described below?

/usr/bin/ffprobe -v quiet -print_format json -show_format -show_streams -sexagesimal /movies/Movies/ヱヴァンゲリヲン新劇場版:序 (2007)/ヱヴァンゲリヲン新劇場版:序 (2007) - [Remux-1080p AVC TrueHD 6.1] - Radarr.mkv
ghost commented 4 years ago

Here it is

ratoaq2 commented 4 years ago

I'm checking ffprobe docs:

If a url is specified in input, ffprobe will try to open and probe the url content. If the url cannot be opened or recognized as a multimedia file, a positive exit code is returned.

When running bazarr inside docker, it seems it can't either find, open or read the media file. I'm not sure if this might be related to the special characters in the file name.

I suppose you tested running ffprobe inside the docker container and it worked. The next step would be to run knowit against the same file inside the docker container. So we can isolate if the issue is present in a standalone knowit, or only inside bazarr process env

morpheus65535 commented 4 years ago

Looking at this issue with fresh eyes, I can see you path and filename includes colons (:). On Windows, it wouldn't be possible to create a directory or file with this character. Under Linux, it's possible but highly discouraged. It cause a lot of issues (just Google "filename colon linux") and look at the results... I would try to remove that character from the directory and filename and see if it works.

ghost commented 4 years ago

But the file path of the Korean TV Show I’m downloading subs for on Subscene doesn’t have colons in the filepath. Can the issue with the filepath in the movies be causing the issue with the show?

morpheus65535 commented 4 years ago

No but I was investigating with the path you provided. Of you have a new test case, please provide a new debug log.

ghost commented 4 years ago

Its still the same test case its just you were looking at the wrong file. The file I am having an issue with is the episode for The World Of Married.

Here is a filtered log file for that specific file.

bazarr.log

morpheus65535 commented 4 years ago

@pannal why in hell are you appending the season to the title when searching for a series on subscene?

subliminal_patch.providers.subscene|Searching for alternative results: The World of the Married - First Season

https://github.com/morpheus65535/bazarr/blob/376d57e4e7abb1bd34e885bc13d9b77200637030/libs/subliminal_patch/providers/subscene.py#L312

pannal commented 4 years ago

@morpheus65535 because their search changed over time and didn't allow filenames anymore, and expected a specific season to return the proper results to parse.

What's with the tone?

Edit: Obviously this can have changed again. Edit 2: I guess they handle Korean/foreign series differently.

morpheus65535 commented 4 years ago

@pannal sorry, no harm intended. I was only tired trying to understand why this doesn't work for this actual series.

Any chance you might take a look at this one and see if you can make a quick fix?

pannal commented 4 years ago

Can you confirm that the results for Asian shows always lead to the proper Season list? If so, the fix would be: Asian language = skip the Season wording.

morpheus65535 commented 4 years ago

@TheEarlOfMillenium are you able to run some test with other Asian shows?

hawkash commented 4 years ago

This is also an issue with Arabic Subtitle. Bazarr found nothing but there are some in subscene website.

Screen Shot 2020-05-29 at 3 52 09 AM Screen Shot 2020-05-29 at 3 52 28 AM

Edit:

seems to be working with Breaking Bad series

Screen Shot 2020-05-29 at 3 59 01 AM

ghost commented 4 years ago

@TheEarlOfMillenium are you able to run some test with other Asian shows?

@morpheus65535 all other asian shows i have tried will not pull results from subscene but will be able to get subs from opensubs if available from them. Most of the shows have subs uploaded to subscene so I would prefer to get it from there.

Since this is also happening with Arab shows, could this be due to the series title in Subscene having special characters like the Arab letters/ Chinese or Chinese or Japanase Characters?

hawkash commented 4 years ago

This is not an Arabic show, it is an American show. Also the title is in English. but idk why bazarr is not able to get the subs for many shows but able with some.

I think Subscene site front end is different than before and devs need to update the code to make it work again and scrape the wanted subs.

morpheus65535 commented 4 years ago

Is this still an issue?

morpheus65535 commented 4 years ago

Closing this issue, no answer.