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

--sub-lang failed to download subtitles with dash in it. #20656

Closed
nickyfoto opened this issue Apr 13, 2019 · 1 comment
Closed

--sub-lang failed to download subtitles with dash in it. #20656

nickyfoto opened this issue Apr 13, 2019 · 1 comment

Comments

@nickyfoto
Copy link

@nickyfoto nickyfoto commented Apr 13, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.04.07. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.04.07

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl -v --sub-lang pt-BR --write-auto-sub --skip-download https://www.youtube.com/watch\?v\=lmWh9jV_1ac
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--sub-lang', u'pt-BR', u'--write-auto-sub', u'--skip-download', u'https://www.youtube.com/watch?v=lmWh9jV_1ac']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.04.07
[debug] Python version 2.7.15 (CPython) - Darwin-18.5.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1.2, ffprobe 4.1.2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] lmWh9jV_1ac: Downloading webpage
[youtube] lmWh9jV_1ac: Downloading video info webpage
[youtube] lmWh9jV_1ac: Looking for automatic captions
WARNING: pt-BR subtitles not available for lmWh9jV_1ac
[debug] Default format spec: bestvideo+bestaudio/best
...
<end of log>

Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

After listing the available subtitles, we can only download the ones without the dash in the middle such as en, es. Failed in downloading zh-CN, pt-BR or similar ones. Command report WARNING: zh-CN subtitles not available .

youtube-dl --all-subs --skip-download https://www.youtube.com/watch\?v\=lmWh9jV_1ac can correctly download all the subtitiles.

# list available subtitles
youtube-dl --list-subs https://www.youtube.com/watch?v=lmWh9jV_1ac
Available subtitles for lmWh9jV_1ac:
Language formats
vi       vtt, ttml, srv3, srv2, srv1
ru       vtt, ttml, srv3, srv2, srv1
fr       vtt, ttml, srv3, srv2, srv1
en       vtt, ttml, srv3, srv2, srv1
pt       vtt, ttml, srv3, srv2, srv1
fa       vtt, ttml, srv3, srv2, srv1
pt-PT    vtt, ttml, srv3, srv2, srv1
zh-TW    vtt, ttml, srv3, srv2, srv1
ko       vtt, ttml, srv3, srv2, srv1
it       vtt, ttml, srv3, srv2, srv1
iw       vtt, ttml, srv3, srv2, srv1
zh-CN    vtt, ttml, srv3, srv2, srv1
ar       vtt, ttml, srv3, srv2, srv1
pt-BR    vtt, ttml, srv3, srv2, srv1
es       vtt, ttml, srv3, srv2, srv1
th       vtt, ttml, srv3, srv2, srv1
sr       vtt, ttml, srv3, srv2, srv1
es-ES    vtt, ttml, srv3, srv2, srv1
ja       vtt, ttml, srv3, srv2, srv1
pl       vtt, ttml, srv3, srv2, srv1

# success

youtube-dl --sub-lang en --write-auto-sub --skip-download  https://www.youtube.com/watch?v=lmWh9jV_1ac
[youtube] lmWh9jV_1ac: Downloading webpage
[youtube] lmWh9jV_1ac: Downloading video info webpage
[youtube] lmWh9jV_1ac: Looking for automatic captions
[info] Writing video subtitles to: How do tornadoes form - James Spann-lmWh9jV_1ac.en.vtt

# success

youtube-dl --sub-lang es --write-auto-sub --skip-download  https://www.youtube.com/watch?v=lmWh9jV_1ac
[youtube] lmWh9jV_1ac: Downloading webpage
[youtube] lmWh9jV_1ac: Downloading video info webpage
[youtube] lmWh9jV_1ac: Looking for automatic captions
[info] Writing video subtitles to: How do tornadoes form - James Spann-lmWh9jV_1ac.es.vtt

# failed

youtube-dl --sub-lang zh-CN --write-auto-sub --skip-download  https://www.youtube.com/watch?v=lmWh9jV_1ac
[youtube] lmWh9jV_1ac: Downloading webpage
[youtube] lmWh9jV_1ac: Downloading video info webpage
[youtube] lmWh9jV_1ac: Looking for automatic captions
WARNING: zh-CN subtitles not available for lmWh9jV_1ac

# failed

youtube-dl --sub-lang pr-BR --write-auto-sub --skip-download  https://www.youtube.com/watch?v=lmWh9jV_1ac
[youtube] lmWh9jV_1ac: Downloading webpage
[youtube] lmWh9jV_1ac: Downloading video info webpage
[youtube] lmWh9jV_1ac: Looking for automatic captions
WARNING: pr-BR subtitles not available for lmWh9jV_1ac

@nickyfoto
Copy link
Author

@nickyfoto nickyfoto commented Apr 13, 2019

I confuse --write-sub with --write-auto-sub issue closed.

@nickyfoto nickyfoto closed this Apr 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.