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.86k stars 223 forks source link

Not Downloading Subtitles - Error trying to get video information for this file #619

Closed zytoc closed 5 years ago

zytoc commented 5 years ago

Describe the bug A subtitle will be downloading infrequently. Most of the time there are no subtitles downloaded. I'm getting this message in logs: "BAZARR Error trying to get video information for this file: /tv/How It's Made/Season 15/How It's Made - S15E13 - Leather Wallets; French Horns; Soy Sauce; Children's Ride-On Cars.mkv"

When I click on the log entry it brings up this stack trace: "Traceback (most recent call last):  File "/app/bazarr/bazarr/get_subtitle.py", line 70, in get_video   refine_from_ffprobe(original_path, video)  File "/app/bazarr/bazarr/get_subtitle.py", line 951, in refine_from_ffprobe   data = parser.parseFfprobe(path)  File "/app/bazarr/bazarr/../libs/pyprobe/pyprobe.py", line 39, in parseFfprobe   self._checkExecutable(self._ffprobe)  File "/app/bazarr/bazarr/../libs/pyprobe/pyprobe.py", line 202, in _checkExecutable   stderr=subprocess.STDOUT  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output   raise CalledProcessError(retcode, cmd, output=output) CalledProcessError: Command [\/usr/bin/ffprobe\, --help]\ returned non-zero exit status -11"

This is happening on nearly all the tv episodes I have, almost all of which have the series name, season and episode number, and title in their file name.

To Reproduce Steps to reproduce the behavior:

  1. Request this episode with this filename be used to download it's subtitle
  2. Go to logs, and view errors
  3. Check if this error or a similar one is created.

Expected behavior The subtitles for the episode should be downloaded.

Screenshots If applicable, add screenshots to help explain your problem.

Software (please complete the following information):

image

Additional context Some other file names that are having the same issue:

I have Addic7ed, OpenSubtitles (VIP), Podnapisi, Subscenter and TVSubtitles as providers. I also have an anti-captcha provider.

morpheus65535 commented 5 years ago

Can you try to uninstall /usr/bin/ffprobe and try again? Look like your version of ffprobe is returning -11 which is segmentation fault.

zytoc commented 5 years ago

Thank you for your quick response!

I have Proxmox (debian based) with an LXC container running docker images for Sonarr, Radarr, Bazarr...etc.

/usr/bin/ffprobe is not found in the LXC container or the host, but it is found in the docker container. I'm new-ish to servers and Linux in general so I couldn't find a command that worked to remove /usr/bin/ffprobe from the container as apt-get was not found in the container. I don't know but I would assume just removing that entry is the wrong way to do that.

Any help would be greatly appreciated.

PS: I found that there is one more different stack trace littered throughout the errors: image

morpheus65535 commented 5 years ago

What docker image are you using? We only support linuxserver/bazarr and it doesn't contain ffprobe.

zytoc commented 5 years ago

I'm using Linuxserver/bazarr image from about a month ago.

Docker Image List: image

Docker Container List image

ffprobe is listed under /usr/bin image

Not sure why it would be there if it isn't in the image originally. Maybe I should pull the newest image and see if there is a discrepancy?

morpheus65535 commented 5 years ago

You are right, my bad. ffmpeg is included for some time but it works fine for me. Can you try linuxserver/bazarr:development?

morpheus65535 commented 5 years ago

Are you still having this issue?

Zeusy123 commented 5 years ago

