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

converted vtt file contains text format in srt output #41

Open
darodi opened this issue Jan 21, 2022 · 2 comments
Open

converted vtt file contains text format in srt output #41

darodi opened this issue Jan 21, 2022 · 2 comments

Comments

@darodi
Copy link

darodi commented Jan 21, 2022

converted vtt file contains text format in srt output

source file
https://gist.github.com/darodi/c95ba5592933d11f8963626944ea4735#file-je-suis-la-2853734-fra-vtt

target file
https://gist.github.com/darodi/c95ba5592933d11f8963626944ea4735#file-je-suis-la-2853734-fra-vtt-srt

as you can see,

1
00:00:07,120 --> 00:00:09,480 
<c.magenta.bg_black>Musique douce</c>

insead of

1
00:00:07,120 --> 00:00:09,480 
<font color=#ff00ff">Musique douce</font> 
@isaacbernat
Copy link
Owner

thanks for reporting. I merged the fix in this PR #42 feel free to add more properties to "font" and star the project if you like it.

@darodi
Copy link
Author

darodi commented Jan 30, 2022

Thanks for the PR.

In the meantime, I wrote a script by myself, nearly from scratch to do the conversion.

Here are the issues I had.

for example:
<c.magenta.bg_black><i.blue>Some italic</i> and normal coloured text. By the way, 2 &lt; 3 !</c>

is well rendered with this output
<font color="#ff00ff"><i><font color="#0000ff">Some italic</font></i> and normal coloured text. By the way, 2 < 3 ! </font>

Here is the script if you want to check the code
https://github.com/darodi/vtt-to-srt/blob/master/vtt-to-srt.py

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

No branches or pull requests

2 participants