Comments (7)
Extra info: I rewrote my code to use ffmpeg to cut the video for the time I'm interested in into separate files, and fingerprint/query off those and it finds the matches perfectly using the same timestamps that I was passing in to the secondsToProcess and startAtSecond. There's definitely an issue there.
This is working for now, but I'd really rather not have to create these temporary video files just to fingerprint.
from soundfingerprinting.
I tried to reproduce it with a sample example but I couldn't.
The following example fingerprints the entire file, then queries only 15 seconds starting at 10'th second.
public static class Issue191
{
public static async Task<AVQueryResult> Reproduce()
{
var modelService = new InMemoryModelService();
var mediaService = new FFmpegAudioService();
string file = "path to a 30 seconds file";
var hashes = await FingerprintCommandBuilder.Instance
.BuildFingerprintCommand()
.From(file)
.UsingServices(mediaService)
.Hash();
var track = new TrackInfo("1", string.Empty, string.Empty);
modelService.Insert(track, hashes);
var results = await QueryCommandBuilder.Instance
.BuildQueryCommand()
.From(file, secondsToProcess: 15, startAtSecond: 10)
.UsingServices(modelService, mediaService)
.Query();
return results;
}
}
I get the result as expected with the following properties:
TrackCoverageWithPermittedGapsLength = 14.30
TrackMatchStartsAt = 10.03
Same holds if I fingerprint just a portion of the file:
var hashes = await FingerprintCommandBuilder.Instance
.BuildFingerprintCommand()
.From(file, secondsToProcess: 15, startAtSecond: 10)
.UsingServices(mediaService)
.Hash();
In this case, I get full matches, with
TrackCoverageWithPermittedGapsLength = 15
TrackMatchStartsAt = 0
from soundfingerprinting.
Can you provide a sample example with expected and actual results?
from soundfingerprinting.
Mmm... I'd have to hunt for some that wouldn't be a copyright infringement, since the ones I'm using are TV shows ripped from dvd. It's not every file either. Some match fine, but some are "problem files" which don't match at all. Although, I have seen some files which "sometimes match" unreliably too when using startSeconds, but usually if it doesn't match, it'll never match.
Most of my library is mkv for the container. Audio codecs vary though, I'll see if I can see a commonality for codec type.
It may be something to do with the encoding perhaps, since normally I get back 400+ items in the results when querying the whole file against the whole series (most matches are ~1 second though), but on the files where it won't find matches, it returns no results at all, not even short ones. Those same files work fine when passing the full file in though. It only returns no results when using the startSeconds option.
from soundfingerprinting.
I see that there are logging outputs in your source, but I can't see a way to access them. How do I turn on logging?
from soundfingerprinting.
Both QueryCommandBuilder
and FingerprintCommandBuilder
can be instantiated with ILoggerFactory
:
var queryCommandBuilder = new QueryCommandBuilder(loggerFactory);
Once provided it will start logging in the project configured output.
from soundfingerprinting.
A similar bug has been described in #207 (not exactly the same scenario but a particular use case when both Audio | Video fingerprints are generated during query).
A fix has been provided in v8.24.0.
from soundfingerprinting.
Related Issues (20)
- Comparing short audio files HOT 6
- System.NullReferenceException: 'Object reference not set to an instance of an object.' HOT 1
- System.NullReferenceException: 'Object reference not set to an instance of an object.' HOT 2
- Pitch-shifted tracks identification HOT 1
- Emy hits the memory limit HOT 1
- [Enhancement Request] Compare 2 differing files and return common sections/ranges within them HOT 3
- During fingerprinting, AVHashes returns empty when specifying secondsToProcess and startAtSecond while creating both audio and video fingerprints HOT 3
- Can't open a file because of the sample rate HOT 1
- [Information Request] Best way to approach the inaccuracy of the matched result time? HOT 9
- Library unable to find a match. HOT 6
- Strong name signature not valid for this assembly FFmpeg.AutoGen.Abstractions.dll HOT 2
- Probably typo error in Jacquard similarity calculation HOT 2
- AddictedCS FFmpeg.AutoGen System.NullReferenceException HOT 2
- Set FFmpeg directory path HOT 1
- Docker persistent storage after reboot HOT 4
- Possibility to pass pitch percentage when querying HOT 4
- [Question] SoundFingerprinting.Emy
- Differentiate between two almost identical tracks
- Sample rate not supported even when using a .wav with 44.1khz sample rate HOT 2
- Library and 6-sec files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soundfingerprinting.