GithubHelp home page GithubHelp logo

vid_dup_finder_lib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vid_dup_finder_lib's Issues

Add additional API for VideoHash

Today I finished implementing this library in czkawka and results can be seen here - qarmin/czkawka#460

It was surprisingly easy to do(most of time took preparing GUI)

In app I use custom system to save cache to text files, so I need info about each element from VideoHash.
I found that currenty it is not possible to do it, so I had to create custom fork.

Changes from this fork are visible here(I used rust formatter, so there is a lot diffs from this tool) - qarmin@a480977.
It would be good to integrate this or similar changes to project, because this will allow me to work with upstream version of this library and get always the newest features.

Since I load hashes from file, then I need to create VideoHash object manually so I added this function

        pub fn with_start_data(
            duration: u32,
            src_path: impl AsRef<Path>,
            hash: [u64; HASH_QWORDS],
            num_frames: u32,
        ) -> Self {
            VideoHash {
                hash,
                num_frames,
                src_path: src_path.as_ref().to_path_buf(),
                duration,
            }
        }

Also there is no possibility to get hash or num_frames from VideoHash so I added this functions

    /// The hash.
    pub fn hash(&self) -> &[u64; HASH_QWORDS] {
        &self.hash
    }
    pub fn num_frames(&self) -> u32 {
        self.num_frames
    }

The last thing is that const HASH_QWORDS is not public.
I need to check if number of loaded hash elements is equal to number of needed hash elements, so access to such constant would be really helpful(for now I have hardcoded number 19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.