How to decrypt a simple AES encrypted HLS/MPEG-DASH video stream using FFmpeg?

I have one HLS video stream with simple AES-128 encryption and I want to decrypt the video content, and don’t want to do the process for all segments and resolutions individually, is there any way I can decrypt the video using FFmpeg?

Hi Lvan,

If the video stream is encrypted with simple AES-128 standard and the key server URL provided in manifest files (.m3u8/.mpd) is accessible without any additional authentication then FFmpeg should be able to fetch keys and decrypt media automatically, there are no additional flags or parameters are required for this. Consider the following example.
ffmpeg -i <AEcS-128 encrypted HLS/MPEG-DASH stream> -map 0:v -map 0:a -c copy -f mp4 output.mp4
If you have some authentication/security headers for a video like cookies and referer then you can add that header with -cookies and -referer parameter before input parameter -i in the above command.

Thanks for your response.