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

YouTube --write-info-json only writes info on available automatic subtitles if they have been downloaded #20520

Open
peteruhrig opened this issue Apr 1, 2019 · 1 comment

Comments

@peteruhrig
Copy link

@peteruhrig peteruhrig commented Apr 1, 2019


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.03.18. 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.03.18

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

Output:

kermit@frog:/yt$ youtube-dl --skip-download -o "%(id)s.mp4" --write-info-json --all-subs -v https://www.youtube.com/watch?v=bdkXTKZNlSo
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--skip-download', '-o', '%(id)s.mp4', '--write-info-json', '--all-subs', '-v', 'https://www.youtube.com/watch?v=bdkXTKZNlSo']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.03.18
[debug] Python version 3.5.2 (CPython) - Linux-4.4.0-138-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.15, ffprobe 2.8.15
[debug] Proxy map: {}
[youtube] bdkXTKZNlSo: Downloading webpage
[youtube] bdkXTKZNlSo: Downloading video info webpage
WARNING: video doesn't have subtitles
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video description metadata as JSON to: bdkXTKZNlSo.info.json
...
<end of log>

Section automatic_captions is empty in info.json

With the command given above, the section automatic_captions remains empty in the info.json file (see attachment). It will be filled if I run the following command:

kermit@frog:/yt$ youtube-dl --skip-download -o "%(id)s.mp4" --write-info-json --all-subs --write-auto-sub -v https://www.youtube.com/watch?v=bdkXTKZNlSo

However, this will download 104 subtitle files I do not want.
My plan is to download the JSON file first and then decide on the basis of available subtitles and video resolutions whether I want to download the video and which video format to request. But it appears I cannot do this at the moment.
In short: If --all-subs is switched on, I would expect the automatic_captions section to be populated in the info.json.

Thanks and best wishes,
Peter

EDIT: Adding --list-subs does not do the trick either. Then it does not write the info.json.

@jgalp
Copy link

@jgalp jgalp commented Apr 7, 2019

Is this a valid issue and is anyone working on it? I am a student at the University of Michigan looking to contribute to an open source project for my upper level software engineering class.

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
2 participants
You can’t perform that action at this time.