Giter VIP home page Giter VIP logo

videocomparison's Introduction

VideoComparison

A video comparison tool based on java. This tool uses the pHash algorithm to hash a stack of frames (average frame per second). At the moment only the Windows operating system is supported. Depending on interests Linux and MacOS will follow. This tool uses the OpenCV-411 and FFMPEG library, which are noted in src/lib. These files are not included in this repository.

How It Works

The tools search recursively in the video directory for video. Then it generates a chain of hashes and compares the hash chains with a "Shifted Longest Common Subhash" algorithm (self defined name). The result is then written to the defined file in CSV format. This list can then be sorted by the percentage of match.

Let's assume the following folder structure is given and the video path is set to /users/admin/video.

/
├── users/
│   ├── admin/
│   │   ├── video
│   │   │   ├── dcim
│   │   │   │   ├── a.mp4
│   │   │   │   └── b.mp4
│   │   │   ├── backups
│   │   │   │   ├── aa.mp4
│   │   │   │   └── b.mp4
│   │   │   └── vacation2019
│   │   │       └── c.mp4

In addition, the following is assumed:

  • a != b != c
  • a ~ aa
  • b == b

In this case the file with the results could look like this (but without spaces):

Video-A;                     Video-B;                           Consistency
/users/admin/dcim/a.mp4;     /users/admin/dcim/b.mp4;           0.1
/users/admin/dcim/a.mp4;     /users/admin/backups/aa.mp4;       89
/users/admin/dcim/a.mp4;     /users/admin/backups/b.mp4;        0
/users/admin/dcim/a.mp4;     /users/admin/vacation2019/c.mp4;   9.2
/users/admin/dcim/b.mp4;     /users/admin/backups/aa.mp4;       1.4
/users/admin/dcim/b.mp4;     /users/admin/backups/b.mp4;        99.943
/users/admin/dcim/b.mp4;     /users/admin/vacation2019/c.mp4;   22.8
/users/admin/backups/aa.mp4; /users/admin/backups/b.mp4;        1.4
/users/admin/backups/aa.mp4; /users/admin/vacation2019/c.mp4;   8.6
/users/admin/backups/b.mp4;  /users/admin/vacation2019/c.mp4;   22.8

Parameters

At the moment the following parameters are offered:

{-vd,-video_directory}          Required: yes   Video directory
{-rp,-result_path}              Required: no    Result path (default './result.csv')
{-pc,-phash_collection}         Required: no    Select a pHash collection source and/or saving destination (default '')
{-t,-threads}                   Required: no    Number of threads (default '1')
{-hs,-hash_size}                Required: no    Size of the hash (default '256')
{-senp,-save_each_n_percentage} Required: no    How often (percentage steps) should the hashs be saved (0=only at end) (default '10')
{-duh,-drop_unneeded_hashs}     Required: no    Drop unneeded hashs in given collection (default 'no')

videocomparison's People

Contributors

stevencyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

videocomparison's Issues

Some questions...

is this project a study project without the esseantial parts?
Cause it has not pom.xml, ffmpeg and opencv libs...
I wanna study the area.
so sad....

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.