Allows you to download subtitles from Amazon Video
< Opinie na Amazon Video - subtitle downloader
Send some example files.
Sure.
Here I cannot upload the subtitle file as downloaded by the script (do let me know if I can share it to you in a different way). I can only upload here image files.
If I open the file in a subtitle editor (I use MacOS so I use Jubler), only the first line in each subtitle entry is shown. For instance take a look at the screenshot file (Screen Shot 2024-06-06.jpg), you can see selected some of the subtitles entries where only the first line of text is shown, but not the second.
When the video player loads the subtitle file, I get the same behavior, only the first line of text is shown with the video.
This is why I was thinking only the very first line of text was being exported when saving the subtitle with the script, but it's not that.
If I open the file in a regular text editor, I was able to see that what is really causing the problem is that some subtitle entries have an extra line between the first and the second lines of text, which is not valid in SRT format (as both subtitle editor and video player do not render that second line).
As an example:
6
00:00:22,240 --> 00:00:24,760
Pero el gran hombre
le pisa los talones.
Which would load correctly if it was:
6
00:00:22,240 --> 00:00:24,760
Pero el gran hombre
le pisa los talones.
It looks like the script can be enhanced to clean any extra new lines or blank spaces using a regex between the lines of text within a single subtitle entry/line.
You can upload them somewhere and send a link here. But I'm more interested in the original file, before conversion. Open my script, find the line that says function xmlToSrt(xmlString, lang) {
and right below that line add return xmlString;
. Now the script will download subtitles in the original format. I want to see that format, maybe Amazon changed something.
OK I did what you suggested, and uploaded the files here:
https://filebin.net/0h4cpmzl8w8tpd78
The file FBI.S01E01.Pilot.WEBRip.Amazon.es-ar[sdh].srt is the original file before the change you suggested, and the file FBI.S01E01.Pilot.WEBRip.Amazon.es-ar[sdh]-1.srt is the one after your changes.
Hope this helps. As an additional information, the subtitles with more than 1 text line do render in Prime Video with the extra empty line.
So in the example I gave you:
6
00:00:22,240 --> 00:00:24,760
Pero el gran hombre
le pisa los talones.
The 3 lines (1. text, 2. empty 3. text) are rendered with the video. My point is, even though the original subtitle format used by Prime Video does work there even with an empty line in between 2 text lines, that does not translate correctly to subrip. The empty line must be removed while transforming the subtitle lines into subrip format.
Thanks
Ah. They didn't change anything. They just used two linebreaks (<br />
) instead of one. And in SRT format double linebreak means another subtitle line, except it's missing the timestamps, so it's discarded as invalid line. Version 1.9.13 should fix it.
Exactly, I tried to explain the problem about the extra line break but maybe I did not do so correctly.
Thanks for fixing it, I will test the new version soon.
Hello,
Great script! I want to report that it does not correctly fetch all the lines from the video subtitle.
Whenever a subtitle has more than 1 line it seems to fetch only the first one. So a lot of the subtitle contents are being lost.
I am seeing this behavior with the TV Show FBI downloading the subtitles in Spanish LA.
Not sure if this happens with other languages.
Thanks