This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
Manually add subtitles to download videos #111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Until now, Crunchyroll always provided videos with subtitles burnt-in. But it seems that they starting to shutdown this kind of videos, at least for some languages. Italian for example has no hardsubbed videos for some series (#81 (comment)). To prevent such errors as in #81, this PR removes the logic to download the pre hardsubbed videos and burns in the subtitles itself via
ffmpeg
.This includes some major changes:
ffmpeg
is now required fordownload
too. Adding subtitles to a video cannot be done without it..ts
to.mp4
. Mp4 is one of the few container formats which supports subtitles to be added as a separate stream which can be turned on and off (and not directly be burnt into the video as it's the only choice for most other formats). This has the advantage over.ts
that the whole video doesn't need to be re-encoded which takes some time, especially with higher quality videos. All other formats will burn the subtitles into the video which consumes much time and cpu. It's now highly recommended to use mp4 as format fordownload
. The subtitles in a mp4 file will have the ffmpegforced
flag/disposition which should show them in the most video players automatically but you might activate them manually in players which does not recognize this flag.-o -
flag) ([Request] Add option to pipe download to stdout #69) isn't so fast anymore. In the past when the actual video download started, the piping process started immediately. But now this isn't possible anymore b/c ffmpeg requires the output file to be seekable in order to add subtitles (at least for mp4, which is the format which will be piped). To have this guaranteed when piping,download
will create a temporary file which gets piped to stdout if the video content was fully written to it. This makes piping less powerful than before.