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

Request for --write-auto-sub and error report #15917

Closed
ghost opened this issue Mar 19, 2018 · 1 comment
Closed

Request for --write-auto-sub and error report #15917

ghost opened this issue Mar 19, 2018 · 1 comment
Labels

Comments

@ghost
Copy link

@ghost ghost commented Mar 19, 2018

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 2018.03.14. 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 2018.03.14

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

Firstly, I hope there was an option for --write-auto-sub to select preferred languages.

Since it downloads ALL auto-translated files, although my intention was only to download english auto-generated subs, I need to download whole bunch auto-translated subs of languages that google translates.

--sub-lang LANGS does not work for --write-auto-sub


Secondly, I found a bug that if you give -o "%(title)s" and --embed-subs and --write-auto-sub at the same time for the link(https://www.youtube.com/watch?v=vEfyCVD7BgI), ffmpeg can't merge the subs together because the file name of the subtitle is wrong.

Here is the error log. When I remove -o "%(title)s" option, it works well without an error.

[root@devserver a]# youtube-dl --all-subs --embed-subs --add-metadata --write-info-json -o "%(title)s" "https://www.youtube.com/watch?v=vEfyCVD7BgI" --write-auto-sub
[youtube] vEfyCVD7BgI: Downloading webpage
[youtube] vEfyCVD7BgI: Downloading video info webpage
[youtube] vEfyCVD7BgI: Extracting video information
[youtube] vEfyCVD7BgI: Looking for automatic captions
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.gu.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.zh-Hans.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.zh-Hant.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.gd.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ga.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.gl.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.lb.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.la.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.lo.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.tr.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.lv.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.lt.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.th.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.tg.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.te.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.fil.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.haw.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.yi.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ceb.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.yo.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.de.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.da.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.el.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.eo.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.en.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.eu.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.et.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.es.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ru.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ro.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.bn.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.be.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.bg.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.uk.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.jv.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.bs.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ja.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.xh.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.co.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ca.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.cy.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.cs.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ps.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.pt.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.pa.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.pl.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.hy.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.hr.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ht.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.hu.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.hmn.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.hi.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ha.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mg.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.uz.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ml.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mn.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mi.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mk.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ur.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mt.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ms.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.mr.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ta.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.my.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.af.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.vi.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.is.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.am.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.it.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.iw.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sv.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ar.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.su.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.zu.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.az.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.id.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ig.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.nl.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.no.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ne.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ny.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.fr.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ku.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.fy.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.fa.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.fi.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ka.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.kk.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sr.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sq.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ko.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.kn.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.km.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.st.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sk.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.si.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.so.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sn.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sm.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sl.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.ky.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sw.vtt
[info] Writing video subtitles to: Why You Need to Read Dostoyevsky - Prof.sd.vtt
[info] Writing video description metadata as JSON to: Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.info.json
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.f247
[download] 100% of 40.12MiB in 00:06
[download] Destination: Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.f140
[download] 100% of 6.10MiB in 00:01
[ffmpeg] Merging formats into "Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.mkv"
Deleting original file Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.f247 (pass -k to keep)
Deleting original file Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.f140 (pass -k to keep)
[ffmpeg] Adding metadata to 'Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.mkv'
[ffmpeg] Embedding subtitles in 'Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.mkv'
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 471, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 461, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1989, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 850, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1623, in process_video_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1970, in process_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2035, in post_process
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 393, in run
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 182, in run_ffmpeg_multiple_files
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 182, in <genexpr>
OSError: [Errno 2] No such file or directory: 'Why You Need to Read Dostoyevsky - Prof. Jordan Peterson.gu.vtt'
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 19, 2018

  1. --sub-lang works just fine with --write-auto-sub.
  2. You must include %(ext)s at the end of output template.
@dstftw dstftw closed this Mar 19, 2018
@dstftw dstftw added the invalid label Mar 19, 2018
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.