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

[Bug] ytdlnis can't download subs #735

Open
2 tasks done
MuhammadAly11 opened this issue Feb 28, 2025 · 6 comments
Open
2 tasks done

[Bug] ytdlnis can't download subs #735

MuhammadAly11 opened this issue Feb 28, 2025 · 6 comments
Labels
bug Something isn't working Waiting For Release Implemented but not released yet

Comments

@MuhammadAly11
Copy link

  • Tried latest version

  • This issue is not duplicated with any other open or closed issues

Describe the bug

This video for example has subtitles, but ytdlnis doesn't recognize it

Downloading:
Title: Jordan Peterson Sits Down With Coptic Archbishop
URL: https://youtube.com/watch?v=_xAk6i0mgsM
Type: video
Command:
--extractor-args "youtube:lang=en" --newline -N "3" --trim-filenames "184" --no-mtime --sponsorblock-remove "music_offtopic,selfpromo,preview,sponsor,intro,outro,filler,interaction" --write-description --sponsorblock-mark "all" --embed-chapters -f "602+249-drc/602+ba/602/b" --embed-subs --sub-langs "en.*,.*-orig,ar,live_chat" -P "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3" -o "%(uploader).30B - %(title).170B.%(ext)s" --replace-in-metadata "title" ".+" "Jordan Peterson Sits Down With Coptic Archbishop" --parse-metadata "%(title)s:%(meta_title)s" --replace-in-metadata "uploader" ".+" "ChristianThinking" --parse-metadata "%(uploader)s:%(artist)s" "https://youtube.com/watch?v=_xAk6i0mgsM" 

[youtube] Extracting URL: https://youtube.com/watch?v=_xAk6i0mgsM
[youtube] _xAk6i0mgsM: Downloading webpage
[youtube] _xAk6i0mgsM: Downloading tv client config
[youtube] _xAk6i0mgsM: Downloading player 5ae7d525
[youtube] _xAk6i0mgsM: Downloading tv player API JSON
[youtube] _xAk6i0mgsM: Downloading ios player API JSON
[youtube] _xAk6i0mgsM: Downloading m3u8 information
[MetadataParser] Changed title to: Jordan Peterson Sits Down With Coptic Archbishop
[MetadataParser] Parsed meta_title from '%(title)s': 'Jordan Peterson Sits Down With Coptic Archbishop'
[MetadataParser] Changed uploader to: ChristianThinking
[MetadataParser] Parsed artist from '%(uploader)s': 'ChristianThinking'
[SponsorBlock] Fetching SponsorBlock segments
[SponsorBlock] No matching segments were found in the SponsorBlock database
[info] _xAk6i0mgsM: Downloading 1 format(s): 602+249-drc
[info] Writing video description to: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.description
[info] There are no subtitles for the requested languages
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 60
[download] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.f602.mp4
[download] 100% of 1017.78KiB in 00:00:05 at 197.77KiB/s
[download] Destination: /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.f249-drc.webm
[download] 100% of    1.79MiB in 00:00:03 at 580.33KiB/s
[Merger] Merging formats into "/storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.webm"
Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.f602.mp4 (pass -k to keep)
Deleting original file /storage/emulated/0/Android/data/com.deniscerri.ytdl/files/downloads/3/ChristianThinking - Jordan Peterson Sits Down With Coptic Archbishop.f249-drc.webm (pass -k to keep)
[EmbedSubtitle] There aren't any subtitles to embed
[ModifyChapters] SponsorBlock information is unavailable
[Metadata] There isn't any metadata to add

Expected behavior

No response

Steps to reproduce

Downloading any video with subtitles

Device information

Android

Screenshots / Recordings

No response

Additional context

No response

@MuhammadAly11 MuhammadAly11 added the bug Something isn't working label Feb 28, 2025
@MuhammadAly11
Copy link
Author

MuhammadAly11 commented Feb 28, 2025

I don't get this problem with --write-subs --write-auto-subs. Only when they are disabled.
A potential solution is to add these flags and then delete the sub files after embedding them

@deniscerri
Copy link
Owner

[info] There are no subtitles for the requested languages

This is your problem. yt-dlp can't find subtitles so there is nothing to embed. Make an issue to yt-dlp repository

@deniscerri deniscerri reopened this Mar 1, 2025
@deniscerri
Copy link
Owner

Before doing that, try using yt-dlp nightly or master.

@deniscerri deniscerri added the yt-dlp related Not a bug about the app but with the yt-dlp library label Mar 1, 2025
@MuhammadAly11
Copy link
Author

[info] There are no subtitles for the requested languages

This is your problem. yt-dlp can't find subtitles so there is nothing to embed. Make an issue to yt-dlp repository

In order for yt-dlp to find subs, these 2 options --write-subs --write-auto-subs have to be included in the command.

I think the default behavior when the user enables only embed subs should be the last option in this replay yt-dlp/yt-dlp#630 (comment).

The option --embed-subs doesn't find the auto subs yet . There's an open issue for this yt-dlp/yt-dlp#826

Tldr; use this --write-subs --write-auto-subs --embed-subs --compat-options no-keep-subs to find subs, embed them and then delete files

@deniscerri
Copy link
Owner

I see. Ill be implementing this

@deniscerri deniscerri added Waiting For Release Implemented but not released yet and removed yt-dlp related Not a bug about the app but with the yt-dlp library labels Mar 2, 2025
@deniscerri
Copy link
Owner

Image
I added a toggle to activate this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting For Release Implemented but not released yet
Projects
None yet
Development

No branches or pull requests

2 participants