I have update my docker to your latest development version and im getting same problems cant read information from ANY video file:( ive checked multiple vidfeo files and they play fine and ffprobe reads them fine.

Its as if bazarr cant find ffprobe????

morpheus65535 commented 5 years ago

@Zeusy123 can you run /usr/bin/ffprobe inside the running container?

zytoc commented 5 years ago

This issue hasn't been resolved by running development version of the docker image. Sorry, life got busy for a bit there. I don't mean to keep an issue stale.

On Tue, Oct 15, 2019 at 9:56 PM morpheus65535 notifications@github.com wrote:

@Zeusy123 https://github.com/Zeusy123 can you run /usr/bin/ffprobe inside the runnign container?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/morpheus65535/bazarr/issues/619?email_source=notifications&email_token=ANNWSVC2LLNO5XZYZ7UT6M3QO2GIDA5CNFSM4I6W7PJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBK6UMA#issuecomment-542501424, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANNWSVHUNK4MX5KUTA57ZOLQO2GIDANCNFSM4I6W7PJA .

draeven commented 3 years ago

REOPEN :D

morpheus65535 commented 3 years ago

@draeven that's necromancy after more than a year. Open a new issue with everything required ans we'll look into it.

cooperdk commented 3 years ago

Reopen an issue that hasn't been fixed or even addressed? 8|

I am having the exact same issue btw, running on Windows newest dev version, and with the included ffmpeg/ffprobe binaries copied both to root and to the windows folder.

BAZARR FFprobe was unable to find audio tracks in the file! a few seconds ago
  BAZARR FFprobe was unable to find video tracks in the file! a few seconds ago
  FFprobe found: {} a few seconds ago
  BAZARR FFprobe used is c:\windows\ffprobe.EXE a few seconds ago
  Computed hashes {'opensubtitles': '25313e54433d52f6'} a few seconds ago
  Size is 229095977 a few seconds ago

Running ffprobe manually does this:

C:\Users\Peter>ffprobe "\SYNOLOGY\video\Serier\The Simpsons\Season 30\The Simpsons - S30E09 - Daddicus Finch WEBRip-480p.mp4" ffprobe version N-91500-g3870ed7ab3 Copyright (c) 2007-2018 the FFmpeg developers built with gcc 7.3.1 (GCC) 20180710 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth libavutil 56. 18.102 / 56. 18.102 libavcodec 58. 21.106 / 58. 21.106 libavformat 58. 17.101 / 58. 17.101 libavdevice 58. 4.101 / 58. 4.101 libavfilter 7. 26.100 / 7. 26.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\SYNOLOGY\video\Serier\The Simpsons\Season 30\The Simpsons - S30E09 - Daddicus Finch WEBRip-480p.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 creation_time : 2018-12-03T23:10:48.000000Z title : RARBG - The.Simpsons.S30E09.WEBRip.x264-ION10 encoder : Lavf58.12.100 comment : RARBG - The.Simpsons.S30E09.WEBRip.x264-ION10 Duration: 00:21:08.78, start: 0.000000, bitrate: 1327 kb/s Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x400 [SAR 80:81 DAR 16:9], 1065 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: creation_time : 2018-12-03T23:10:48.000000Z handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default) Metadata: creation_time : 2018-12-03T23:10:48.000000Z handler_name : SoundHandler

morpheus65535 commented 3 years ago

Reopen an issue that hasn't been fixed or even addressed? 8|

I am having the exact same issue btw, running on Windows newest dev version, and with the included ffmpeg/ffprobe binaries copied both to root and to the windows folder.

BAZARR FFprobe was unable to find audio tracks in the file! | a few seconds ago

  • | - BAZARR FFprobe was unable to find video tracks in the file! | a few seconds ago FFprobe found: {} | a few seconds ago BAZARR FFprobe used is c:\windows\ffprobe.EXE | a few seconds ago Computed hashes {'opensubtitles': '25313e54433d52f6'} | a few seconds ago

don't copy ffprobe everywhere, it's already included in Bazarr source and have the required version. Don't install yours.

cooperdk commented 3 years ago

I just added a bit of stuff above, ffprobe is copied from your distro to c:\windows and bazarr finds it there - even though it is where it should be, in X:\Bazarr\bin\Windows\i386\ffmpeg\ffprobe.exe as well as in C:\Bazarr\bin\Windows\i386\ffprobe\ffprobe.exe

Do you want me to add a new issue?

Also, most of the subtitle providers error out now, both on my Synology and on Windows (where I installed a test version). I tried your latest development because you advised someone else to do that due to addic7ed timeout, but that is not enough to make it work.

