I have searched many times, but I have not found any solution, so in this case I can not publish any code. Sorry for this.
I had a problem: how can I check that 2 or more videos are the same, for example, I have a media folder and a lot of video uploads in this folder, and then when I upload a new video, you need to check that the video is already coming out 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 verified image comparison 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;
break;
}
}
but I can not compare the video. someone helps me
source
share