ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sat Oct 23, 2021 1:30 am

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sat Sep 18, 2021 8:16 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 12549
Often on youtube there are videos of 4, 8, 10, or even more hours containing a certain amount of tracks in loop.
For example the original playlist is only 40 minutes but the video is 4 hour, so if you want to keep a local collection of these audio files you are going to waste lot of space for nothing and maybe you don't like to listen the same playlist again and again.

I needed a basic and simple solution without big software, anything bloat to compile, complicated API, and hours spent reading and searching a solution.

There is this simple tool from acousticid that creates audio fingerprints of any input audio file, it splits it in small chunks and spit out a 32bit number for each chunk.
https://github.com/acoustid/chromaprint
The tool needs ffmpeg in the system, it's open source, multiplatform, and has compiled releases for Windows too.

So I forced the tool to fingerprint the whole file (by default it only checks the first few seconds), dump the fingerprints in an array, and scans the array searching if the fingerprints at the beginning of the file are found later.

The tool is launched as: fpcalc.exe -length 0 -raw -json FILE

It's a super simple and basic solution, but it works well since I only got few false positives in over 200 files I tested.

I made a simple tool for doing the job and returning the number of seconds where the repeated fingerprint is found, it can even launch ffmpeg for automatically cutting the file (add -DCUTIT to gcc when compiling).

Hope it's useful.


Attachments:
File comment: C source code for finding the repeated fingerprint.
acrdupfind.c [3.46 KiB]
Downloaded 106 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited