From 37eb5897588d54ead3eea0670b5c9098580d1f6a Mon Sep 17 00:00:00 2001 From: "Kubo, Ryosuke" Date: Sat, 6 Apr 2024 22:39:42 +0900 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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: