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

Encrypt both audio and video streams to the same file #1480

Open
JonasVautherin opened this issue Feb 8, 2025 · 1 comment
Open

Encrypt both audio and video streams to the same file #1480

JonasVautherin opened this issue Feb 8, 2025 · 1 comment

Comments

@JonasVautherin
Copy link

I manage to encrypt the audio and video streams to two different output files with something like:

./packager input=test-video.mp4,stream=video,output=test-video-encrypted.mp4,drm_label=video \
input=test-video-reencoded.mp4,stream=audio,output=test-audio-encrypted.mp4,drm_label=audio \
--enable_raw_key_encryption \
--keys label=video:key_id=20ae55a11663d1a2947be3ede4e2b123:key=5f07cf01b5c31d0f2251f9caad63a5a3:iv=b5096ef9bc43de36e8b57c9344c85a84,label=audio:key_id=20ae55a11663d1a2947be3ede4e2b123:key=5f07cf01b5c31d0f2251f9caad63a5a3:iv=b5096ef9bc43de36e8b57c9344c85a84

But is there a way to encrypt them both to the same output file?

I have tried doing it manually with:

ffmpeg -i test-video-encrypted.mp4 -i test-audio-encrypted.mp4 -c:v copy -c:a copy final_encrypted.mp4

But then both streams are marked as "not encrypted" (though they definitely are) when I run:

./packager input=final_encrypted.mp4 --dump_stream_info

Which suggests that maybe it was not the right way?

@Alshathry
Copy link

  • 1
    I think the mpd handles audio and video separately
    I really wish if there is an way to handle file with both

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

No branches or pull requests

2 participants