Repository: yt-dlp/yt-dlp

Issue:
[Rumble] How to download subtitles?
### Checklist

- [X] I'm asking a question and **not** reporting a bug/feature request
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions including closed ones

### Question

I'm trying to download [this video](https://rumble.com/vx9n3f-gideon-op-zoek-naar-de-waarheid.html) that has subtitles on Rumble and have the following options set in a config file. 

--sub-format srt
--convert-subs srt
--write-subs
--write-auto-subs
--embed-subs
--compat-options no-keep-subs
--sub-lang 'en,ja'

For some reason the subtitles weren't downloaded and after reading everywhere I can't figure out what to change.

Thank you!

### Verbose log

```shell
yt-dlp -vU https://rumble.com/vx9n3f-gideon-op-zoek-naar-de-waarheid.html\?mref\=lzerp\&mrefc\=2
[debug] Command-line config: ['-vU', 'https://rumble.com/vx9n3f-gideon-op-zoek-naar-de-waarheid.html?mref=lzerp&mrefc=2']
[debug] User config "/Users/user/.config/yt-dlp/config": ['--cookies-from-browser', 'firefox', '--cache-dir', '/Users/user/.config/youtube-dl/', '--user-agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:85.0) Gecko/20100101 Firefox/85.0', '--geo-bypass', '-u', 'PRIVATE', '-p', 'PRIVATE', '-i', '--no-mark-watched', '--no-warnings', '--retries', 'infinite', '--fragment-retries', 'infinite', '-o', '/Volumes/Movies/Youtubes/%(uploader)s/%(playlist_title)s/%(upload_date)s - %(title)s.%(ext)s', '-f', 'bestvideo[ext=mp4][height<=1080]+bestaudio[ext=m4a][abr<=192]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/best', '--sub-format', 'srt', '--convert-subs', 'srt', '--write-subs', '--write-auto-subs', '--embed-subs', '--compat-options', 'no-keep-subs', '--sub-lang', 'en,ja', '--embed-thumbnail', '--parse-metadata', 'channel:%(meta_artist)s', '--parse-metadata', 'webpage_url:%(meta_comment)s', '--parse-metadata', 'upload_date:%(meta_date>%Y:%m:%d)s', '--embed-metadata', '--embed-chapters', '--xattrs', '--audio-format', 'm4a', '--recode-video', 'mp4']
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "/Users/user/Library/Application Support/Firefox/Profiles/xy4v0sei.default-release-1574345941647/cookies.sqlite"
[Cookies] Extracted 710 cookies from firefox
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.03.08.2 [e491d06d3]
[debug] Compatibility options: no-keep-subs
[debug] Python version 3.10.2 (CPython 64bit) - macOS-12.3-arm64-arm-64bit
[debug] exe versions: ffmpeg 5.0 (setts), ffprobe 5.0
[debug] Optional libraries: brotli, Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.03.08.1, Current version: 2022.03.08.2
yt-dlp is up to date (2022.03.08.2)
[debug] [generic] Extracting URL: https://rumble.com/vx9n3f-gideon-op-zoek-naar-de-waarheid.html?mref=lzerp&mrefc=2
[generic] vx9n3f-gideon-op-zoek-naar-de-waarheid: Requesting header
[generic] vx9n3f-gideon-op-zoek-naar-de-waarheid: Downloading webpage
[generic] vx9n3f-gideon-op-zoek-naar-de-waarheid: Extracting information
[debug] Looking for video embeds
[debug] [RumbleEmbed] Extracting URL: https://rumble.com/embed/vunh1h
[RumbleEmbed] vunh1h: Downloading JSON metadata
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Searching for '(?P<meta_artist>.+)' in '%(channel)s'
[MetadataParser] Parsed meta_artist from '%(channel)s': 'BLCKBX'
[debug] Searching for '(?P<meta_comment>.+)' in '%(webpage_url)s'
[MetadataParser] Parsed meta_comment from '%(webpage_url)s': 'https://rumble.com/embed/vunh1h'
[debug] Searching for '%(meta_date>%Y:%m:%d)s' in '%(upload_date)s'
[MetadataParser] Could not interpret 'upload_date' as '%(meta_date>%Y:%m:%d)s'
[info] vunh1h: Downloading 1 format(s): mp4-1080p
Deleting existing file /Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.jpg
[info] Downloading video thumbnail 0 ...
[info] Writing video thumbnail 0 to: /Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.jpg
[SubtitlesConvertor] There aren't any subtitles to convert
[debug] Invoking downloader on "https://sp.rmbl.ws/s8/2/R/4/j/v/R4jvd.haa.mp4"
[download] Resuming download at byte 90671574
[download] Destination: /Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.mp4
[download] 100% of 1.59GiB in 45:47
[VideoConvertor] Not converting media file "/Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.mp4"; already is in target format mp4
[EmbedSubtitle] There aren't any subtitles to embed
[Metadata] Adding metadata to "/Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.mp4' -map 0 -dn -ignore_unknown -c copy -metadata 'title=‘Gideon, op zoek naar de waarheid’ including ENG SUBS' -metadata date=20220313 -metadata purl=https://rumble.com/embed/vunh1h -metadata comment=https://rumble.com/embed/vunh1h -metadata artist=BLCKBX -movflags +faststart 'file:/Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.temp.mp4'
[EmbedThumbnail] mutagen: Adding thumbnail to "/Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.mp4"
Deleting original file /Volumes/Movies/Youtubes/NA/NA/20220313 - ‘Gideon, op zoek naar de waarheid’ including ENG SUBS.jpg (pass -k to keep)
[XAttrMetadata] Writing metadata to file's xattrs
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/rumble.py b/yt_dlp/extractor/rumble.py
--- a/yt_dlp/extractor/rumble.py
+++ b/yt_dlp/extractor/rumble.py
@@ -77,12 +77,20 @@ def _real_extract(self, url):
                     formats.append(f)
         self._sort_formats(formats)
 
+        subtitles = {
+            lang: [{
+                'url': sub_info['path'],
+                'name': sub_info.get('language') or '',
+            }] for lang, sub_info in (video.get('cc') or {}).items() if sub_info.get('path')
+        }
+
         author = video.get('author') or {}
 
         return {
             'id': video_id,
             'title': title,
             'formats': formats,
+            'subtitles': subtitles,
             'thumbnail': video.get('i'),
             'timestamp': parse_iso8601(video.get('pubDate')),
             'channel': author.get('name'),


Test patch: