[FFmpeg-user] How to decrypt .ts files into separate .ts files with ffmpeg without using a playlist?
Micael Silva
micaelsilva at gmail.com
Wed Feb 12 01:31:36 EET 2020
> 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 :-)
>
The IV, when not right, in reality doesn't prevent decryption but makes the
output file loop arround itself with parts of the end of the file ending up
on the beginning. The "Non-monotonous DTS" on MPEGTS usually happens when
the streams starts without some keyframe, makes me think that somehow the
IV is wrong therefore the file maybe is looping arround. Did you copy the
M3U8 list right? EXT-X-MEDIA-SEQUENCE is the same and there is no IV on the
EXT-X-KEY tag?
More information about the ffmpeg-user
mailing list