Giter Site home page Giter Site logo

phash-0.9.6's Introduction

pHash-0.9.6 patched version

pHash-0.9.6 was released at 2013-04-23, but there are serveral problems for certain usage

Based on yftzeng's work for two patches:

  1. Compatible with new PHP version (Compile/Install passed).
  2. Change ph_dct_imagehash() function to return hash string for further operation.

And in addition, I added two patches for ffmpeg 2.3+ compatibility, which is also for the ruby binding compatibility

  1. Add init NULL value for pFormatCtx (Fixed Video hash)
  2. extern "C" for all functions in audiophash.h (Fixed Audio hash)

Installation

Ubuntu

1. pHash

$ sudo apt-get install libavformat-dev libmpg123-dev libsamplerate-dev libsndfile-dev
$ sudo apt-get install cimg-dev libavcodec-dev ffmpeg libswscale-dev
$ cd pHash-0.9.6
$ ./configure
$ make && sudo make install

2. Ruby binding

https://github.com/toy/pHash

gem install pHash

3. PHP binding

$ cd bindings/php
$ phpize
$ ./configure LIBS="-lpthread"
$ make && sudo make install
$ sudo vi /etc/php5/conf.d/pHash.so
extension=pHash.so
$ sudo php5enmod pHash
$ php -m
pHash

Reference

  1. https://github.com/lucidix/phash/commit/5be2d454c932152e9b2395e21f97a008c6bd8766
  2. eaccelerator/eaccelerator#33
  3. http://serverfault.com/questions/491730/compile-phash-on-centos-php-extension
  4. http://stackoverflow.com/q/23414036/96823

License

Same as pHash, GPL-3.0.

phash-0.9.6's People

Contributors

hszcg avatar yftzeng avatar toy avatar

Watchers

James Cloos avatar  avatar

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.