Skip to content

add upload pHash check#103

Merged
elizabetheonoja-art merged 2 commits intoSubStream-Protocol:mainfrom
tusharshah21:feat/copyright-phash
Mar 27, 2026
Merged

add upload pHash check#103
elizabetheonoja-art merged 2 commits intoSubStream-Protocol:mainfrom
tusharshah21:feat/copyright-phash

Conversation

@tusharshah21
Copy link
Copy Markdown
Contributor

Summary

This PR adds an automated copyright fingerprinting check to the video upload flow by generating a perceptual hash (pHash) for each uploaded video and comparing it against protected hashes. If a match is found, the upload is flagged for manual review instead of proceeding to transcoding.

Changes

  • Added AutomatedCopyrightFingerprintingService to:
    • generate pHash for uploaded video files
    • check for matches against protected_video_hashes
    • record fingerprint outcomes in video_fingerprints
  • Integrated fingerprinting into POST /api/videos/upload:
    • computes pHash for every upload
    • flags matched uploads as flagged_for_review and returns 202
    • skips transcoding for matched uploads
    • preserves existing upload/transcoding flow for non-matches
  • Added focused tests in automatedCopyrightFingerprinting.test.js for:
    • protected-hash match => flagged + no transcoding
    • no match => normal upload + transcoding

Closes #50

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@tusharshah21 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@elizabetheonoja-art elizabetheonoja-art merged commit c9e61da into SubStream-Protocol:main Mar 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#15 Create Automated_Copyright_Fingerprinting Service

2 participants