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

[Bug] VTT subtitles aren't spaced #26

Open
Superpaul209 opened this issue Apr 17, 2023 · 1 comment
Open

[Bug] VTT subtitles aren't spaced #26

Superpaul209 opened this issue Apr 17, 2023 · 1 comment

Comments

@Superpaul209
Copy link

Hello,

I have noticed a bug with the generation of the VTT file, it creates a VTT file but the format is wrong and unusable in a video player.

Output example :
image

Should be :
image

With a blank espace between each subtitle. I have seen that the webVTT format also contains number to each subtitle but its not required.

Thank you

@Superpaul209 Superpaul209 changed the title Bug VTT subtitles aren't spaced [Bug] VTT subtitles aren't spaced Apr 17, 2023
@kuubus
Copy link

kuubus commented May 17, 2023

Here is a temporary solution

repair-subvert-subs.sh

#!/bin/bash

if [ $# -eq 0 ]; then
  echo "Es wurde keine Quelldatei angegeben."
  exit 1
fi

source_file="$1"
target_file="$2"
rm "$2"
counter=1

while read -r line1; do
  read -r line2

  echo "$counter" >> "$target_file"
  echo "$line1" >> "$target_file"
  echo "$line2" >> "$target_file"
  echo "" >> "$target_file"

  ((counter++))
done < "$source_file"

echo "Das Skript wurde erfolgreich ausgeführt."

Usage:

chmod a+x ./repair-subvert-subs.sh

./repair-subvert-subs.sh <source-file> <target-file>

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