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

Recheck periodically for better quality videos #265

Open
ankenyr opened this issue Jul 1, 2022 · 6 comments
Open

Recheck periodically for better quality videos #265

ankenyr opened this issue Jul 1, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@ankenyr
Copy link

ankenyr commented Jul 1, 2022

This being an archiving project, downloading the best quality desired by the Format Scheme is presumably desired. If a user wants 4k but only 2k is available, 2k is what will be downloaded.

Sometimes however the 4k transcode can be delayed and not available for some time. In certain cases it is possible for this to take even weeks

It would be good to emulate what TheFrenchGhosty is doing where you immediately download what ever the best quality is right as soon as it is available. Then periodically check for higher quality videos to be available. This periodic check only happens for videos that are younger than the cut-off period in order to not waste time checking videos that are too old. This period should be configurable by the user.

@bbilly1
Copy link
Member

bbilly1 commented Jul 3, 2022

Thanks for reaching out on Discord and thanks for adding the links here. We already have the periodic rescan task, I think we can add this there.

But first step would be to index the file metadata into Elasticsearch so that can be compared on the next scan.

@bbilly1 bbilly1 added the enhancement New feature or request label Jul 3, 2022
@ankenyr
Copy link
Author

ankenyr commented Jul 3, 2022

Something that will be difficult is how to determine if something is more desired based on the format selection string. From my understanding the selection language can be quite complex but at least for FrenchGhost's there is a list of items separated by /

Will write up a few edge cases with my suggestion in a tl;dr on how I think the feature should work below

Lets say you have an video stored and its metadata. You have your format select string and a new video is downloaded. You can try and compare the videos but that isn't always straight forward. I may prefer H265 over VP9. So straight media to media comparisons isn't the best.

You could just take what ever the new thing is if it is different but what happens if the content creator removed a 4k video for some reason. You have 4k and now a 2k is downloaded. Or similarly with codecs.

You could try and parse the selection format string but that is fraught with issues itself. What happens if the format is changed? How complex is it really? I suspect you can do a lot of crazy stuff with it.

My suggestion would be to allow someone to make multiple selections. For me I would break up FrenchGhosts script into the 102 different individual selections such as
bestvideo[vcodec^=av01][height>=4320][fps>30
bestvideo[vcodec^=vp9.2][height>=4320][fps>30]
bestvideo[vcodec^=vp9][height>=4320][fps>30]
being the first three selections. These would be in their priority. TA would perform a request for each one in order till one is successful and then store which index (SI) was successful. Subsequent runs would only attempt index 0 to SI-1. If a new video is found it updates SI and the media.

We should also reach out to the dev of yt-dlp, they are super responsive and may have an even better idea that I am not thinking of on this.

@bbilly1
Copy link
Member

bbilly1 commented May 13, 2023

@ankenyr are you still interested in working on this? v0.3.6 now indexes all required metadata, first required step towards checking if there is a better resolution out there.

@Emporea
Copy link

Emporea commented May 12, 2024

Something thats related to this and I'd like to see is the possibility to redownload a set of videos, e.g. playlist, for a channel, or all videos in a given new quality.

Lets say I have downloades everything using bestvideo 1080 and i would like to download every video in 720.

@CastleBravoMegatons
Copy link

I am going to tackle this. Just a heads up we are probably going to need a migration command as FPS was not being collected and put into the Database

@bbilly1
Copy link
Member

bbilly1 commented Jul 6, 2024

We are about to start our refactor and frontend migration. You'll probably want to wait with that, at least until the backend refactor is done then fork off from that. Otherwise merging will be difficult.

Also see CONTRIBUTING.md here.

List of issues here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants