# How to Use youtube-dl to Download Subtitles Only
If you want to download subtitles only from YouTube videos, you can use a command-line tool called youtube-dl. youtube-dl is a powerful and versatile tool that can download videos, audio, playlists, channels, and more from YouTube and other websites. In this article, we will show you how to use youtube-dl to download subtitles only from YouTube videos.
## What You Need
To use youtube-dl to download subtitles only, you need the following:
- A computer with Windows, Linux, or macOS operating system
- A stable internet connection
- The youtube-dl program installed on your computer. You can download it from [https://youtube-dl.org/](https://youtube-dl.org/) and follow the installation instructions for your operating system.
- The URL of the YouTube video that you want to download subtitles from
## How to Download Subtitles Only
To download subtitles only from a YouTube video, you need to use the `--write-sub` and `--skip-download` options in youtube-dl. The `--write-sub` option tells youtube-dl to write the subtitles file to disk, and the `--skip-download` option tells youtube-dl to skip downloading the video and audio files.
The basic syntax of the command is:
```bash
youtube-dl --write-sub --skip-download URL
```
where URL is the URL of the YouTube video that you want to download subtitles from.
For example, if you want to download subtitles only from this video: [https://www.youtube.com/watch?v=QH2-TGUlwu4](https://www.youtube.com/watch?v=QH2-TGUlwu4), you can use this command:
```bash
youtube-dl --write-sub --skip-download https://www.youtube.com/watch?v=QH2-TGUlwu4
```
This will download the subtitles file in the same folder as youtube-dl. The subtitles file will have the same name as the video ID, followed by a dot and the language code. For example, the subtitles file for the above video will be named QH2-TGUlwu4.en.vtt.
## How to Specify the Subtitles Language
By default, youtube-dl will download the subtitles in the default language of the video. However, you can specify a different language using the `--sub-lang` option. The `--sub-lang` option takes a comma-separated list of language codes as an argument. You can find the list of supported language codes here: [https://www.loc.gov/standards/iso639-2/php/code_list.php](https://www.loc.gov/standards/iso639-2/php/code_list.php).
For example, if you want to download subtitles only in French and Spanish from this video: [https://www.youtube.com/watch?v=QH2-TGUlwu4](https://www.youtube.com/watch?v=QH2-TGUlwu4), you can use this command:
```bash
youtube-dl --write-sub --skip-download --sub-lang fr,es https://www.youtube.com/watch?v=QH2-TGUlwu4
```
This will download two subtitles files in the same folder as youtube-dl: QH2-TGUlwu4.fr.vtt and QH2-TGUlwu4.es.vtt.
## How to Convert Subtitles Format
By default, youtube-dl will download the subtitles in the WebVTT format. However, you can convert the subtitles format using the `--convert-subs` option. The `--convert-subs` option takes a format name as an argument. You can find the list of supported formats here: [https://en.wikipedia.org/wiki/Subtitle_(captioning)#Subtitle_formats](https://en.wikipedia.org/wiki/Subtitle_(captioning)#Subtitle_formats).
For example, if you want to download subtitles only in SRT format from this video: [https://www.youtube.com/watch?v=QH2-TGUlwu4](https://www.youtube.com/watch?v=QH2-TGUlwu4), you can use this command:
```bash
youtube-dl --write-sub --skip-download --convert-subs srt https://www.youtube.com/watch?v=QH2-TGUlwu4
```
This will download and convert the subtitles file in the same folder as youtube-dl. The subtitles file will have the same name as the video ID, followed by a dot and the language code and another dot and the format name. For example, the subtitles file for the above video will be named QH2-TGUlw 06063cd7f5