Hi,

I am doing some DRM POC for the current project and I have downloaded the fMP4 playlist, from which I obtained:

- Initialization segment file
- Segment #0 file

If I fuse those two files together, I can successfully play it.

```
mp4encrypt --method MPEG-CBCS --show-progress --fragments-info ./init_segment.mp4 --key 35000256:139A70EC830300D5B36BA9141913D204:0000000000000000 segment0.mp4 encrypted.mp4
```

The file encrypted here (I think) looks fine:

```
[moof] size=8+3578
  [mfhd] size=12+4
    sequence number = 64475237
  [traf] size=8+3554
    [tfhd] size=12+8, flags=20008
      track ID = 35000256
      default sample duration = 400000
    [tfdt] size=12+8, version=1
      base media decode time = 3868514160000000
    [trun] size=12+1808, flags=e01
      sample count = 150
      data offset = 3594
    [sdtp] size=8+154
    [D4807EF2CA39-4695-8E54-26CB-9E46A79F] size=24+21
    [414C237B4FAF-4E37-92F9-7923-E76BF03A] size=24+16
    [6D1D9B0542D5-44E6-80E2-141D-AFF757B2] size=24+20
    [saiz] size=12+155
      default sample info size = 0
      sample count = 150
    [saio] size=12+8
      entry_count = 1
    [senc] size=12+1204, flags=2
      sample info count = 150
[mdat] size=8+2249541
```

But, this is where it gets interesting:

```
mp4decrypt --key 35000256:139A70EC830300D5B36BA9141913D204 --fragments-info ./init_segment.mp4 --show-progress encrypted.mp4 decrypted.mp4
```

By doing this, `decrypted.mp4` ends up with the same filesize as `encrypted.mp4` and `mp4dump` outputs the same. If I omit `--fragments-info`, I end up with 0-bytes file.

I must be doing something very odd and very silly, but I am failing to see what. :)

Unable to mp4decrypt segment encrypted via mp4encrypt
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : Unable to mp4decrypt segment encrypted via mp4encrypt
Issue date:

--- start body ---
Hi,

I am doing some DRM POC for the current project and I have downloaded the fMP4 playlist, from which I obtained:

- Initialization segment file
- Segment #0 file

If I fuse those two files together, I can successfully play it.

```
mp4encrypt --method MPEG-CBCS --show-progress --fragments-info ./init_segment.mp4 --key 35000256:139A70EC830300D5B36BA9141913D204:0000000000000000 segment0.mp4 encrypted.mp4
```

The file encrypted here (I think) looks fine:

```
[moof] size=8+3578
  [mfhd] size=12+4
    sequence number = 64475237
  [traf] size=8+3554
    [tfhd] size=12+8, flags=20008
      track ID = 35000256
      default sample duration = 400000
    [tfdt] size=12+8, version=1
      base media decode time = 3868514160000000
    [trun] size=12+1808, flags=e01
      sample count = 150
      data offset = 3594
    [sdtp] size=8+154
    [D4807EF2CA39-4695-8E54-26CB-9E46A79F] size=24+21
    [414C237B4FAF-4E37-92F9-7923-E76BF03A] size=24+16
    [6D1D9B0542D5-44E6-80E2-141D-AFF757B2] size=24+20
    [saiz] size=12+155
      default sample info size = 0
      sample count = 150
    [saio] size=12+8
      entry_count = 1
    [senc] size=12+1204, flags=2
      sample info count = 150
[mdat] size=8+2249541
```

But, this is where it gets interesting:

```
mp4decrypt --key 35000256:139A70EC830300D5B36BA9141913D204 --fragments-info ./init_segment.mp4 --show-progress encrypted.mp4 decrypted.mp4
```

By doing this, `decrypted.mp4` ends up with the same filesize as `encrypted.mp4` and `mp4dump` outputs the same. If I omit `--fragments-info`, I end up with 0-bytes file.

I must be doing something very odd and very silly, but I am failing to see what. :)

--- end body ---
