[FFmpeg-user] How to decrypt .ts files into separate .ts files with ffmpeg without using a playlist?
Ted Park
kumowoon1025 at gmail.com
Wed Feb 12 17:16:29 EET 2020
> Nice, I wasn't aware of that, and hadn't found the hlsdec code
> supporting this. On the other hand, I obviously successfully decrypted
> each segment with iv=0. *shrug* (again)
The IV is XORed with the input before encryption, and the decrypted output is XORed with the IV to get the final result. Since in this case we are starting with a 0 value for the IV I suppose it’s possible you might get away with using 0, especially for the first few segments and get usable output.
> Yes, Micael, EXT-X-MEDIA-SEQUENCE is the same and there was no IV originally. The only change I did was downloading the key file from the remote server because originally m3u8 had URI={url}. But I believe it doesn't matter anyway because even if I let ffmpeg download everything rather than using files on my computer, the DTS warnings are still there.
>
> Also, I don't think the DTS issue is a result of this because I have another example where m3u8's structure is exactly the same but no DTS warnings appear and there are no dropping frames in the result file either.
>
> You can find the files from this example [here](https://www.mediafire.com/file/dg2f4l0hdaczq6z/test3.zip/file). I tried to compare these files to the files that give me the DTS warnings in DVBinspector but haven't found anything suspicious, however I'm by no means an expert in this and more likely missed something…
Can you upload an example where you do get DTS warnings? This example decrypted and concatenated fine, but I’m not sure if it was a working example you provided for reference or the one you are having trouble with.
https://media.kumowoon1025.com/videos/test3.ts <https://media.kumowoon1025.com/videos/test3.ts>
I’m not sure if my earlier reply to your other thread went through, but that also decrypted/concatenated with no issues, except for the fact that it was cut off somewhat arbitrarily, and it complains of a missing frame at the end, but no DTS errors on either one, just a warning about initial timestamps not being set for the timed metadata “stream” which isn’t unusual.
https://media.kumowoon1025.com/videos/test.ts <https://media.kumowoon1025.com/videos/test.ts>
More information about the ffmpeg-user
mailing list