ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

how to manipulate data of SimpleBlock in mkv

Open LoverOfSadness opened this issue 3 years ago • 4 comments

i have a mkv file which is encrypted only SimpleBlock part (AES-128-ECB)

i want to decrypt it how to do..??

LoverOfSadness avatar Jul 25 '22 15:07 LoverOfSadness

This is similar to existing questions like #662. You essentially need to provide your own DataSource that reads encrypted bytes and decrypts them in the read method. There are some existing (untested) implementations you can find on the internet.

tonihei avatar Jul 26 '22 08:07 tonihei

i'm talking about a section of file not whole file

ghost avatar Jul 26 '22 08:07 ghost

com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.java

image

ghost avatar Jul 26 '22 08:07 ghost

ExoPlayer already supports the ContentEncryption and ContentEncoding blocks to tell the decoder that the sample data needs to be decrypted. It's a bit unclear to me what exactly is not working and if this is something that should be supported according to the Matroska specification.

If you have a non-spec-compliant way to encrypt individual blocks, you probably need to inject your own copy of MatroskaExtractor that handles the custom logic at the point we you need it.

tonihei avatar Jul 27 '22 08:07 tonihei

Closing due to inactivity.

tonihei avatar Sep 06 '22 09:09 tonihei