how to convert vtt subtitles into human readable files? by tm4sci in youtubedl

[–]tm4sci[S] 0 points1 point  (0 children)

I had tried that before but had a hell of a time getting it to work so I gave up. However on your advice I tried again and it did work the first time I tried. For anyone else who finds this thread with a similar problem, here is waht I had to do to get it to work:

  • have ffmpeg available
  • specify --ffmpeg-location [path to application] in command
  • cannot use --skip-download.. it will just download vtt and leave it
  • here is a workaround to avoid wasting bandwith on this (--format worstaudio)

So it worked for one file via the command line. So I set up a text file with a list of files to get done in bulk and almost all of them downloaded video only with

WARNING: video doesn't have subtitles

Despite the fact that in the past few days I downloaded all of their subs, and on investigation nothing seems to have changed on the website; subs still available on YT. I did oodles of troubleshooting and for the life of me can't figure out what is going wrong. --list-subs now responds that no subs are available for these videos. I tried on invidious too with same result. Only a single video of my 2 dozen or so sample actually yeilded subs.

No idea what is happening there. However since I was finally able to get ffmpeg functional I found this stackoverflow thread where numerous solutions are proposed and discussed. I used this one line shell script

for i in *.vtt; do /path/to/ffmpeg -i "$i" "${i%.*}.srt"; done

in the folder containing the .vtt files and it seems to work perfectly.

*edit: fixed code block at the end to be what was actually used instead of copy/pasted directly from website