From b7d508f3742c8882231f43679ece404bd632cf5c Mon Sep 17 00:00:00 2001 From: "Kubo, Ryosuke" Date: Sat, 6 Apr 2024 23:00:48 +0900 Subject: [PATCH] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ef6122..059e1cb 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ On the other hand, this library is not suitable for complex data conversions. ### Reading -You can parse MP4 file as follows: +You can visit to boxes(atoms) included in MP4 file by depth-first, using [ReadBoxStructure](https://pkg.go.dev/github.com/abema/go-mp4#ReadBoxStructure) or [ReadBoxStructureFromInternal](https://pkg.go.dev/github.com/abema/go-mp4#ReadBoxStructureFromInternal). ```go // expand all boxes @@ -50,6 +50,8 @@ _, err := mp4.ReadBoxStructure(file, func(h *mp4.ReadHandle) (interface{}, error }) ``` +[ExtractBox](https://pkg.go.dev/github.com/abema/go-mp4#ExtractBox), [ExtractBoxes](https://pkg.go.dev/github.com/abema/go-mp4#ExtractBoxes), [ExtractBoxWithPayload](https://pkg.go.dev/github.com/abema/go-mp4#ExtractBoxWithPayload), [ExtractBoxesWithPayload](https://pkg.go.dev/github.com/abema/go-mp4#ExtractBoxesWithPayload), and [Probe](https://pkg.go.dev/github.com/abema/go-mp4#Probe) are wrapper functions of ReadBoxStructure. + ```go // extract specific boxes boxes, err := mp4.ExtractBoxWithPayload(file, nil, mp4.BoxPath{mp4.BoxTypeMoov(), mp4.BoxTypeTrak(), mp4.BoxTypeTkhd()})