Add youtube downloader and fix encode time argument #71
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.
This PR includes 2 commits. One adding support for downloading videos from YouTube. The other one fixes a bug in the end timestamp.
This pull request is a rewritten version from #55 that only features the
yt-dlp
option, is written more clearly and also applies output arguments properly. Like the original PR it should close #32 and close #46.Please note that this PR still needs some testing with different YouTube link formats.
Commit messages:
[encode] Allow downloading YouTube videos
This commit adds functionality to download YouTube videos. It uses a
pattern match in case of a stream to ensure the stream is coming from
YouTube. This is done to don't disrupt other stream methods.
Furthermore ffmpeg input and output arguments are getting split since we
need to differentiate between them, if we pass them to youtube dlp. If
we are handling a normal file they just get merged together.
[encode] Fix timespan argument
This replaces the
-to
argument with a-t
. This is done since-to
expects a end timestamp and
-t
expects a time how long the clip shouldbe. Since we compute how long the clip is we want
-t
instead of-to
.This bug was originally introduced in commit
2769f04