Watermarks
Burn your logo into every rendition, and mark each viewer's copy so a leak leads back to them.
import { Crumbcast } from "crumbcast"; const crumbcast = new Crumbcast({ token: process.env.CRUMBCAST_TOKEN, baseUrl: "https://your-crumbcast",}); // The project's logo, and every viewer's copy markedawait crumbcast.videos.setWatermarks({ id: videoId, watermarks: { logo: true, forensic: true },}); // A copy has leaked: have it read for its viewer's markawait crumbcast.videos.traceCopy({ id: videoId, traceCopyForm: { file: leakedCopy },}); // Once it's read: the likeliest viewers, best firstconst { traces } = await crumbcast.videos.listTraces({ id: videoId,});console.log(traces[0].matches[0]?.label);import os from crumbcast import Crumbcast crumbcast = Crumbcast( token=os.environ["CRUMBCAST_TOKEN"], base_url="https://your-crumbcast",) # The project's logo, and every viewer's copy markedcrumbcast.videos.set_watermarks( video_id, body={"logo": True, "forensic": True},) # A copy has leaked: have it read for its viewer's markcrumbcast.videos.trace_copy( video_id, body={"file": leaked_copy},) # Once it's read: the likeliest viewers, best firsttraces = crumbcast.videos.list_traces(video_id)["traces"]best = traces[0]["matches"]print(best[0]["label"] if best else None)use Crumbcast\Crumbcast; $crumbcast = new Crumbcast( token: getenv('CRUMBCAST_TOKEN'), baseUrl: 'https://your-crumbcast',); // The project's logo, and every viewer's copy marked$crumbcast->videos->setWatermarks($videoId, [ 'logo' => true, 'forensic' => true,]); // A copy has leaked: have it read for its viewer's mark$crumbcast->videos->traceCopy($videoId, [ 'file' => fopen('leak.mp4', 'rb'),]); // Once it's read: the likeliest viewers, best first$traces = $crumbcast->videos->listTraces($videoId)['traces'];echo $traces[0]['matches'][0]['label'] ?? 'No match';const api = "https://your-crumbcast/api/v1";const auth = { Authorization: `Bearer ${process.env.CRUMBCAST_TOKEN}`,}; // The project's logo, and each viewer's copy marked as theirsawait fetch(`${api}/videos/${videoId}/watermarks/`, { method: "PUT", headers: { ...auth, "Content-Type": "application/json" }, body: JSON.stringify({ logo: true, forensic: true }),}); // A copy has leaked: have it read for its viewer's markconst form = new FormData();form.append("file", leakedCopy, "leak.mp4");await fetch(`${api}/videos/${videoId}/traces/`, { method: "POST", headers: auth, body: form,}); // Once it's read: the likeliest viewers, best firstconst { traces } = await fetch(`${api}/videos/${videoId}/traces/`, { headers: auth,}).then((response) => response.json());console.log(traces[0].matches[0]?.label);What you get
- Your logoAn image, text or both, burned into every rendition.
- Forensic marksEach viewer's copy marked as their own, invisibly.
- Named in the tokenA playback token's viewer claim says whose copy it is.
- Trace a leakUpload a leaked copy, and hear its likeliest viewers, best first.