Subtitle Edit used on Der Froschkönig (2008)

All hardware and software related discussion topics here. Advice, discussion and opinions on either topic are welcome.
User avatar
pillowbaker
Posts: 2111
Likes:
Joined: Mon Mar 07, 2022 4:05 am

Subtitle Edit used on Der Froschkönig + other films

Post by pillowbaker »   0 likes

Pardon the additional post. I attempted to do some subtitle work. Would anyone be interested in checking my work?

In case goku33 would like to share this movie on his own, I'll focus only on subs. I tried to make machine-translated English subs from the German subs that are included with the movie that goku33 linked. I used the yt-dlp "--write-subs de" command line. It would not let me download it as an srt, as the file type is ttml, or rather I could not get yt-dlp to auto-convert it for me. The ttml includes more subtitle coding info than I normally see.

I loaded it up in subtitle edit, and just for the heck of it, "batch converted" it to srt, simple because it's what I am used to seeing. I used batch convert because I didn't see any other convert options in my cursory attempt at looking.

I then used the auto-translate option to translate to English. By the way, it asked for a google API key, but I wasn't sure what that was, and it seemed to translate the text without it. However, it did give me an error, "parameters out of range" at the end. It still looks to be in English through to the end. This something I should look into?

After loading the subs with the video in VLC, I was able to follow along quite nicely in English, although with the occasional odd phrasing, of course. One note, the timing of the subs as originally timed from the original file, is slightly skewed. It follows well enough, but sometimes a fraction of a second early/late, but overall pace is maintained.

Other side note, the subtitle coding includes colored text for certain areas, such as "Girl count cannon blasts", but it's entirely in black, which can be difficult to read. Any way to switch that more quickly than changing color codes line by line?

Other question, is there any way to use deepL instead of google to translate subs? I sometimes notice slightly better translations with deepL.

[Night457 Moderator edit. pillowbaker's subtitles are posted in the movie thread:
viewtopic.php?p=97426#p97426 ]
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

pillowbaker wrote: [various subtitle questions]
Hey, I have used SubtitleEdit a little so I can answer some of your questions!
Spoiler:

I used the yt-dlp "--write-subs de" command line.
You can also use "--all-subs" instead to get all the subtitles without having to specify the language.
I used batch convert because I didn't see any other convert options in my cursory attempt at looking.
Batch convert is normally for a "batch" of multiple files, in this case it was a "batch" of one!

Use "File / Save as..." The default is .srt but you can use the dropdown arrow to select another file type.
By the way, it asked for a google API key, but I wasn't sure what that was, and it seemed to translate the text without it. However, it did give me an error, "parameters out of range" at the end. It still looks to be in English through to the end.
Check your original TTML file and/or the original German .srt, because the English might have lines that are cut off and not translated. This would make your English subtitle too short.

There was a post here long ago where someone explained to me about Google API keys but I don't remember the details. I have not had that demand in a while. It would occur for me PART WAY through a translation. If it interrupts the translation before completion then you need to switch your IP (such as by using a Proxy or switching to a different VPN server) and then continue by clicking Translate again. You can also switch IPs by disconnecting and then reconnecting to your WiFi. (Restarting your computer also works, but you have to save your Subtitle translation in process first!) The worst case scenario is that you copy and paste and translate those lines separately. You may even have to create a NEW file that has just those lines, then copy and paste the additions to the end of the almost-complete file in SubtitleEdit or in Notepad.
Other side note, the subtitle coding includes colored text for certain areas, such as "Girl count cannon blasts", but it's entirely in black, which can be difficult to read. Any way to switch that more quickly than changing color codes line by line?
Yes, you can change ALL occurrences of a color with a CTRL+H find and replace. You must find the Hex color value that you want to use online first.

Normally the different color coding indicates different speakers and also the Hearing Impaired information.

This file indicates the colors for the different characters in the subtitle text at the beginning, such as
<font color="#ffff00">Yellow: Princess Sophie</font>

(All of Princess Sophie's dialog will be #ffff00 also known as "Yellow".)

In your example
<font color="#0000ff">Girls count cannon shots.</font>
The color #0000ff is used for Hearing-Impaired information in this subtitle, not dialog. But my quick Google search says it is blue instead of black! I did not play it back in VLC to see what I get. Whatever video player you use might have non-standard color choices, or be unable to read some of the color codes properly.

Anyway, if you figure out what color you want you can use CTRL+H to do find and replace, replacing #0000ff with some other color for the whole file. Here is one place where you can look up HTML Hex color codes:

https://htmlcolorcodes.com/

My own preference is to eliminate all of them and just have plain white subtitles for everything. This can take some work. Detailed below:

I FIRST have to figure out what color is for the Hearing Impaired information so I can edit it accordingly. In this subtitle file I would do
CTRL+H and replace
<font color="#0000ff">
with
left bracket [

[EDIT: Unsurprisingly, ghost has an easier and faster way to do this. Ignore the strike-through text and read the revised instructions here: viewtopic.php?p=97481#p97481 ]

[EDIT: It is best to find and replace the HI information in the ORIGINAL text with brackets, and then do the final translation. Otherwise your translation may lose some of the line breaks and text will run together. Grrrr. However, I usually have to to a preliminary machine translation just to figure out what color shows the HI information and refer to that color when editing the original.

So the order is:
1) Machine translation of colored original language for a temporary reference.
2) Identify HI color coding from the translation.
3) Replace HI color coding with [ and ] brackets in the original language.
4) Remove all other color coding information in the original language.
5) Machine translate the new colorless original language. Ignore your previous colored translation.

