[FFmpeg-user] encryption not available for fmp4/m4s segments ?!?

Robin van der Linden linden at venom.one
Tue Jul 12 15:06:49 EEST 2022

Hello again,

well I'm not sure what I should do with your reply, but good to know 
that you know it better, but that doesn't help me at all.
If you know a solution, please let me simply know.

1. " No idea how "encryption" should work without "DRM" " -> Clearkey 
for example.
2. If you have really read my message, it's according to HEVC and that 
it's only compatible if you use fmp4 as hls_segment_type instead of 
mpegts. I use h264 and HEVC as I provide ABR streams up to 4K HDR, so 
there is no way around fmp4 for me. The problem is that fmp4 is not 
"packable" with encryption, and you will get the following error: > 
Encrypted fmp4 not yet supported Could not write header for output file 
#0 (incorrect codec parameters ?): Not yet implemented in FFmpeg, 
patches welcome <
If you don't believe me, please try yourself using the following 
parameters found at http://www.ffmpeg.org/ffmpeg-all.html -> 21.17.1 
Options (-hls_enc -hls_enc_key -hls_enc_key_url -hls_enc_iv). Please 
make sure you set hls_segment_type to fmp4

And yes I'm on the latest greatest self build ffmpeg version available 

Thanks in advance.

Am 2022-07-12 00:35, schrieb Reindl Harald:
> Am 11.07.22 um 23:22 schrieb Robin van der Linden via ffmpeg-user:
>> Hello,
>> I'm urgently searching for a solution to protect HLS streams using 
>> DRM/AES encryption.
>> Currently, it seems that this is only working with .ts segments not 
>> with .m4s segments and .ts files again don't work with HEVC / 4k HDR 
>> content, so it seems I'm 100% stuck at this point.
>> There is also a report from another user (4 years ago) with exactly 
>> the same issue: https://trac.ffmpeg.org/ticket/7138
>> Is there any kind of progress or workaround?
> no idea how "encryption" should work without "DRM"
> "protect HLS streams using DRM/AES encryption" belongs fro the sake of
> god to the transport layer and has nothing to do with the media file
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

Grüße / Kind regards,

Robin van der Linden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x257F9C8D.asc
Type: application/pgp-keys
Size: 1753 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20220712/8b33b281/attachment.key>

More information about the ffmpeg-user mailing list