Bento4 icon indicating copy to clipboard operation
Bento4 copied to clipboard

mp4edit --insert: Support merging 2 same type boxes

Open davidandreoletti opened this issue 2 years ago • 1 comments

Assuming an original mp4 with the following udta block:

[moov]
  ....
  [udta] size=8+69
    [.mak] size=8+9
    [.mod] size=8+12

I would like to add the following udta block payload only to the original's udta block:

    [foobar] size=...
    [foobar2] size= ...
    [foobar3] size=...

In order to get the following udta block result:

[moov]
  ....
  [udta] size=8+69
    [.mak] size=8+9
    [.mod] size=8+12
    [foobar] size=...
    [foobar2] size= ...
    [foobar3] size=...

The following command was issued:

mp4extract moov/udta --payload original.mp4 udta.payload
mp4edit --insert moov/udta original.mp4 edited.mp4

with the result:

[moov]
  ....
  [udta] size=8+69
    // [.mak] and [.mod] have been deleted
    [foobar] size=...
    [foobar2] size= ...
    [foobar3] size=...

At first glance, it feels like mp4edit --insert behave like a "replace" box operation rather than append/insert operation.

What do you recommend to get both udta block merged ?

davidandreoletti avatar Sep 13 '23 10:09 davidandreoletti

@barbibulle ping :-)

davidandreoletti avatar Oct 02 '23 08:10 davidandreoletti