Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[twitter] Add support for subtitles #14977

Closed
5 tasks done
SeanPM5 opened this issue Dec 13, 2017 · 4 comments
Closed
5 tasks done

[twitter] Add support for subtitles #14977

SeanPM5 opened this issue Dec 13, 2017 · 4 comments

Comments

@SeanPM5
Copy link

SeanPM5 commented Dec 13, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.12.10
  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)

Description of your issue, suggested solution and other information

youtube-dl supports Twitter (and works great) but it does not seem to find the subtitles/captions. Here is a video with subtitles - see the "CC" button in bottom right of video player: https://twitter.com/ResidentFOX/status/941025075049803776

When I perform the "youtube-dl --list-subs" command, it says the video has no subtitles (even though it does):

iMac:Desktop Sean$ youtube-dl --list-subs https://twitter.com/ResidentFOX/status/941025075049803776
[twitter] 941025075049803776: Downloading webpage
[twitter:card] 941025075049803776: Downloading webpage
[twitter:card] 941025075049803776: Downloading m3u8 information
[twitter:card] 941025075049803776: Downloading mobile webpage
[twitter:card] 941025075049803776: Downloading main script
[twitter:card] 941025075049803776: Downloading mobile API data
[twitter:card] 941025075049803776: Downloading m3u8 information
941025075049803776 has no subtitles

Would be very helpful if youtube-dl could get these. Thanks.

@remitamine
Copy link
Collaborator

not accessible in the browser:

This video has been deleted.

@SeanPM5
Copy link
Author

SeanPM5 commented Nov 7, 2019

@remitamine Hi, here is a working Twitter video with subtitles:

https://twitter.com/themandalorian/status/1188986316194635777

You can see in the video player (at least on desktop) a CC button to turn on captions.

sean$ youtube-dl --list-subs "https://twitter.com/themandalorian/status/1188986316194635777"
[twitter] 1188986316194635777: Downloading webpage
[twitter:card] 1188986316194635777: Downloading webpage
[twitter:card] 1188986316194635777: Downloading guest token
[twitter:card] 1188986316194635777: Downloading JSON metadata
[twitter:card] 1188986316194635777: Downloading m3u8 information
1188986316194635777 has no subtitles

@remitamine
Copy link
Collaborator

remitamine commented Nov 7, 2019

this depends on #6106, so support for this type of subtitles has to be added before working on this issue,

@SeanPM5
Copy link
Author

SeanPM5 commented Nov 7, 2019

Thank you, appreciate the clarification 👍

Reino17 added a commit to Reino17/xivid that referenced this issue Jan 1, 2020
…ne audiostreams

- Ontleed met extract() i.p.v. tokenize().
- Voeg vanwege XQuery entiteiten vereiste versie declaratie toe.
- Laat niet verplicht type voorvoegsel achterwege.
- Aanleiding voor ondertiteling: ytdl-org/youtube-dl#14977
pukkandan added a commit to yt-dlp/yt-dlp that referenced this issue Apr 28, 2021
Authored by fstirlitz
Modified from: ytdl-org/youtube-dl#6144

Closes: #73
Fixes:
ytdl-org/youtube-dl#6106
ytdl-org/youtube-dl#14977
ytdl-org/youtube-dl#21438
ytdl-org/youtube-dl#23609
ytdl-org/youtube-dl#28132

Might also fix (untested):
ytdl-org/youtube-dl#15424
ytdl-org/youtube-dl#18267
ytdl-org/youtube-dl#23899
ytdl-org/youtube-dl#24375
ytdl-org/youtube-dl#24595
ytdl-org/youtube-dl#27899

Related:
ytdl-org/youtube-dl#22379
ytdl-org/youtube-dl#24517
ytdl-org/youtube-dl#24886
ytdl-org/youtube-dl#27215

Notes:
* The functions `extractor.common._extract_..._formats` are still kept for compatibility
* Only some extractors have currently been moved to using `_extract_..._formats_and_subtitles`
* Direct subtitle manifests (without a master) are not supported and are wrongly identified as containing video formats
* AES support is untested
* The fragmented TTML subtitles extracted from DASH/ISM are valid, but are unsupported by `ffmpeg` and most video players
    * Their XML fragments can be dumped using `ffmpeg -i in.mp4 -f data -map 0 -c copy out.ttml`.
        Once the unnecessary headers are stripped out of this, it becomes a valid self-contained ttml file
    * The ttml subs downloaded from DASH manifests can also be directly opened with <https://github.com/SubtitleEdit>
* Fragmented WebVTT files extracted from DASH/ISM are also unsupported by most tools
    * Unlike the ttml files, the XML fragments of these cannot be dumped using `ffmpeg`
    * The webtt subs extracted from DASH can be parsed by <https://github.com/gpac/gpac>
    * But validity of the those extracted from ISM are untested
nixxo pushed a commit to nixxo/yt-dlp that referenced this issue Nov 22, 2021
Authored by fstirlitz
Modified from: ytdl-org/youtube-dl#6144

Closes: #73
Fixes:
ytdl-org/youtube-dl#6106
ytdl-org/youtube-dl#14977
ytdl-org/youtube-dl#21438
ytdl-org/youtube-dl#23609
ytdl-org/youtube-dl#28132

Might also fix (untested):
ytdl-org/youtube-dl#15424
ytdl-org/youtube-dl#18267
ytdl-org/youtube-dl#23899
ytdl-org/youtube-dl#24375
ytdl-org/youtube-dl#24595
ytdl-org/youtube-dl#27899

Related:
ytdl-org/youtube-dl#22379
ytdl-org/youtube-dl#24517
ytdl-org/youtube-dl#24886
ytdl-org/youtube-dl#27215

Notes:
* The functions `extractor.common._extract_..._formats` are still kept for compatibility
* Only some extractors have currently been moved to using `_extract_..._formats_and_subtitles`
* Direct subtitle manifests (without a master) are not supported and are wrongly identified as containing video formats
* AES support is untested
* The fragmented TTML subtitles extracted from DASH/ISM are valid, but are unsupported by `ffmpeg` and most video players
    * Their XML fragments can be dumped using `ffmpeg -i in.mp4 -f data -map 0 -c copy out.ttml`.
        Once the unnecessary headers are stripped out of this, it becomes a valid self-contained ttml file
    * The ttml subs downloaded from DASH manifests can also be directly opened with <https://github.com/SubtitleEdit>
* Fragmented WebVTT files extracted from DASH/ISM are also unsupported by most tools
    * Unlike the ttml files, the XML fragments of these cannot be dumped using `ffmpeg`
    * The webtt subs extracted from DASH can be parsed by <https://github.com/gpac/gpac>
    * But validity of the those extracted from ISM are untested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants