[FFmpeg-user] How to decrypt .ts files into separate .ts files with ffmpeg without using a playlist?

Crazy Red Elephant crazyredelephant at protonmail.com
Mon Feb 10 20:28:25 EET 2020

I only have the key file which is like "5e5852fab5eedf7c6b7a367b1fc140a1" when I open it in a hex editor. What is "hex IV" and where can I get it?

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, February 10, 2020 5:55 PM, Micael Silva <micaelsilva at gmail.com> wrote:

> On Mon, Feb 10, 2020 at 10:41 AM Crazy Red Elephant via ffmpeg-user <
> ffmpeg-user at ffmpeg.org> wrote:
> > Hi,
> > 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 the
> > "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.
> You can decrypt single files using "ffmpeg -key (hex key) -iv (hex IV,
> required) -i crypto+file:/path/to/file.ts"
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list