[FFmpeg-user] Do all H264 encoders support video encryption?
acbot at tutanota.de
acbot at tutanota.de
Mon Sep 30 08:36:10 EEST 2024
> ffmpeg -i input.mp4 -c:v copy -c:a copy -encryption_scheme cenc-aes-ctr -encryption_key 0123456789ABCDEF0123456789ABCDEF -encryption_kid 0123456789ABCDEF0123456789ABCDEF encrypted.mp4
>
> ffplay -decryption_key 0123456789ABCDEF0123456789ABCDEF -i encrypted.mp4
>
> The above two commands can achieve video encryption and playback, but trying to use other hardcoders (h264_qsv / h264_nvenc) cannot achieve playback. The commands are as follows:
>
> ffmpeg -hwaccel qsv -c:v h264_qsv -i input.mp4 -c:v h264_qsv -encryption_scheme cenc-aes-ctr -encryption_key 0123456789ABCDEF0123456789ABCDEF -encryption_kid 0123456789ABCDEF0123456789ABCDEF encrypted.mp4
>
> ffplay -decryption_key 0123456789ABCDEF0123456789ABCDEF -i encrypted.mp4
>
> ffplay -vcodec h264_qsv -decryption_key 0123456789ABCDEF0123456789ABCDEF -i encrypted.mp4
>
> --
> 已通过Tuta 安全发送,立即注册您的加密无广告邮箱!
> https://tuta.com
>
More information about the ffmpeg-user
mailing list