Closed zhouwg closed 3 years ago
short summary about this new feature:
the idea for this new feature is come from add SampleAES AVC/H264 support in ExoPlayer, and with great help from John Chen -- a smart and kind-hearted software engineer
the Pros and Cons of this solution Pros:
Cons:
Issue Description
HLS H264 Sample-AES encrypted content not support in FFmpeg
How to reproduce the issue
Root cause
lack of H264 Sample-AES supportive in latest FFmpeg4.4
How to fix
the point is here:
new added files:
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavutil/hlsencryptinfo.h
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavutil/hlsencryptinfo.c
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavutil/hlsdecryptor.h
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavutil/hlsdecryptor.c
modified files:
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavformat/hls.c
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavformat/crypto.c
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavformat/mpegts.c#L3097
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavcodec/avcodec.h#L3543
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavformat/utils.c#L1626
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavcodec/parser.c#L59
https://github.com/zhouwg/FFmpeg/blob/release/4.4/libavcodec/h264_parser.c#L627
Status
HLS H264 SampleAES works fine for the first time in FFmpeg4.4
Defects
References
HLS_Sample_Encryption
http://www.nrta.gov.cn/art/2019/6/15/art_113_46189.html
https://github.com/google/ExoPlayer/pull/2921