How to add a json text file (x.json) into an existing mp4 file (x.mp4)

733 views Asked by At

I’m trying to add a json text file (x.json) into an existing mp4 file (x.mp4) using mp4box. Seemed simple enough but I’m getting nowhere.

MP4Box -add x.mp4 -set-meta box:tk=0 -add-item x.json:tk=0:name=metadata:mime=text/plain fusion.mp4

1

There are 1 answers

6
R. Bouqueau On

GPAC maintainer here. First, for other readers, the online documentation is here. An example is there.

You need two command-lines to achieve this:

MP4Box -set-meta box:tk=0 input.mp4 -out output.mp4
MP4Box -add-item x.json:tk=0:name=metadata:mime=text/plain output.mp4

In general, or if you wish to continue the discussion, please file an issue on our official tracker. There is not only me but also all our community to help you.