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

Crazy Red Elephant crazyredelephant at protonmail.com
Tue Feb 11 16:03:04 EET 2020

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, February 11, 2020 12:26 AM, Moritz Barsnick <barsnick at gmx.net> wrote:

> Well, ffmpeg parses the individual decrpypted segments just fine, so
> shrug. I can only guess that when segmenting, they weren't segmented
> at MPEG-TS packet boundaries, or something like that.

I tried what Micael suggested for the IV values and it worked. I used the next command for part1 file for example:

"openssl aes-128-cbc -d -nosalt -K 5e5852fab5eedf7c6b7a367b1fc140a1 -iv 00000000000000000000000000000001 -in part1.ts -out part1.dec.ts"

By the way, when I mux the decrypted .ts parts into one .ts or .mp4 I get lots of "Non-monotonous DTS in output stream 0:0" errors which is another issue I still can't figure out a solution for... But since it's kinda off-topic, I think I will ask it in a new thread :-)

> What do you mean with "part0 decrypted from m3u8"? When using ffmpeg to
> decrypt via m3u8? Well, you need to consider that "ffmpeg -c copy" does
> demux and remux, and ffmpeg's MPEG-TS muxer does not (cannot) copy all
> the properties of the original container. It's simply a different file,
> though the contained multimedia streams should be identical.

Yes, when I use ffmpeg to decrypt via m3u8 with only that one file in it...

More information about the ffmpeg-user mailing list