Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C2PA signing #931

Merged
merged 15 commits into from
Oct 26, 2023
Merged

Add C2PA signing #931

merged 15 commits into from
Oct 26, 2023

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Oct 18, 2023

Add C2PA signing to the FFMPEG pipeline.

How does sample output videos look like?

You can download these videos and verify in the C2PA online verify tool: https://contentcredentials.org/verify

Note that this PR

  • Adds signing only for the FFMPEG pipeline, not yet for Mediaconvert pipeline
  • Adds c2pa.published assertion done by Livepeer Studio, not yet c2pa.transcoded
  • Adds C2PA signature only to the output mp4 files, not yet to HLS

Detailed changes

  • Add c2pa package which uses c2patool tool to sign videos
  • Add two flags c2pa-private-key and c2pa-certs to define paths to PK and Certs used for C2PA signature
  • Add c2pa bool param to the VOD request to decide if the output mp4 videos should be signed
  • Change the logic of copyFileToLocalTmpAndSegment() not to delete the local copy of the source file, because it's needed to preserve the source signature

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #931 (c28ebb3) into main (181d693) will decrease coverage by 0.37529%.
The diff coverage is 8.06452%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##                main        #931         +/-   ##
===================================================
- Coverage   51.24981%   50.87452%   -0.37529%     
===================================================
  Files             63          64          +1     
  Lines           6521        6575         +54     
===================================================
+ Hits            3342        3345          +3     
- Misses          2907        2957         +50     
- Partials         272         273          +1     
Files Coverage Δ
config/cli.go 53.95683% <ø> (ø)
handlers/upload.go 69.26829% <100.00000%> (+0.15064%) ⬆️
pipeline/coordinator.go 77.24289% <0.00000%> (-0.68205%) ⬇️
transcode/transcode.go 36.84211% <0.00000%> (-0.46753%) ⬇️
pipeline/ffmpeg.go 35.23132% <22.22222%> (-0.69461%) ⬇️
c2pa/c2pa.go 0.00000% <0.00000%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 181d693...c28ebb3. Read the comment docs.

Files Coverage Δ
config/cli.go 53.95683% <ø> (ø)
handlers/upload.go 69.26829% <100.00000%> (+0.15064%) ⬆️
pipeline/coordinator.go 77.24289% <0.00000%> (-0.68205%) ⬇️
transcode/transcode.go 36.84211% <0.00000%> (-0.46753%) ⬇️
pipeline/ffmpeg.go 35.23132% <22.22222%> (-0.69461%) ⬇️
c2pa/c2pa.go 0.00000% <0.00000%> (ø)

@leszko leszko marked this pull request as ready for review October 24, 2023 10:29
@leszko leszko merged commit 910910d into main Oct 26, 2023
@leszko leszko deleted the rafal/c2pa branch October 26, 2023 09:28
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.

2 participants