Sometimes you get lucky and even when there is a colored subtitle file, the HI information is indicated with asterisks ( * HI text * ). Then there is no need to use brackets!]


Then I would go to "Edit / Multiple replace" (CTRL+ALT+M) and one-by-one fill in and replace the values I want to eliminate entirely. For example, the Yellow:
<font color="#0000ff">
would get replaced with nothing, not even a space.

</font> at the end of lines would also get replaced with nothing. Repeat the process, copying and pasting the values into "Multiple replace" until all the color is gone.

You can see in my picture that I already have values saved from previous color-elimination efforts. When I encounter another color I add it to the list! I do not have to search out all the colors every time because Subtitle Edit saves the values.
SE.jpg
Then when I am all done I do a CTRL+F find search to find the left bracket [ at the beginning of Hearing Impaired text and manually insert a right bracket ] at the end of the Hearing Impaired text. I think that this CAN be done by an automated SubtitleEdit process, but often times a subtitle line will have BOTH Hearing Impaired AND dialog. Once the colors are eliminated, an actual human has to figure out which is which, because the automated process might put the bracket in the wrong place.

Once all the colors are gone and Hearing Impaired information is indicated with brackets [ ] I save it as a .sdh.srt file to indicate it is SDH. If I want a separate subtitle that is dialog only and does NOT have any SDH / HI, I use "Tools / Remove text for hearing impaired" (CTRL+Shift+H) and select the values accordingly. Once edited, I save a separate .srt file that is only dialog. I ALWAYS keep previous edits in case I delete something that I should NOT have deleted!

You can also attempt various tricks using those tools to eliminate HI entirely earlier in the process, but you may very well eliminate dialog too if you do it wrong. That is why I prefer to manually review the HI information.
Other question, is there any way to use deepL instead of google to translate subs?
I used to be able to upload an entire subtitle file and translate it, but eventually it started demanding MONEY for larger files so I abandoned DeepL entirely.

Maybe someone else has figured a way around this.
You do not have the required permissions to view the files attached to this post.
User avatar
ghost
Site Admin
Posts: 8460
Likes:
Joined: Sun Mar 07, 2004 1:00 am

Subtitle Edit used on Der Froschkönig (2008)

Post by ghost »   0 likes

Thanks Night for your very helpful "turorial".

I wanted to start replying to pillowbaker, but I saw that you already did the job in your spoiler! :thumbsup

BTW: I hadn't discover the multiple replace function yet.
User avatar
pillowbaker
Posts: 2111
Likes:
Joined: Mon Mar 07, 2022 4:05 am

Subtitle Edit used on Der Froschkönig (2008)

Post by pillowbaker »   0 likes

Whoa Night, thank you for the instruction. I appreciate the time it must have taken you to write that. 8-) :mrgreen:
Night457 wrote:Check your original TTML file and/or the original German .srt, because the English might have lines that are cut off and not translated. This would make your English subtitle too short.
I coulda sworn I saw it translated till the end, But you're right, it is very nearly to the end, but a last few lines are cut off. I think I am going to go back to scratch and create a whole new file.
The color #0000ff is used for Hearing-Impaired information in this subtitle, not dialog. But my quick Google search says it is blue instead of black! I did not play it back in VLC to see what I get.
Well, you're right again. It certainly IS blue. I forget sometimes that I operate much of the day and all of the evenings with a strong blue light filter on with my monitor already as dim as I can get it. This combination turned the text nearly black.

I am unsure about whether I want to commit to removing all of the colors, but I think I'll go through the process a bit to learn the techniques. Thanks again for spending all the time explaining a method.
You can also attempt various tricks using those tools to eliminate HI entirely earlier in the process, but you may very well eliminate dialog too if you do it wrong. That is why I prefer to manually review the HI information.
I recall you showed me that trick with the tubi subs from Beneath Clouds. I believe it displayed a screened that allowed you to double check its work before deleting everything it considers HI.

I'll definitely keep the SDH files and share it at the same time for anyone who wants it.

Next, I'll show you my work that I've been doing with subtitles that I'm having difficulty timing (it's a different wacky project). ;)
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

ghost wrote: I wanted to start replying to pillowbaker, but I saw that you already did the job in your spoiler! :thumbsup
I am glad that I apparently did not miss anything that you would have thought of.
BTW: I hadn't discover the multiple replace function yet.
WHAAAAAAAAAAT?!??!?!?! How in the heck do you edit your subtitle files?

Actually it is just an advanced version of CTRL+H. You can review the entirety of the potential replacements and deselect the ones you do NOT want to replace rather than deciding one at a time. It will also save all your replacement filters so that they can be used again later for other subtitles. This is great because I get rid of color coding frequently, and I only have to add more colors as I encounter them.

