{"repo":"abema/go-mp4","free":true,"listed":false,"github":"https://github.com/abema/go-mp4","clone":"git clone https://github.com/abema/go-mp4.git","description":"Go library for reading and writing MP4 file","language":"Go","stars":546,"topics":["mp4","go","golang","fmp4","mp4box"],"license":"MIT","category":"dev-tools","readme_excerpt":"go-mp4 ------ go-mp4 is Go library which provides low-level I/O interfaces of MP4. This library supports you to parse or build any MP4 boxes(atoms) directly. go-mp4 provides very flexible interfaces for reading boxes. If you want to read only specific parts of MP4 file, this library extracts those boxes via io.ReadSeeker interface. On the other hand, this library is not suitable for complex data conversions. Integration with your Go application Reading Using ReadBoxStructure or ReadBoxStructureFromInternal, you can scan box(atom) tree by depth-first order. ExtractBox, ExtractBoxes, ExtractBoxWithPayload, ExtractBoxesWithPayload, and Probe are wrapper functions of ReadBoxStructure. Writing Writer helps you to write box tree. The following sample code edits emsg box and writes to another file. Please note that the above sample code doesn't work for some MP4 files. If your MP4 files include 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 stco boxes. Sample Code: Insert Metadata and Update stco box User-defined Boxes You can create additional box definition as follows: Buffering go-mp4 has no buffering feature for I/O. If you should reduce Read function calls, you can wrap the io.ReadSeeker by bufseekio. Command Line Tool Install mp4tool as follows: For example, mp4tool dump MP4 FILE NAME command prints MP4 box tree as follows:","default_branch":null,"files":null,"tree":[],"storefront":"/r/abema","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/abema/go-mp4/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}