Open cemysce opened 8 years ago
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.
For now you can just call ffmpeg manually:
ffmpeg -i foo.vtt foo.srt
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.
Is it possible to call the post-processing through an API call instead of running the command line?
A hacky approach is to create a file with the same name as the file to download and not specifying skip_download
.
I have created a PR at #9738. Please help test it.
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
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.
@NothingCanPlayVTT Cygwin and ffmpeg perhaps?
You don't need to use Cygwin. Just download Zeranoe's FFmpeg builds and put it in your PATH
environment variable.
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
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.Before submitting an issue make sure you have:
What is the purpose of 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
-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 ```):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.