Download encrypted TS files from video stream

encryptionffmpegvideo

Following this post, I usually download transport stream (.ts) files by using the browser's developer console to find the URLs of the .ts files and then I use wget to download them. After that I use the ffmpeg -f concat method to combine them into an mp4 file.

Recently I come across a site that streams videos and I used the same method to download all the .ts files. The site is here. After I downloaded all the individual .ts files, I use ffmprobe to check the file format but realized the .ts files cannot be understood by ffmpeg/ffmprobe. While the site uses http (not https) I thought the streams are not encrypted so I tried to open the .ts file in an hex editor but I don't know what format it is (but they don't look like zip/gz). My question is: are the transport steams encrypted? If yes, is there a way to decrypt them? If not? Can anyone point me to the right direction such that I can make ffmpeg understand them?

An example transport stream (first & second) are here and here but the link might expire in a bit. In that case you will need to open the site in developer console to find the updated link to the .ts files.

The site uses JW Player 8.0.0

Best Answer

Your ts sample link cannot be successfully accessed, but I suspect that the ts has been encrypted using DRM, normally it's a AES 128 encryption. In this case, you will need the key to decrypt the stream, then you can concat or do whatever post production you need.

You can follow info from the following pages: https://developer.bitmovin.com/hc/en-us/articles/115001084734-What-is-HLS-AES-Encryption-,

HLS with AES 128 encryption on Android (Ice Cream Sandwich)

https://www.wowza.com/docs/how-to-secure-apple-hls-streaming-using-drm-encryption

etc.

Related Topic