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

Embedded Subtitles transform ass to srt #2514

Closed
MiguelAngelLV opened this issue Jun 4, 2024 · 16 comments · Fixed by #2564 or #2581
Closed

Embedded Subtitles transform ass to srt #2514

MiguelAngelLV opened this issue Jun 4, 2024 · 16 comments · Fixed by #2564 or #2581
Assignees

Comments

@MiguelAngelLV
Copy link

MiguelAngelLV commented Jun 4, 2024

Describe the bug
When Bazarr extracts an ass subtitle from mkv, the file is converted to .srt (not only the extension, complete conversion).

I have selected "use original format" and the problem persists.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Embedded Provider
  2. Enable "User original format"
  3. "Download" an ass subtitle from a mkv

Expected behavior
Get an .ass subtitle

Screenshots

image

image

image

image

Software (please complete the following information):

  • Bazarr: 1.4.3
  • Radarr version: 5.6.0.8846
  • Sonarr version 4.0.5.1710
  • OS: Linux (Raspberry Pi)

Additional context
Add any other context about the problem here.

@hnorgaar
Copy link

hnorgaar commented Jun 4, 2024

Both your Sonarr and Radarr version is years old, so please update

@MiguelAngelLV
Copy link
Author

Updated the Sonarr and Radarr version in the issue description, although I actually use bazarr manually normally.

@hnorgaar
Copy link

hnorgaar commented Jun 4, 2024

If you any post scripts as sync, that might change your format or Sub-Zero Modifications

@MiguelAngelLV
Copy link
Author

I don't have any post process:

image

@morpheus65535
Copy link
Owner

@vitiko98 Could you take a moment to check this one please?

@vitiko98
Copy link
Collaborator

I will need some debug logs from your part. This is probably caused by a fallback command from ffmpeg's adapter.

This is a test over a normal container with ASS subtitles, and the Subtitle interface is getting the respective format:

image

@MiguelAngelLV
Copy link
Author

