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

Add youtube downloader and fix encode time argument #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

m-braunschweig
Copy link

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 should
be. Since we compute how long the clip is we want -t instead of -to.

This bug was originally introduced in commit
2769f04

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.
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 should
be. Since we compute how long the clip is we want `-t` instead of `-to`.

This bug was originally introduced in commit
2769f04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

encode.lua youtube stream [encode] youtube-dl options and stream-path property
1 participant