diff --git a/README.md b/README.md index 2f3e690..669bd49 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,12 @@ _, err = mp4.ReadBoxStructure(r, func(h *mp4.ReadHandle) (interface{}, error) { }) ``` +Please note that the above sample code doesn't work for some MP4 files. +If your MP4 files includes specific box types (ex. stco, mfra), you should update those when offsets of mdat box changed. +Next sample code adds an metadata box and updates chunk offsets in scto boxes. + +[Sample Code: Insert Metadata and Update stco box](https://gist.github.com/sunfish-shogi/cccde016a38c66d32c07a0234368804e) + ### User-defined Boxes You can create additional box definition as follows: