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 07-13-2017, 01:26 AM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

How to Decrypt .ts Files (Key is available)


Hi,

I have a Sat Box on which there is a service to download movies/series from the internet into the hard disk inside the Sat Box.

I managed to obtain the downloading link for one of the movies/series and downloaded it to my hard disk.

There was a decryption file key along with the downloaded movie file.

I would like to ask now if there is a way to De-crypt this video file based on the available key file.

I can watch the video file on VLC or MPC, but it is scrambled.

Below is the details of this video file from Media Info:

Code:
General
ID                                       : 0 (0x0)
Complete name                            : D:\!Temp\Temp_DL.nds
Format                                   : MPEG-TS
File size                                : 977 MiB
Duration                                 : 20 min 41 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 6 598 kb/s
FileExtension_Invalid                    : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID                                       : 2064 (0x810)
Menu ID                                  : 1 (0x1)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 2 frames
Codec ID                                 : 27
Duration                                 : 29 s 40 ms
Bit rate mode                            : Constant
Bit rate                                 : 6 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type, store method                  : Separated fields
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 0.116
Stream size                              : 20.8 MiB (2%)
Encryption                               : Encrypted
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2068 (0x814)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 4
Duration                                 : 20 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 18.9 MiB (2%)
Language                                 : English
Encryption                               : Encrypted

Audio #2
ID                                       : 2069 (0x815)
Menu ID                                  : 1 (0x1)
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : 4
Duration                                 : 20 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Stream size                              : 18.9 MiB (2%)
Language                                 : Chinese
Encryption                               : Encrypted

Text
ID                                       : 2073 (0x819)
Menu ID                                  : 1 (0x1)
Format                                   : DVB Subtitle
Codec ID                                 : 6
Duration                                 : 20 min 30 s
Delay relative to video                  : 1 s 70 ms
Language                                 : Chinese
Kind Regards,
Mouna.
Reply With Quote
  #2  
Old 07-13-2017, 07:58 AM
PayNow PayNow is offline
Member
 
Join Date: Jun 2012
Posts: 72
PayNow is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


You can use livestreamer, or streamlink or even ffmpeg does support key decryption.
Reply With Quote
  #3  
Old 07-13-2017, 11:11 AM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by PayNow View Post
You can use livestreamer, or streamlink or even ffmpeg does support key decryption.
Thanks for your reply.

Is there any guides on how to use streamlink or ffmpeg to decrypt the video file?
Reply With Quote
  #4  
Old 07-13-2017, 12:47 PM
Yelloworanges Yelloworanges is offline
Junior Member
 
Join Date: May 2017
Posts: 93
Yelloworanges is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by MoonLaf View Post
Thanks for your reply.

Is there any guides on how to use streamlink or ffmpeg to decrypt the video file?
It looks like you downloaded a single video file that was never in hls format (m3u8 playlist with ts segments).

If this is correct, then the "drm" is likely something other than hls-aes.

Look at the beginning of the file that you download with a hex editor for clues about the type of drm.
Reply With Quote
  #5  
Old 07-13-2017, 01:55 PM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by Yelloworanges View Post
It looks like you downloaded a single video file that was never in hls format (m3u8 playlist with ts segments).

If this is correct, then the "drm" is likely something other than hls-aes.

Look at the beginning of the file that you download with a hex editor for clues about the type of drm.
Can't we figure the Encryption type from the Decryption File:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<Client_ECMs version="1.0"><Total_Session_ECMs>2</Total_Session_ECMs>
<CryptoPeriod Sequence_Number="1"><CryptoStart>5</CryptoStart><ECMStructure>AQAXCOQRW9IL6AAAXl8Q84FwYwAAARaiAjYDAAAA/3Uh4AEAAfwBDAIAgwD5SH4QdRwaK4Q66KD+aJXHi8SesZA0wIHsnbmDZjdy8lC4ImETT/7xnlGEviATpjRS/58XcHEYw5dH8jY87JcFIvz6hRnqWWHtSA==</ECMStructure><Parity>129</Parity></CryptoPeriod><CryptoPeriod Sequence_Number="2"><CryptoStart>720565</CryptoStart><ECMStructure>AQAXCOQRW9IL6AAAXl8VwYBwYwAAARaiAjYDAAAA/3Uh4AEAAfwBDAIAgwD5SH4QKf0TQfW0qdhdEVfLlfRjWpA0wIHsnbmDZjdy8lC4ImETT/7xnlGEviATpjRS/58XcHEYw5dH8jY87JcFIvz6hRnqWWHtSA==</ECMStructure><Parity>128</Parity></CryptoPeriod></Client_ECMs>
Reply With Quote
  #6  
Old 07-14-2017, 02:48 AM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


I digged into the issue and found the below information:

Encryption Type: PlayReady

and found also the below line:

Code:
"drmToken":"AAAEADaQNMCBaRWsfKxlUmvys4GISYjx4FT+rw4kY6YBIndnKYKBu/ykjQVTmsKOTkA/pnrfs0DU0uk=","drmFree":false
Reply With Quote
  #7  
Old 07-14-2017, 04:15 AM
Yelloworanges Yelloworanges is offline
Junior Member
 
Join Date: May 2017
Posts: 93
Yelloworanges is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


I don't know of any solution for PlayReady. Is the service offered on the web or on any other platform besides "Sat Box".
If it is offered on some other platform, there might be weaker forms of drm used.

Reversing PlayReady would likely take a lot of work and skill.
Reply With Quote
  #8  
Old 07-14-2017, 05:05 AM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by Yelloworanges View Post
I don't know of any solution for PlayReady. Is the service offered on the web or on any other platform besides "Sat Box".
If it is offered on some other platform, there might be weaker forms of drm used.

Reversing PlayReady would likely take a lot of work and skill.
I don't think we need to do encryption reversing.

The key is already available.

I downloaded (2) main files:

1. video_file.nds
2. key_file.xml

there was another file that has some information like this:

Code:
"physicalContentId":"video_file.nds"
"keyfileUrl":"http://Sat_Provider_Website/key_file.xml"
"fileSize":1024080871
"drmToken":"AAAEADaQNMCBaRWsfKxlUmvys4GISYjx4FT+rw4kY6YBIndnKYKBu/ykjQVTmsKOTkA/pnrfs0DU0uk="
"drmFree":false
and what about the key_file.xml content itself:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<Client_ECMs version="1.0"><Total_Session_ECMs>2</Total_Session_ECMs>
<CryptoPeriod Sequence_Number="1"><CryptoStart>5</CryptoStart><ECMStructure>AQAXCOQRW9IL6AAAXl8Q84FwYwAAARaiAjYDAAAA/3Uh4AEAAfwBDAIAgwD5SH4QdRwaK4Q66KD+aJXHi8SesZA0wIHsnbmDZjdy8lC4ImETT/7xnlGEviATpjRS/58XcHEYw5dH8jY87JcFIvz6hRnqWWHtSA==</ECMStructure><Parity>129</Parity></CryptoPeriod><CryptoPeriod Sequence_Number="2"><CryptoStart>720565</CryptoStart><ECMStructure>AQAXCOQRW9IL6AAAXl8VwYBwYwAAARaiAjYDAAAA/3Uh4AEAAfwBDAIAgwD5SH4QKf0TQfW0qdhdEVfLlfRjWpA0wIHsnbmDZjdy8lC4ImETT/7xnlGEviATpjRS/58XcHEYw5dH8jY87JcFIvz6hRnqWWHtSA==</ECMStructure><Parity>128</Parity></CryptoPeriod></Client_ECMs>
Is there any way to use the available information to decrypt the video file?
Reply With Quote
  #9  
Old 07-14-2017, 06:24 AM
Yelloworanges Yelloworanges is offline
Junior Member
 
Join Date: May 2017
Posts: 93
Yelloworanges is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by MoonLaf View Post
I don't think we need to do encryption reversing.
I said "Reversing PlayReady", meaning the PlayReady system - including file structure, methodology and implementation.
Some custom tools or scripts would likely be required.

Quote:
Originally Posted by MoonLaf View Post
The key is already available.

I downloaded (2) main files:

1. video_file.nds
2. key_file.xml
You make it sound so easy. Please do go on and explain more.
Reply With Quote
  #10  
Old 07-15-2017, 04:08 AM
MoonLaf MoonLaf is offline
Junior Member
 
Join Date: Jan 2016
Posts: 11
MoonLaf is on a distinguished road
Default

Re: How to Decrypt .ts Files (Key is available)


Quote:
Originally Posted by Yelloworanges View Post
I said "Reversing PlayReady", meaning the PlayReady system - including file structure, methodology and implementation.
Some custom tools or scripts would likely be required.


You make it sound so easy. Please do go on and explain more.
Sorry if I misunderstood what you've said.

I didn't say it is easy. I just want to know the approach that I should follow to decrypt the file based on the available information.
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 02:30 AM.


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