Fingerprinting YouTube or Twitter streams

How to fingerprint content from external resources

Posted by Sergiu Ciumac
on January 21, 2021 · 3 mins read
Posted by Sergiu Ciumac
on January 21, 2021 · 3 mins read

Since the introduction of the JSON API you can provide media files at the input for both insert and query operations. The origin of these media files may vary, though quite often they do come from popular media platforms like YouTube or Twitter.

In order to simplify the workflow you can now fingerprint Audio (or Video) streams by providing links at the input. Below is a short example on how to fingerpring Audio stream from Bach Air on G String.


 curl --request PUT \
  --url 'http://localhost:3340/api/v1.1/tracks?encodedMediaUrl=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvNkIj_BhHvY' \
  --header 'Accept: application/json' \
  --header 'Authorization: Basic Admin:' \
  --header 'Content-Type: application/*+json' \
  --data '{"id":"e96d43b7-0f02-486c-a6d5-acc6bbfdd7be","title":"Bach Air on G string Piano","artist":"Valentina Lisitsa","mediaType":"Audio"}'

Once inserted you can query it with a similar HTTP request:


 curl --request GET \
  --url 'http://localhost:3340/api/v1.1/tracks?encodedMediaUrl=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DvNkIj_BhHvY' \
  --header 'Accept: application/json' \
  --header 'Authorization: Basic Admin:' \
  --header 'Content-Type: application/*+json'

Provided response will contain match related infomration.

[
    {
        "audio": {
            "coverage": {
                "queryCoverage": 0.9985911496515897,
                "queryCoverageLength": 348.22641575872814,
                "queryDiscreteCoverageLength": 348.22641575872814,
                "queryGaps": [],
                "queryLength": 348.7177068214804,
                "queryMatchStartsAt": 0.0,
                "trackCoverage": 0.9986244048590559,
                "trackCoverageLength": 348.23801243841564,
                "trackDiscreteCoverageLength": 348.23801243841564,
                "trackGaps": [],
                "trackLength": 348.7177068214804,
                "trackMatchStartsAt": 0.0
            },
            "matchedAt": "2021-01-22T14:42:35.8148993Z",
            "queryMatchId": "a22c2278-65d0-4efa-8715-febe7f727878"
        },
        "id": "4581dd81-7466-47df-8412-43c4672e5642",
        "matchedAt": "2021-01-22T14:42:35.8148993Z",
        "reviewStatus": "None",
        "streamId": "",
        "track": {
            "artist": "Valentina Lisitsa",
            "id": "e96d43b7-0f02-486c-a6d5-acc6bbfdd7be",
            "mediaType": "Audio",
            "metaFields": {
                "audio_InsertDate": "2021-01-22T13:38:55.0437653+00:00",
                "audio_OriginalPointsCount": "0",
                "audio_TrackLength": "348.72"
            },
            "title": "Bach Air on G string Piano"
        }
    }
]

Emy provides support for YouTube and Twitter links.

Open an issue in SoundFingerprinting GitHub page to request support for other media platforms.

Keep Reading

Sign Up for our newsletter

Get helpful monitoring tips and news
directly to your inbox.