2024-06-18 10:39:59|INFO    |subliminal_patch.core_persistent|Downloading subtitle <EmbeddedSubtitle: [Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.ass [<Language: alpha3=spa>]> with score 360|
2024-06-18 10:39:59|INFO    |subliminal_patch.core           |Downloading subtitle <EmbeddedSubtitle: [Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.ass [<Language: alpha3=spa>]>|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: english|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Found extra language ('por', 'BR')|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: portuguese(brazil)|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Found extra language ('spa', 'MX')|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: spanish(latin_america)|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: spanish|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: french|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: german|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: italian|
2024-06-18 10:39:59|DEBUG   |fese.tags                       |Detected tags class: <class 'fese.tags.FFprobeMkvSubtitleTags'>|
2024-06-18 10:39:59|DEBUG   |fese.disposition                |Generic disposition title found: russian|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Found subtitle streams: [<ASS: FFprobeMkvSubtitleTags: en@GENERIC>, <ASS: FFprobeMkvSubtitleTags: pt-BR@GENERIC>, <ASS: FFprobeMkvSubtitleTags: es-MX@GENERIC>, <ASS: FFprobeMkvSubtitleTags: es@GENERIC>, <ASS: FFprobeMkvSubtitleTags: fr@GENERIC>, <ASS: FFprobeMkvSubtitleTags: de@GENERIC>, <ASS: FFprobeMkvSubtitleTags: it@GENERIC>, <ASS: FFprobeMkvSubtitleTags: ru@GENERIC>]|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/4d07dab166da43448aa66343ccd229f5.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/84ff934bead9080ba7793804e5110321.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/e449c34ceb522658ed17b041ae61c6cb.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/df6b08f1429fb87ca322af06acdef581.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/0e2edc5a7104f0cb9d9c89ca04e37084.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/c5786fda36789823f1ec054bbaf495e0.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/223c97ac1fe8e87187de7c3eaa2f730c.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Appending subtitle path: /config/cache/embeddedsubtitlesprovider/46f35750b3569d7addda6e9a550804a7.ass|
2024-06-18 10:39:59|DEBUG   |fese.container                  |Extracting subtitle with command /usr/bin/ffmpeg -v warning -y -i /media/shows/A Salad Bowl of Eccentrics/[Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].mkv -map 0:2 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/4d07dab166da43448aa66343ccd229f5.ass -map 0:3 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/84ff934bead9080ba7793804e5110321.ass -map 0:4 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/e449c34ceb522658ed17b041ae61c6cb.ass -map 0:5 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/df6b08f1429fb87ca322af06acdef581.ass -map 0:6 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/0e2edc5a7104f0cb9d9c89ca04e37084.ass -map 0:7 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/c5786fda36789823f1ec054bbaf495e0.ass -map 0:8 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/223c97ac1fe8e87187de7c3eaa2f730c.ass -map 0:9 -c:s copy -f ass /config/cache/embeddedsubtitlesprovider/46f35750b3569d7addda6e9a550804a7.ass|
2024-06-18 10:40:03|INFO    |engineio.server                 |L4UyzmmD6tjQIUmwAAAA: Client is gone, closing socket|
2024-06-18 10:40:03|INFO    |engineio.server                 |L4UyzmmD6tjQIUmwAAAA: Client is gone, closing socket|
2024-06-18 10:40:19|INFO    |engineio.server                 |mRCzOlrX1s0ux2leAAAC: Sending packet PING data None|
2024-06-18 10:40:19|INFO    |engineio.server                 |mRCzOlrX1s0ux2leAAAC: Received packet PONG data |
2024-06-18 10:40:30|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:7878|
2024-06-18 10:40:30|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:7878 "GET /api/system/status?apikey=(removed) HTTP/1.1" 404 0|
2024-06-18 10:40:30|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:7878|
2024-06-18 10:40:30|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:7878 "GET /api/v3/system/status?apikey=(removed) HTTP/1.1" 200 None|
2024-06-18 10:40:30|DEBUG   |root                            |BAZARR got this Radarr version from its API: 5.6.0.8846|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.providers.embeddedsubtitles|Found modifiers for <ASS: FFprobeMkvSubtitleTags: es@GENERIC> type: {<function _clean_ass_subtitles at 0x7f7da562a0>}|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.providers.embeddedsubtitles|Running <function _clean_ass_subtitles at 0x7f7da562a0> modifier for /config/cache/embeddedsubtitlesprovider/df6b08f1429fb87ca322af06acdef581.ass|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.providers.embeddedsubtitles|Cleaned lines: 33|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.providers.embeddedsubtitles|Lines written to output path: /config/cache/embeddedsubtitlesprovider/df6b08f1429fb87ca322af06acdef581.ass|
2024-06-18 10:40:39|INFO    |subliminal_patch.subtitle       |Guessing encoding for language es|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.subtitle       |Trying encodings ['utf-8', 'windows-1252', 'iso-8859-15', 'iso-8859-9', 'iso-8859-4', 'iso-8859-1']|
2024-06-18 10:40:39|INFO    |subliminal_patch.subtitle       |Guessed encoding utf-8|
2024-06-18 10:40:39|ERROR   |subliminal_patch.subtitle       |PySRT-parsing failed, trying pysubs2|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.subtitle       |Trying parsing with PySubs2|
2024-06-18 10:40:39|DEBUG   |root                            |at line 1: section heading [Script Info]|
2024-06-18 10:40:39|DEBUG   |root                            |at line 12: section heading [V4+ Styles]|
2024-06-18 10:40:39|DEBUG   |root                            |at line 28: section heading [Events]|
2024-06-18 10:40:39|INFO    |subliminal_patch.subtitle       |Got format: ass|
2024-06-18 10:40:39|DEBUG   |root                            |BAZARR Subtitles file downloaded for this file: /media/shows/A Salad Bowl of Eccentrics/[Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].mkv|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.core           |Subtitle formats requested: ('srt',)|
2024-06-18 10:40:39|DEBUG   |subliminal_patch.core           |Saving <EmbeddedSubtitle: [Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.ass [<Language: alpha3=spa>]> to '/media/shows/A Salad Bowl of Eccentrics/[Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.srt'|
2024-06-18 10:40:39|DEBUG   |root                            |BAZARR Subtitles file saved to disk: /media/shows/A Salad Bowl of Eccentrics/[Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.srt|
2024-06-18 10:40:39|DEBUG   |root                            |Sync checker: <function sync_checker at 0x7f82342660>|
2024-06-18 10:40:39|DEBUG   |root                            |Checker data [{'blacklisted_languages': [], 'blacklisted_providers': ['embeddedsubtitles', 'subtitulamostv']}] for <EmbeddedSubtitle: [Erai-raws] Henjin no Salad Bowl - 11 [1080p][Multiple Subtitle][FDD51DB0].es.ass [<Language: alpha3=spa>]>|
2024-06-18 10:40:39|DEBUG   |root                            |BAZARR Sync checker not passed. Won't sync.|
2024-06-18 10:40:39|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8989|
2024-06-18 10:40:39|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8989 "POST /api/v3/command?apikey=(removed) HTTP/1.1" 201 None|
2024-06-18 10:40:39|INFO    |socketio.server                 |emitting event "data" to all [/]|
2024-06-18 10:40:39|INFO    |engineio.server                 |mRCzOlrX1s0ux2leAAAC: Sending packet MESSAGE data 2["data",{"type":"series","action":"update","payload":50}]|
2024-06-18 10:40:39|INFO    |socketio.server                 |emitting event "data" to all [/]|
2024-06-18 10:40:39|INFO    |engineio.server                 |mRCzOlrX1s0ux2leAAAC: Sending packet MESSAGE data 2["data",{"type":"episode-wanted","action":"delete","payload":4055}]|
2024-06-18 10:40:39|INFO    |socketio.server                 |emitting event "data" to all [/]|
2024-06-18 10:40:39|INFO    |engineio.server                 |mRCzOlrX1s0ux2leAAAC: Sending packet MESSAGE data 2["data",{"type":"episode-history","action":"update","payload":null}]|
2024-06-18 10:40:39|DEBUG   |apprise                         |Language set to en|

@MiguelAngelLV
Copy link
Author

MiguelAngelLV commented Jun 18, 2024

The problem may be this:

2024-06-18 10:40:39|DEBUG   |subliminal_patch.core           |Subtitle formats requested: ('srt',)|

But I have checked "use original format".

Maybe there is another option for request format?

@vitiko98
Copy link
Collaborator

Logs did the trick. I think this is related to an attribute from Subtitle.

Please try again in upcoming beta.

@MiguelAngelLV
Copy link
Author

MiguelAngelLV commented Jun 24, 2024

I tried beta 10, the problem persists:

2024-06-24 15:51:35|DEBUG   |subliminal_patch.subtitle       |Trying parsing with PySubs2|
2024-06-24 15:51:35|DEBUG   |root                            |at line 1: section heading [Script Info]|
2024-06-24 15:51:35|DEBUG   |root                            |at line 12: section heading [V4+ Styles]|
2024-06-24 15:51:35|DEBUG   |root                            |at line 27: section heading [Events]|
2024-06-24 15:51:35|INFO    |subliminal_patch.subtitle       |Got format: ass|
2024-06-24 15:51:35|DEBUG   |root                            |BAZARR Subtitles file downloaded for this file: /media/shows/Mushoku Tensei - Jobless Reincarnation/Season 2/[Judas] Mushoku Tensei - S02E23.mkv|
2024-06-24 15:51:35|DEBUG   |subliminal_patch.subtitle       |Will assume srt format|
2024-06-24 15:51:35|DEBUG   |subliminal_patch.core           |Subtitle formats requested: ('srt',)|
2024-06-24 15:51:35|DEBUG   |subliminal_patch.core           |Saving <EmbeddedSubtitle: [Judas] Mushoku Tensei - S02E23.es.ass [<Language: alpha3=spa;hi=True>]> to '/media/shows/Mushoku Tensei - Jobless Reincarnation/Season 2/[Judas] Mushoku Tensei - S02E23.es.hi.srt'|
2024-06-24 15:51:35|DEBUG   |root                            |BAZARR Subtitles file saved to disk: /media/shows/Mushoku Tensei - Jobless Reincarnation/Season 2/[Judas] Mushoku Tensei - S02E23.es.hi.srt|
2024-06-24 15:51:35|DEBUG   |root                            |Sync checker: <function sync_checker at 0x7fb9bb6660>|
2024-06-24 15:51:35|DEBUG   |root                            |Checker data [{'blacklisted_languages': [], 'blacklisted_providers': ['embeddedsubtitles', 'subtitulamostv']}] for <EmbeddedSubtitle: [Judas] Mushoku Tensei - S02E23.es.ass [<Language: alpha3=spa;hi=True>]>|
2024-06-24 15:51:35|DEBUG   |root                            |BAZARR Sync checker not passed. Won't sync.|
2024-06-24 15:51:35|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8989|
2024-06-24 15:51:35|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8989 "POST /api/v3/command?apikey=(removed) HTTP/1.1" 201 None|

Maybe _og_format is not updated?

@vitiko98
Copy link
Collaborator

@MiguelAngelLV Manual download or automatic download?

@MiguelAngelLV
Copy link
Author

@vitiko98 manual

vitiko98 added a commit that referenced this issue Jun 28, 2024
@vitiko98
Copy link
Collaborator

vitiko98 commented Jun 28, 2024

So it might be related to the REST API.

This is the payload for manual episode subtitles:

image

The code in api/providers/provider_episodes.py is expecting it to be a literal boolean string:

image

Consequentially, the code in bazarr/subtitles/manual.py will return False no matter the payload.

image

I made a commit to mitigate this. Please try again in upcoming beta.

@morpheus65535
Copy link
Owner

@MiguelAngelLV can you confirm if the issue is fixed?

@MiguelAngelLV
Copy link
Author

Solved!

@LucasD-C
Copy link

This is working only when using manual search. When doing automatic search it still gives you an srt sub.

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