Check if Two Videos are the Same using php

Viewed 598

I have search many time but i did not find any solution so in this case i can not post any code. sorry for this.

I have faced a problem that how can i check that 2 or more video same like i have media folder and many video upload in this folder then when i upload new video then need to check that video already exit or not.

1. if i have video demo.mp4 then when i will try to upload same video then give error
2. if i change video name like demo.mp4 to demo1.mp4 then i will give same error cause video name different but video content same
3. if i upload video demo5.mp4 then show me no error

i already checked image compare using

include('compareImages.php');
     $new_image_name = $uploadfile_temp; 
     $compareMachine = new compareImages($new_image_name);
     $image1Hash = $compareMachine->getHasString(); 
     $files = glob("uploads/*.*");
      $check_image_duplicate = 0;
      for ($i = 0; $i < count($files); $i++) {
           $filename = $files[$i];
           $image2Hash = $compareMachine->hasStringImage($filename); 
           $diff = $compareMachine->compareHash($image2Hash);
           if($diff < 10){
              $check_image_duplicate = 1;
              //unlink($new_image_name);
               break;
              }

        }

but i can not compare video. someone help me

1 Answers
Related