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

skipping video download also skips non-video post-processing actions #9073

Open
cemysce opened this issue Apr 4, 2016 · 10 comments
Open

skipping video download also skips non-video post-processing actions #9073

cemysce opened this issue Apr 4, 2016 · 10 comments
Labels
bug

Comments

@cemysce
Copy link

@cemysce cemysce commented Apr 4, 2016

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

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

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 -v flag to your command line you run youtube-dl with, 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 --skip-download --write-sub --convert-subs srt --all-subs https://www.youtube.com/watch?v=sLEdi49XEhA
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'--skip-download', u'--write-sub', u'--convert-subs', u'srt', u'--all-subs', u'https://www.youtube.com/watch?v=sLEdi49XEhA']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.01
[debug] Python version 2.7.6 - Linux-3.13.0-83-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] sLEdi49XEhA: Downloading webpage
[youtube] sLEdi49XEhA: Downloading video info webpage
[youtube] sLEdi49XEhA: Extracting video information
[youtube] sLEdi49XEhA: Downloading MPD manifest
[info] Writing video subtitles to: The Beauty of the Dinner Scene-sLEdi49XEhA.en-US.vtt
[info] Writing video subtitles to: The Beauty of the Dinner Scene-sLEdi49XEhA.en.vtt

Description of your issue, suggested solution and other information

Using the --skip-download option seems to skip post-processing options, or at least the --convert-subs option. The other post-processing options are related to the video, so it makes sense that they'd be skipped, but --skip-download is a handy feature for downloading subtitles but not the video (particularly for really large videos that you've already downloaded and don't want to download again), and post-processing options for the subtitles should be processed.

Either that, or for the sake of internal consistency, --skip-download should also skip downloading subtitles. Perhaps the ability to download subtitles but not the video was an accidental feature? Maybe --skip-download was always intended as a dry-run feature, to not download anything? Personally though, I would prefer there be some way to download just the subtitles and post-process them.

In the example command above, the video has subtitles in vtt format. Without the --skip-download option, the vtt subtitles are eventually converted to srt. However with the --skip-download option, they're left as vtt.

@archangelic
Copy link

@archangelic archangelic commented May 21, 2016

Just following this because I have a bot that depends on the ability to have srt subtitles, but I have no use for the video (and I don't want to waste the bandwidth downloading the video). I would love to see this get fixed.

@nyuszika7h
Copy link
Contributor

@nyuszika7h nyuszika7h commented May 21, 2016

For now you can just call ffmpeg manually:

ffmpeg -i foo.vtt foo.srt
@vxbinaca
Copy link
Contributor

@vxbinaca vxbinaca commented May 29, 2016

This bug is still a bug:

youtube-dl --ignore-config --write-sub --all-subs --convert-subs "srt" --restrict-filenames --skip-download https://www.youtube.com/watch?v=uieM18rZdHY

It spits out the sub files in VTT, but doesn't convert them to SRT.

@archangelic
Copy link

@archangelic archangelic commented Jun 5, 2016

Is it possible to call the post-processing through an API call instead of running the command line?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 6, 2016

A hacky approach is to create a file with the same name as the file to download and not specifying skip_download.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jun 9, 2016

I have created a PR at #9738. Please help test it.

@NothingCanPlayVTT
Copy link

@NothingCanPlayVTT NothingCanPlayVTT commented Feb 20, 2017

nyuszika7h mentioned "ffmpeg -i foo.vtt foo.srt"

Interestingly I discovered:


youtube-dl.exe --convert-subs srt --all-subs http://www.tg4.ie/en/player/home/?pid=5270396083001

[generic] ?pid=5270396083001: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?pid=5270396083001: Downloading webpage
[generic] ?pid=5270396083001: Extracting information
[download] Downloading playlist: EIPIC | Baile | Seinnteoir | TG4
[generic] playlist EIPIC | Baile | Seinnteoir | TG4: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[brightcove:new] 5270396083001: Downloading webpage
[brightcove:new] 5270396083001: Downloading JSON metadata
[brightcove:new] 5270396083001: Downloading m3u8 information
[info] Writing video subtitles to: EIPIC - 4 Bea-5270396083001.en.vtt
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 198
[download] Destination: EIPIC - 4 Bea-5270396083001.mp4
[download] 100% of 513.23MiB in 01:43:02
WARNING: 5270396083001: malformated aac bitstream. Install ffmpeg or avconv to fix this automatically.
[ffmpeg] Converting subtitles
ERROR: ffmpeg or avconv not found. Please install one.

So without an external program ffmpeg also installed, getting it to save something other than VTT doesn't work.

I have K-Lite Codec pack and Media Player Classic which has ffmpeg as a DLL file but it can't be run by any youtube-dl or any other external video downloader I've tried.

@vxbinaca
Copy link
Contributor

@vxbinaca vxbinaca commented Feb 21, 2017

@NothingCanPlayVTT Cygwin and ffmpeg perhaps?

@nyuszika7h
Copy link
Contributor

@nyuszika7h nyuszika7h commented Feb 25, 2017

You don't need to use Cygwin. Just download Zeranoe's FFmpeg builds and put it in your PATH environment variable.

@lucascaton
Copy link

@lucascaton lucascaton commented Apr 2, 2018

As of version 2018.03.26.1, this still happens:

$ youtube-dl --write-auto-sub --convert-subs=lrc --sub-lang=pt --skip-download -- xxxxxxxxxxx

[youtube] xxxxxxxxxxx: Downloading webpage
[youtube] xxxxxxxxxxx: Downloading video info webpage
[youtube] xxxxxxxxxxx: Extracting video information
[youtube] xxxxxxxxxxx: Looking for automatic captions
[youtube] xxxxxxxxxxx: Downloading MPD manifest
[youtube] xxxxxxxxxxx: Downloading MPD manifest
[info] Writing video subtitles to: video-title-xxxxxxxxxxx.pt.vtt

Subtitles are downloaded as vtt instead of lrc.


$ youtube-dl --version
2018.03.26.1
@ytdl-org ytdl-org locked and limited conversation to collaborators Apr 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.