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

Specify start and end times #151

Open
0x4d6165 opened this issue Jul 20, 2023 · 3 comments
Open

Specify start and end times #151

0x4d6165 opened this issue Jul 20, 2023 · 3 comments

Comments

@0x4d6165
Copy link

I see in the code there's specifiers for Start and End times, is there a way to use these options? I can't see any functions that take the Info type

@wader
Copy link
Owner

wader commented Jul 20, 2023

You mean StartTime/EndTime in the Info struct? I haven't actually notice them before. No they come from yt-dlp/youtubedl and are optionally populated by an extractor i think. Do you know if yt-dlp/youtubedl respect them and trim etc? also do you have any example of a URL that populate them?

@0x4d6165
Copy link
Author

yt-dlp respects them; I'm not sure about youtube-dl. I'm not sure exactly what you mean but here is an example command that does result in a clipped video yt-dlp "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --download-sections "*0:03-0:10"

@wader
Copy link
Owner

wader commented Jul 21, 2023

Sorry i ment if the start_time/end_time provided by a extractor is used for some kind of trimming. For example i don't see the youtube extractor sets any start_time for the example URL:

$ yt-dlp -J "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | grep start_time
<no lines>

But looking quickly at the yt-dlp code it seems like --download-sections might be using them. So to support this i think goutubedl have to add some kind of DownloadSections option, but i'm a bit unsure how it would work and if the way gotoutubedl uses streaming via stdout makes i impossible or not.

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

No branches or pull requests

2 participants