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

Change Frame Interval #68

Closed
specky532 opened this issue Nov 19, 2021 · 3 comments · Fixed by #69
Closed

Change Frame Interval #68

specky532 opened this issue Nov 19, 2021 · 3 comments · Fixed by #69
Assignees
Labels
good first issue Good for newcomers

Comments

@specky532
Copy link

Would be great to expose access to the frame interval. I quite often work with very long or very short videos and would be great to specifiy the frame interval to check. Alternatively, be able to select a total number of frames and have it randomly select that number of frames from across the video.

@akamhy
Copy link
Owner

akamhy commented Nov 19, 2021

@specky532 what do you mean by frame interval? Is it "The number of interval frames between two I-frames"? or do you want support to specify the timeframe(duration)? All the frames are available to you via the collage_dir attribute.

Alternatively, be able to select a total number of frames and have it randomly select that number of frames from across the video.

I don't understand why randomly selecting will help. Random frames selection will instead make it harder to match other copies.

I also think it is a great idea to support specifying time interval(s) for video hash generation. But I don't understand how random frame selection will improve the project.

Also, you said you work on very long videos, how long are your videos and how much time does it take to generate the hash for these long videos?

@akamhy akamhy added the good first issue Good for newcomers label Nov 19, 2021
@specky532
Copy link
Author

Sorry for the lack of clarity had a big week.

My understanding is that the video hash takes a frame every 1 second by default. framesextractor.py in the init can take a frame interval paramter. but there is nowhere to change this in the video hash, when video hash calls the frames extractor it just passes 1, instead of a variable that the user can specify. It would be useful to be able to specify this.

IE take a frame every 5 seconds or even every 0.1 seconds etc. I've had a look through the code and looks like this should be very easy to implement as the framesextractor.py init already takes the frame interval as a paramater.

The random idea was a brain fart on friday afternoon haha.

@akamhy
Copy link
Owner

akamhy commented Nov 21, 2021

IE take a frame every 5 seconds or even every 0.1 seconds etc. I've had a look through the code and looks like this should be very easy to implement as the framesextractor.py init already takes the frame interval as a parameter.

Yes, it should be trivial to implement this but I will also have to take care of the tests and coverage.

I will release the updated code by next Sunday(28 Nov).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants