问题
I am trying to play from local storage an encrypted video using ExoPlayer. The command used to encrypt the video using FFMPEG is as follows:
-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
- the file is playable using openkey and ffplay
, but it won't play on ExoPlayer
The main issue seems the PSSH box seems to be missing when generating the encrypted file
Is there a command option in order to add the PSSH box inside the mp4 file? I think that's why the ExoPlayer is unable to play the file.
来源:https://stackoverflow.com/questions/66044063/pssh-box-missing-when-generating-encrypted-files-using-ffmpeg