tanersener / mobile-ffmpeg

FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
https://tanersener.github.io/mobile-ffmpeg
GNU General Public License v3.0
3.85k stars 787 forks source link

Unable to play encrypted file CENC_AES_CTR - PSSH box missing #669

Closed Duna closed 3 years ago

Duna commented 3 years ago

I am using the command to encrypt a video file: -i /storage/emulated/0/Download/20210125_193031.mp4 -vcodec copy -acodec copy -c:v libx264 -encryption_scheme cenc-aes-ctr -encryption_key b42ca3172ee4e69bf51848a59db9cd13 -encryption_kid 09e367028f33436ca5dd60ffe6671e70 /storage/emulated/0/Download/out_enc.mp4 I succeeded getting the encoded result mp4 file, but it seems it cannot be played using ExoPlayer or others

Moreover I analized the output file with this tool. Looking then at the video file structure it self with an MP4 parser to see the individual atoms, or the header blocks, there does not appear to be a PSSH box.

A PSSH box is the header area that contains the data about the encryption for an ISOBMFF mp4 file - as there is none present in your video file it looks like the file is not in fact encrypted, or not in a standard way that a player would recognise anyway.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.