How to decrypt .ts files into separate .ts files with ffmpeg without using a playlist?

2

I have a number of .ts files, .m3u8 playlist and a key to decrypt them. The key is a file, not a hexadecimal string. My goal is to decrypt some of these .ts files to analyze them individually. I also obviously don't want to modify the actual video/audio streams in them in any way, just a decryption.

I have no problem decrypting them as an .m3u8 playlist into one big .ts or .mp4 file with a simple command like ffmpeg -allowed_extensions ALL -i chunklist.m3u8 -c copy output.ts, I just use URI=key in the playlist and it works. But I need them to be decrypted into separate files, not one.

I could probably just leave only one line in the playlist and decrypt them one by one like this but I want to learn how to do it properly.

I tried opening the key file in a hex editor (which is probably a dumb thing to do) and then using the hex value in a command like ffmpeg -decryption_key {hex_value} -i part1.ts part1.ts but it gives me an Invalid data found when processing input error...

So how to do this properly? The ffmpeg documentation wasn't helpful...

Here are the files I'm working with in a zip archive. I've included only three of the .ts files there, that should be enough for a test.

Any help will be greatly appreciated. Thanks!

Red Elephant

Posted 2020-02-07T23:20:50.157

Reputation: 21

Yes, that's what I used and it didn't work. – Red Elephant – 2020-02-13T14:44:00.280

Specify the input file using the crypto protocol – ffmpeg -key <key> -iv 00000000000000000000000000000000 -i crypto:part1.ts – this account has been – 2020-02-14T01:04:42.030

Or openssl enc -aes128 -d -K <key> -iv 0 -in part1.ts -out decoded-part1.ts – this account has been – 2020-02-14T01:07:20.800

No answers