Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Video stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-10-2017, 07:08 AM
tinware tinware is offline
Junior Member
 
Join Date: Nov 2017
Posts: 2
tinware is on a distinguished road
Default

Decrypt AES-128 encrypted video files from a m3u8 in PHP


Hello,

I wanted to present you a very unusual program, from which created I have a big problem.


This is my HLS playlist (.m3u8)
Code:
#EXT-X-KEY:METHOD=AES-128,URI="01.key",IV=0x00000000000000000000015FA0E49B00
#EXTINF:9.480,
01.ts

According to this information, I create variables in PHP
Code:
<?php
    
    $segment = file_get_contents("01.ts");
    $key_method = "AES-128-CBC"; // ??
    $key_value = file_get_contents("01.key");
    $key_iv = "0x00000000000000000000015FA0E49B00"; //  ?

And then I would like this file to decrypt, for example:
Code:
$decrypted = openssl_decrypt(
    $segment, 
    $key_method, 
    $key_value, 
    0, 
    $key_iv
    
);

And display:
Code:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="01_decrypt.ts"');
echo $decrypted;

The result of my program is warning:
Quote:
openssl_decrypt(): IV passed is 34 bytes long which is longer than the 16 expected by selected cipher, truncating in ...

Download source files (.m3u8, .key and .ts):
http://www26.zippyshare.com/v/VyurKv7c/file.html


I ask you for help

Last edited by tinware : 11-10-2017 at 06:42 PM.
Reply With Quote
Reply Post New Thread
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 04:10 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons