I wanted to present you a very unusual program, from which created I have a problem.
This is my HLS playlist (.m3u8)
#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
$ 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:
$ decrypt = openssl_decrypt($ segment, $ key_method, $ key_value, $ key_iv);
And display:
header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="01_decrypt.ts"'); echo $ decrypt;
Unfortunately, the program written for some segments works, for some it does not work
Attachments:
http://www49.zippyshare.com/v/YPvFtTW6/file.html
In Attachment:
- 01.m3u8 playlist with 01.ts segment and 01.key key works fine in VLC, after decryption by my program returns zero
- 02.m3u8 playlist with 02.ts and 02.key key works fine in VLC, after decryption through my program returns the correct strlen() value, but I can not play that file already in VLC, but works in Media Player Classic
I do not understand why? Please help