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 #9

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

converted vtt file contains text format in srt output #9

darodi opened this issue Jan 21, 2022 · 4 comments
Labels
help wanted Extra attention is needed

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/3ff8be373302fcd8c8bb0f9069dc7208#file-je-suis-la-2853734-fra-vtt

target file
https://gist.github.com/darodi/3ff8be373302fcd8c8bb0f9069dc7208#file-je-suis-la-2853734-fra-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 
Musique douce
@zezo010 zezo010 added the help wanted Extra attention is needed label Jan 22, 2022
@zezo010
Copy link
Owner

zezo010 commented Jan 22, 2022

Mmmm, in all lines or specific ones?

@darodi
Copy link
Author

darodi commented Jan 22, 2022

@darodi
Copy link
Author

darodi commented Jan 22, 2022

the input is


WEBVTT

STYLE
::cue {
    font-family: Verdana, Arial, Tiresias;
    line-height: 125%;
}
::cue(.white) {
    color: #ffffff;
}
::cue(.lime) {
    color: #00ff00;
}
::cue(.cyan) {
    color: #00ffff;
}
::cue(.red) {
    color: #ff0000;
}
::cue(.yellow) {
    color: #ffff00;
}
::cue(.magenta) {
    color: #ff00ff;
}
::cue(.blue) {
    color: #0000ff;
}
::cue(.black) {
    color: #000000;
}
::cue(.bg_black) {
    background: rgba(0, 0, 0, 0.76);
}

sub0
00:00:07.120 --> 00:00:09.480 line:-1
<c.magenta.bg_black>Musique douce</c>

the output should be something like this i think

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

@zezo010
Copy link
Owner

zezo010 commented Jan 25, 2022

This because this file used VTT classes, So we should check if each line uses classes tags and removing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants