Ikuti kami di Google News. Follow

Cara Baru Download Subtitle Video YouTube melalui Terminal Linux

Cara Download Subtitle Video YouTube melalui Terminal. Kali ini saya akan share sedikit tips yaitu bagaimana cara mengunduh subtitle video YouTube. Disini kita bisa menggunakan youtube-dlkarena selain dapat digunakan untuk mengunduh video, dapat juga digunakan untuk mendownload subtitle yang tersedia.


Jika belum memiliki youtube-dl, kalian bisa download via curl.
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
Untuk opsi subtitle sendiri ada beberapa yang dapat kita pakai:
--write-sub                      Write subtitle file
--write-auto-sub Write automatic subtitle file (YouTube only)
--all-subs Download all the available subtitles of the video
--list-subs List all available subtitles for the video
--sub-format FORMAT Subtitle format, accepts formats preference, for example: "srt" or "ass/srt/best"
--sub-lang LANGS Languages of the subtitles to download (optional) separated by commas, use IETF language tags like 'en,pt'

Untuk melihat list subtitle yang tersedia di stau video bisa gunakan opsi --list-subs. Berikut contoh command nya:
youtube-dl --list-subs https://www.youtube.com/watch?v=Yl-2dKTJNDU
Contoh output:
...........
Available subtitles for Yl-2dKTJNDU:
Language formats
en vtt, ttml
it vtt, ttml
pl vtt, ttml
es-419 vtt, ttml
th vtt, ttml

Nah untuk mengunduh subtitle, misal disini saya ingin download video beserta subtitle English, maka perintahnya
youtube-dl --write-srt --sub-lang en 'https://www.youtube.com/watch?v=Yl-2dKTJNDU'

Jika hanya ingin mengunduh subtitlenya saja, tanpa video, jalankan perintah
youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Yl-2dKTJNDU

Mudah bukan?
Baiklah sekian tutorial singkat kali ini, semoga bermanfaat.
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.