BTW, you need to update your ffmpeg/ffprobe as they are more than two years old. I work a Python tool myself and have a very recent build I did myself. Although I didn't test this with Bazarr. In this case, though, I think the error might be in subliminal_patch?

Name Status Next Retry
addic7ed ConnectTimeout in 43 minutes
bsplayer Exception in 10 minutes
opensubtitles DownloadLimitReached in 6 hours
podnapisi Good -
subscene TypeError in 3 minutes
subscenter Good -
supersubtitles Good -
tvsubtitles BadZipFile in 4 minutes
yifysubtitles Good -
morpheus65535 commented 3 years ago

That's a support request, not an issue. Come to Discord for support.

cooperdk commented 3 years ago

I will, but I find it is a bug as it seems that no series provider actually find anything. Didn't anyone else mention it? I had no trouble until recently.

Also, this is on two platforms (Win and aarch64) ... however yesterday, it worked at some point but then it stopped.

And, manual searches actually work. This happens when the auto subtitle search (or a recursive search as far as I remember) is started.

morpheus65535 commented 3 years ago

I will, but I find it is a bug as it seems that no series provider actually find anything. Didn't anyone else mention it? I had no trouble until recently.

Also, this is on two platforms (Win and aarch64) ... however yesterday, it worked at some point but then it stopped.

And, manual searches actually work. This happens when the auto subtitle search (or a recursive search as far as I remember) is started.

In the last 7 days, about 15 000 users have been able to download almost 2 000 000 subtitles from 40 different providers. I'm pretty sure Bazarr is working perfectly fine and you have something wrong in your setup. Seeing that you're fiddling with stuff without understanding the consequences, I'm not that surprise that your setup could be broken.

cooperdk commented 3 years ago

On my NAS running on an ARM, it is completely standard.

I haven't changed a bit in the code at all. All I have done is to copy the ff programs to c:\windows and I actually think I did that because I had read somewhere that it might be necessary. If the app was coded to use the internal binaries, it wouldn't look elsewhere. Also, as mentioned, the binaries work perfectly fine outside of Bazarr, both from the runtime directory and from the windows folder, and with the user set up to run bazarr.

The only stuff I tried to change is adaptive and threaded searching, which makes no difference.

But I can try to start a Debian VM from scratch and/or your Docker image and compare the results.

morpheus65535 commented 3 years ago

@cooperdk as suggested come to Discord and the support team will try to help you.

cooperdk commented 3 years ago

I am jumping in soon... I just wanted to try the docker first 👍

cooperdk commented 3 years ago

Never mind this. The issue for me was that there were no subtitles in my defined language. The script probably fired too fast, causing the providers to throttle my IP (I guess)

kavemang commented 3 years ago

Hi, sorry if this is the wrong place, I've added bazarr to my media server stack and am also getting this issue. Just finished confirming my volume paths and can see that bazarr sees the files themselves (I think?) since it's showing me the episodes on its end.

error examples from log:

`Traceback (most recent call last):

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 6884, in get

    return clone.execute(database)[0]

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 4275, in getitem

    return self.row_cache[item]

IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/bazarr/bin/bazarr/get_subtitle.py", line 77, in get_video

    refine_from_ffprobe(original_path, video)

  File "/app/bazarr/bin/bazarr/get_subtitle.py", line 1338, in refine_from_ffprobe

    file_id = TableEpisodes.select(TableEpisodes.episode_file_id, TableEpisodes.file_size)\

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 6887, in get

    raise self.model.DoesNotExist(\'%s instance matching query does \'

database.TableEpisodesDoesNotExist: instance matching query does not exist:

SQL: SELECT "t1"."episode_file_id", "t1"."file_size" FROM "table_episodes" AS "t1" WHERE ("t1"."path" = ?) LIMIT ? OFFSET ?

Params: [\'/media/The Expanse/Season 5/The Expanse - S05E01 - Exodus WEBDL-2160p Proper.mkv\', 1, 0]`

