Download from Youtube

All hardware and software related discussion topics here. Advice, discussion and opinions on either topic are welcome.
User avatar
Night457
Global Moderator
Posts: 8834
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Congratulations! The --no-warnings is completely new to me, but other than that I generally follow the command. Glad you figured it all out!
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

Night457 wrote: Sun Sep 17, 2023 1:26 pm Dagnabbit! Here is yet another off-topic post by me.

Re my previous post:
viewtopic.php?p=107162#p107162

The subtitles for the off-topic "Termination" were out-of sync so I resynced them, and updated the ulozto links.
check out this playlist https://www.youtube.com/watch?v=ZedLgAF ... 28&index=1

or, just check out just one of the 48, that will do. it has a spanish and an english sub, both in them.
I can NOT figure out how to use yt-dlp to just the english subs, can you manage it that? thanks.
User avatar
pillowbaker
Posts: 3019
Likes:
Joined: Mon Mar 07, 2022 4:05 am

Re: Download from Youtube

Post by pillowbaker »   0 likes

I managed to grab this using jd2. Is it what you were looking for?
You do not have the required permissions to view the files attached to this post.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

yt-dlp --write-sub --sub-lang en --no-warnings --playlist-start 1 --playlist-end 48 https://www.youtube.com/playlist?list=P ... ACDDA10C28
User avatar
Night457
Global Moderator
Posts: 8834
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Triela wrote: Sun Oct 08, 2023 11:26 pm I can NOT figure out how to use yt-dlp to just the english subs, can you manage it that? thanks.
From your follow-up post I see you figured it out! Getting the address for the playlist itself rather than just one of the videos certainly helped.

Myself, because subtitles are small I use [Code]
to get ALL the subtitles, and then I delete the ones I do not want. The yt-dlp documentation says of this command "use is not recommended since there are other alternatives to achieve the same". In this case, the alternative is: [Code] So, they recommend I use the longer more complicated command instead of the simple one that I can actually remember. Specifying the language requires the full command, as you used it.

Anyway, did you JUST want to download the subtitles, or the subtitles AND the video? Your command will download both. It will download the subtitle as a .vtt file and convert it to .srt after downloading the video.

Sometimes you already have the video(s) and just need the subtitles, or you only want the subtitles to use with different video. In that case use the "--skip-download" option, like this: [Code] Notes: I left out the "--no-warnings" because warnings don't bother me in command line as they just zip on by. I also left out specifying the "--playlist-start" and "--playlist-end" because it defaults to downloading the entire playlist. The "--skip-download" option skips downloading the videos.

The only problem with downloading JUST the subtitles without the videos is that it does not automatically convert the .vtt files to .srt. That is easy enough to do after downloading is done, by using SubtitleEdit to batch convert. (If you use other subtitle software, it likely has a similar batch convert function.)
  • Put all the .vtt files in one folder with nothing else in it.
  • Open SubtitleEdit.
  • Go to "Tools / Batch convert..."
  • In the popup window, select "Scan folder..." button.
  • Browse until you find the folder with the .vtt files and select it.
  • After the files load, select the Output folder and the Format of .srt.
  • Click "Convert".
After the subtitle downloading was done, it took me about two minutes to take the VTTs and batch convert them in SubtitleEdit. It took longer to write the instructions! See sample screenshots below.
SubEd batch 1.jpg
SubEd batch 2.jpg
FINALLY ... there may very well be an option in yt-dlp to specify converting the subtitles from VTT to SRT. Many people would prefer to have all the work done in one command, without using other software. As rarely as I need to make this conversion, I would have to search the yt-dlp documentation to find this ... and then do it again later the next time I had to do it. I just use what I can remember.
You do not have the required permissions to view the files attached to this post.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

Night457 wrote: Mon Oct 09, 2023 6:57 pm
Anyway, did you JUST want to download the subtitles, or the subtitles AND the video? Your command will download both.
after i managed to down the vids, I remembered the subs, so, separately
It will download the subtitle as a .vtt file and convert it to .srt after downloading the video.
didn't see nothing about conversion, but I used SE for that, based upon your earlier remark. However thoughtful your explanation was, later, i kinda figured it out before. It wasn't very hard.....
That is easy enough to do after downloading is done, by using SubtitleEdit to batch convert. (If you use other subtitle software, it likely has a similar batch convert function.)

I only used Subtitle Workshop and Subtitle Creator, and i've not seen a batch option such as the one in SE.
FINALLY ... there may very well be an option in yt-dlp to specify converting the subtitles from VTT to SRT. Many people would prefer to have all the work done in one command, without using other software.
of cooruse who wou;dn't ? Thats logical



Download videos and write subtitles to a separate file in a specific format: [Code]
imma quiz you in a few months, days, weeks, hours... lets see what you remember... :D :o :?: ;) ;) ;)
I just use what I can remember.
Seems like a life-motto ... or an inscription above an Alzheimer home for the elderly ... :mrgreen: :mrgreen: :mrgreen: :mrgreen: please see attachement, tell us what you've learned....
User avatar
Night457
Global Moderator
Posts: 8834
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

Quiz me in awhile and I will remember that it EXISTS ... but I would still have to search the documentation to find the exact command. Any downloaded subtitle ALWAYS ends up in SubtitleEdit for cleanup work anyway, so the conversion to SRT will occur automatically along with my other edits. I can not imagine ever downloading a subtitle and then just USING it without looking at the contents first! So I remember the commands I actually need, and the rest takes care of itself.
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   0 likes

Night457 wrote: Tue Oct 10, 2023 5:25 am Quiz me in awhile and I will remember that it EXISTS ... but I would still have to search the documentation to find the exact command. Any downloaded subtitle ALWAYS ends up in SubtitleEdit for cleanup work anyway, so the conversion to SRT will occur automatically along with my other edits. I can not imagine ever downloading a subtitle and then just USING it without looking at the contents first! So I remember the commands I actually need, and the rest takes care of itself.
i found an pdf with all the commands but i can not attach that here??????????
User avatar
Triela
Posts: 495
Likes:
Joined: Sun Jul 05, 2020 3:42 pm

Re: Download from Youtube

Post by Triela »   1 likes

after I zipped the pdf, i could attach it. What kinda security is that???? :mrgreen: :mrgreen: :mrgreen:
You do not have the required permissions to view the files attached to this post.
User avatar
Night457
Global Moderator
Posts: 8834
Likes:
Joined: Sat Dec 28, 2019 3:44 pm

Re: Download from Youtube

Post by Night457 »   0 likes

I have never encountered a dangerous Email or ZIP file in my life! I don't understand all the experts hand-wringing over them. :mrgreen:

(I know we can attach JPGs, SRTs and ZIPs up to a certain size. I don't know what else. It is probably documented somewhere on FLM...)

Thanks! That is much more concise than the full documentation that I HAVE been using when I need to search for an option:
https://github.com/yt-dlp/yt-dlp
Post Reply