BTW, ghost: Thank you VERY much for introducing me to SubtitleEdit in the first place!! It has made my life so much better!
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

More techy subtitle stuff in response to pillowbaker:
Spoiler:

pillowbaker wrote: I am unsure about whether I want to commit to removing all of the colors, but I think I'll go through the process a bit to learn the techniques.
Just removing the colors is easy, and it gets easier with subsequent subtitles because the replacement filters are saved. The more time-consuming part is maneuvering around the HI. I found that out the hard way when I removed all the colors first and then had this strange "dialog" that was actually SDH.
I believe it displayed a screened that allowed you to double check its work before deleting everything it considers HI.
Yes. That's why I go to the effort of putting in the brackets [ ] because those are standard for HI.

Of course you can leave all the colors in, but they may not display on some players. Personally I never like multi-color subtitles because I find them distracting. I like Yellow subtitles for black-and-white films, particularly if they have bright whites!
I'll definitely keep the SDH files and share it at the same time for anyone who wants it.
Originally I eliminated them because I don't use the SDH portion, but then I realized that other FLM members may find them useful. There was no point getting rid of them if I already HAD them! Now I routinely save them even for non-FLM movies that I am not sharing anyway!
Next, I'll show you my work that I've been doing with subtitles that I'm having difficulty timing (it's a different wacky project). ;)
I hope it is something that I can easily figure out. There are some subtitles that I give up on retiming! I have never figured out why some of them are difficult.

Anyway, since you already have that planned, could you make a post for it in
Board index > Discussion / Information > Hardware & Software
instead of our filling up movie threads even more?

I realize that many people just want to grab some videos and not be drowned with my epic-length essays. They can easily avoid Hardware & Software discussions that don't interest them. Those who are interested might learn something.
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

Night457 wrote:
pillowbaker wrote: [various subtitle questions]
Hey, I have used SubtitleEdit a little so I can answer some of your questions!
I just started doing a color-coded translation of a different movie and I realized that I forgot a VERY important step in my instructions. I have added an EDIT in RED to my original post.

Sorry about that! Information overload from detailing most of the steps from memory!

EDIT EDIT: Because of ghost's information below, I revised my instructions AGAIN after the above revision! This old dog is still learning something new every day!
User avatar
ghost
Site Admin
Posts: 8460
Likes:
Joined: Sun Mar 07, 2004 1:00 am

Re: Subtitle Edit used on Der Froschkönig (2008)

Post by ghost »   1 likes

WHAAAAAAAAAAT?!??!?!?! How in the heck do you edit your subtitle files?
I always did it this way:

[Image]
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

See ghost's example, pillowbaker? Do that instead!
ghost wrote: Fri Oct 21, 2022 7:01 pm I always did it this way:
Well I'll be a son of a ...

And I had actually searched for an option to remove color before I did each color manually, but apparently I had not looked THERE! That is MUCH easier than loading up the Multiple Replace with individual colors! Holy crap, thanks! And I actually recall seeing the option for bold and italics, but I guess I did not read the whole list. It does not help that that option does not even APPEAR in the menus unless you select at least one entire subtitle line and then LOOK for it. It is like I should read the fine manual for SubtitleEdit or something.

I would still do a replace with brackets [ if there is any color that identifies HI information, but all the other colors should go much faster using ghost's way. I am going to have to try that soon.

(And for repeated dialog replacements I would still use the Multiple Replace, so I could de-select the inapplicable ones.)
User avatar
Night457
Global Moderator
Posts: 5222
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Subtitle Edit used on Der Froschkönig (2008)

Post by Night457 »   0 likes

Holy monkey's nuts!!! That is so much faster!!! Can I go back and DELETE all my previous posts in this thread, which are just a bunch of time-wasting bullshit? I tried this on a subtitle that had HI in a separate color, and the ENTIRE PROCESS took less than a minute once that color was identified!

New technique:
1) Do a machine translation on the original language. See if there is a color that identifies HI/SDH by reading the text.

2a) If there is NO color that identifies HI info, then in the ORIGINAL LANGUAGE file do CTRL+A to select the entire subtitle lines, Right-click on the selected area, choose Remove formatting and then Remove color. You now have a colorless original language file. Save it and go to Step 5.

{OR}

2b) If there IS a color that identifies HI info, then in the ORIGINAL LANGUAGE file highlight that color (e.g., <font color="#0000ff">), copy it with CTRL+C, and use CTRL+H to replace it with [ left bracket.
3) Do CTRL+A to select the entire subtitle file, Right-click on the selected area, choose Remove formatting and then Remove color.
4) You will still have </font> on the lines with the [ left bracket. Highlight </font>, copy it with CTRL+C, and use CTRL+H to replace it with ] right bracket. Do this only AFTER you have removed the other colors. Now all the colors are gone AND the HI information is identified with [ ] brackets! Save this new colorless original language file.
5) Do a new machine translation on the colorless subtitle file.

Seriously, it took me longer to type this than it would take to temporarily machine-translate a colored subtitle AND do the replacements on the original using ghost's superior technique AND do a final machine translation.

Maybe I should start to RTFM.
Post Reply