`Traceback (most recent call last):

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 6884, in get

    return clone.execute(database)[0]

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 4275, in getitem

    return self.row_cache[item]

IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/bazarr/bin/bazarr/get_subtitle.py", line 77, in get_video

    refine_from_ffprobe(original_path, video)

  File "/app/bazarr/bin/bazarr/get_subtitle.py", line 1338, in refine_from_ffprobe

    file_id = TableEpisodes.select(TableEpisodes.episode_file_id, TableEpisodes.file_size)\

  File "/app/bazarr/bin/bazarr/../libs/peewee.py", line 6887, in get

    raise self.model.DoesNotExist(\'%s instance matching query does \'

database.TableEpisodesDoesNotExist: instance matching query does not exist:

SQL: SELECT "t1"."episode_file_id", "t1"."file_size" FROM "table_episodes" AS "t1" WHERE ("t1"."path" = ?) LIMIT ? OFFSET ?

Params: [\'/media/Alice in Borderland (2020)/Season 1/S01E01.mkv\', 1, 0]`

morpheus65535 commented 3 years ago

Probably a path mapping issue. As it's a support question, I suggest you come to Discord for live support.

jodiekurnia commented 3 years ago

Hi @morpheus65535 I recently got this issue as well..

here is my debug log

2021-10-21 22:25:09,142 - root                             (7f104503fae0) :  DEBUG (get_subtitle:96) - BAZARR Searching subtitles for this file: /movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4
2021-10-21 22:25:09,142 - subzero.video                    (7f104503fae0) :  DEBUG (video:60) - Parsing video: Limelight.1952.REMASTERED.1080p.BluRay.x265-RARBG.mp4, hints: {'title': 'Limelight', 'type': 'movie'}
2021-10-21 22:25:09,143 - subliminal_patch.core            (7f104503fae0) :  INFO (core:508) - Determining basic video properties for 'Limelight.1952.REMASTERED.1080p.BluRay.x265-RARBG.mp4' in '/movies/Limelight (1952)'
2021-10-21 22:25:09,183 - subliminal_patch.core            (7f104503fae0) :  DEBUG (core:534) - GuessIt found: {
    "title": "Limelight",
    "year": 1952,
    "edition": "Remastered",
    "screen_size": "1080p",
    "source": "Blu-ray",
    "video_codec": "H.265",
    "release_group": "RARBG",
    "container": "mp4",
    "mimetype": "video/mp4",
    "type": "movie"
}
2021-10-21 22:25:09,722 - subliminal_patch.core            (7f104503fae0) :  DEBUG (core:559) - Size is 752877568
2021-10-21 22:25:12,866 - subliminal_patch.core            (7f104503fae0) :  DEBUG (core:587) - Computed hashes {'bsplayer': 'cec936bfe98410eb', 'opensubtitles': 'cec936bfe98410eb', 'opensubtitlescom': 'cec936bfe98410eb'}
2021-10-21 22:25:12,867 - peewee                           (7f104503fae0) :  DEBUG (peewee:3132) - ('SELECT "t1"."title", "t1"."year", "t1"."alternativeTitles", "t1"."format", "t1"."resolution", "t1"."video_codec", "t1"."audio_codec", "t1"."imdbId" FROM "table_movies" AS "t1" WHERE ("t1"."path" = ?)', ['/movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4'])
2021-10-21 22:25:12,899 - peewee                           (7f104503fae0) :  DEBUG (peewee:3132) - ('SELECT "t1"."movie_file_id", "t1"."file_size" FROM "table_movies" AS "t1" WHERE ("t1"."path" = ?) LIMIT ? OFFSET ?', ['/movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4', 1, 0])
2021-10-21 22:25:12,900 - peewee                           (7f104503fae0) :  DEBUG (peewee:3132) - ('SELECT "t1"."ffprobe_cache" FROM "table_movies" AS "t1" WHERE ("t1"."path" = ?) LIMIT ? OFFSET ?', ['/movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4', 1, 0])
2021-10-21 22:25:12,900 - root                             (7f104503fae0) :  DEBUG (utils:148) - BAZARR returning this binary: /usr/bin/ffprobe
2021-10-21 22:25:12,950 - root                             (7f104503fae0) :  ERROR (get_subtitle:83) - BAZARR Error trying to get video information for this file: /movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4
Traceback (most recent call last):
  File "/app/bin/bazarr/../libs/knowit/api.py", line 64, in know
    result = provider.describe(video_path, context)
  File "/app/bin/bazarr/../libs/knowit/providers/ffmpeg.py", line 230, in describe
    data = self.executor.extract_info(video_path)
  File "/app/bin/bazarr/../libs/knowit/providers/ffmpeg.py", line 89, in extract_info
    json_dump = self._execute(filename)
  File "/app/bin/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.9/site-packages/gevent/subprocess.py", line 404, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-sexagesimal', '/movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/bin/bazarr/get_subtitle.py", line 77, in get_video
    refine_from_ffprobe(original_path, video)
  File "/app/bin/bazarr/get_subtitle.py", line 1347, in refine_from_ffprobe
    data = parse_video_metadata(file=path, file_size=file_id['file_size'],
  File "/app/bin/bazarr/embedded_subs_reader.py", line 111, in parse_video_metadata
    data["ffprobe"] = api.know(file)
  File "/app/bin/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.4                          |
|                                                       |
|                        enzyme                         |
|                         0.4.1                         |
+-------------------------------------------------------+
|                   profile: default                    |
+-------------------------------------------------------+
Traceback (most recent call last):
  File "/app/bin/bazarr/../libs/knowit/api.py", line 64, in know
    result = provider.describe(video_path, context)
  File "/app/bin/bazarr/../libs/knowit/providers/ffmpeg.py", line 230, in describe
    data = self.executor.extract_info(video_path)
  File "/app/bin/bazarr/../libs/knowit/providers/ffmpeg.py", line 89, in extract_info
    json_dump = self._execute(filename)
  File "/app/bin/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.9/site-packages/gevent/subprocess.py", line 404, in check_output
    raise CalledProcessError(retcode, process.args, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/ffprobe', '-v', 'quiet', '-print_format', 'json', '-show_format', '-show_streams', '-sexagesimal', '/movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4']' returned non-zero exit status 1.

+-------------------------------------------------------+
|      Please report any bug or feature request at      |
|       https://github.com/ratoaq2/knowit/issues.       |
+-------------------------------------------------------+
2021-10-21 22:25:12,951 - root                             (7f104503fae0) :  DEBUG (get_subtitle:293) - BAZARR Ended searching Subtitles for file: /movies/Limelight (1952)/Limelight (1952) - Bluray-1080p.mp4

I think bazarr / ffmpeg / ffprobe unable to get a whole video file, since my media is located at cloud and mounted using rclone. is it the expected behaviour?

EDIT: but I see

2021-10-21 22:25:09,183 - subliminal_patch.core            (7f104503fae0) :  DEBUG (core:534) - GuessIt found: {
    "title": "Limelight",
    "year": 1952,
    "edition": "Remastered",
    "screen_size": "1080p",
    "source": "Blu-ray",
    "video_codec": "H.265",
    "release_group": "RARBG",
    "container": "mp4",
    "mimetype": "video/mp4",
    "type": "movie"
}

shouldn't it able to download the subs?

morpheus65535 commented 3 years ago

@jodiekurnia that's a different issue. This media file could be corrupted. You can try to run the ffprobe command by yourself with the sae parameters and see the output.

BTW: GuessIt only use filename to guess where ffprobe read the actual file to get better metadata about the media container.

kavemang commented 3 years ago

Probably a path mapping issue. As it's a support question, I suggest you come to Discord for live support.

I can go into shell for the container and see the files exactly where theyre supposed to be

morpheus65535 commented 3 years ago

Come to Discord. I'm not doing debug over Github issue.