如何使用libavformat / movenccenc.c ffmpeg库进行视频加密?

问题描述 投票:0回答:1

FFmpeg支持使用libavformat/movenccenc.h中定义的功能进行视频加密。但是,关于如何使用库函数的文档不足。

例如:在函数中:

int ff_mov_cenc_init (
    MOVMuxCencContext *ctx,
    uint8_t *encryption_key,
    int use_subsamples,
    int bitexact);

什么是MOVMuxCencContext

如果我想使用C / C ++进行此任务,该如何进行视频加密?

问候

encryption video ffmpeg libav libavformat
1个回答
0
投票

此文件movenccenc.c/h实际上是mov mp4多路复用器movenc.c的助手。根据movenc.c,此参数触发了加密机制:

{ "encryption_scheme",    "Configures the encryption scheme, allowed values are none, cenc-aes-ctr", offsetof(MOVMuxContext, encryption_scheme_str),   AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },

并且当前唯一允许的值为(string)"cenc-aes-ctr"

希望有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.