MP4 container framework
Find a file
Martin Riedl 33e2fab4a5
All checks were successful
Build / Checks (pull_request) Successful in 34s
Build / Code Coverage (pull_request) Successful in 43s
Build / Build (pull_request) Successful in 33s
chore(deps): update dependency go to 1.24.x
2025-03-13 04:32:07 +00:00
.forgejo/workflows chore(deps): update dependency go to 1.24.x 2025-03-13 04:32:07 +00:00
specification new specification for AVC extension 2024-12-03 19:24:25 +01:00
test test: new ffmpeg init segment 2024-12-28 12:37:51 +01:00
.gitignore initial check in 2024-10-12 15:38:41 +02:00
.releaserc ci: new semantic release workflow 2025-02-25 19:48:54 +01:00
AVCVideoStream.go feat: new AVC box implementation 2024-12-08 11:10:26 +01:00
Box.go new box scoping 2024-12-03 19:24:00 +01:00
ChunkOffsetBox.go feat: chunk offset box 2024-12-12 19:23:33 +01:00
DataInformationBox.go new box scoping 2024-12-03 19:24:00 +01:00
DataReferenceBox.go new box scoping 2024-12-03 19:24:00 +01:00
DateTime.go new time conversion of timestamp fields 2024-10-17 18:12:50 +02:00
DecodingTimeToSampleBox.go feat: new decoding time to sample box implementation 2024-12-08 11:09:57 +01:00
FileTypeBox.go new box scoping 2024-12-03 19:24:00 +01:00
Fixed.go fix: fixed 1616 to float32 conversion 2024-12-28 19:15:43 +01:00
go.mod fix: new repository module name 2025-02-23 15:23:22 +01:00
HandlerReferenceBox.go new box scoping 2024-12-03 19:24:00 +01:00
LICENSE.txt initial check in 2024-10-12 15:38:41 +02:00
Log.go fix: replaced deprecated discard writer 2024-12-03 19:24:59 +01:00
MediaBox.go new box scoping 2024-12-03 19:24:00 +01:00
MediaDataBox.go new box scoping 2024-12-03 19:24:00 +01:00
MediaHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00
MediaInformationBox.go new box scoping 2024-12-03 19:24:00 +01:00
MovieBox.go new box scoping 2024-12-03 19:24:00 +01:00
MovieExtendsBox.go feat: movie extends box 2024-12-27 15:17:53 +01:00
MovieFragmentBox.go new box scoping 2024-12-03 19:24:00 +01:00
MovieFragmentHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00
MovieHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00
Parser.go feat: new option to ignore unknown boxes 2024-12-28 12:43:52 +01:00
Parser_test.go feat: new option to ignore unknown boxes 2024-12-28 12:43:52 +01:00
README.md docs: renamed gomp4 to mp4 2025-02-23 19:36:38 +01:00
renovate.json ci: use new renovate config location 2025-02-28 16:21:59 +01:00
SampleDescriptionBox.go feat: new AVC box implementation 2024-12-08 11:10:26 +01:00
SampleSizeBox.go feat: new sample size and sample to chunk box 2024-12-10 21:20:15 +01:00
SampleTableBox.go new box scoping 2024-12-03 19:24:00 +01:00
SampleToChunkBox.go feat: new sample size and sample to chunk box 2024-12-10 21:20:15 +01:00
String.go feat: new data reference box 2024-11-20 17:53:24 +01:00
TrackBox.go new box scoping 2024-12-03 19:24:00 +01:00
TrackExtendsBox.go feat: track extends box 2024-12-27 18:39:52 +01:00
TrackFragmentBox.go new box scoping 2024-12-03 19:24:00 +01:00
TrackFragmentDecodeTimeBox.go feat: track fragment decode time box 2024-12-27 18:53:37 +01:00
TrackFragmentHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00
TrackFragmentRunBox.go new box scoping 2024-12-03 19:24:00 +01:00
TrackHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00
VideoMediaHeaderBox.go new box scoping 2024-12-03 19:24:00 +01:00

mp4

release pipeline status

mp4 implementation in golang based on spec ISO/IEC 14496-12:2015

Parser

parser := mp4.NewParser(file)
if err := parser.Parse(); err != nil {
    panic(err)
}

Progress

Implementation progress of ISO/IEC 14496-12:2015:

Chapter Box Types Parser
4.3 File Type Box ftyp 100%
8.1.1 Media Data Box mdat 100%
8.1.2 Free Space Box free, skip -
8.1.3 Progressive Download Information Box pdin -
8.2.1 Movie Box moov 100%
8.2.2 Movie Header Box mvhd 100%
8.3.1 Track Box trak 100%
8.3.2 Track Header Box tkhd 100%
8.3.3 Track Reference Box tref -
8.3.4 Track Group Box trgr -
8.4.1 Media Box mdia 100%
8.4.2 Media Header Box mdhd 80%
8.4.3 Handler Reference Box hdlr 100%
8.4.4 Media Information Box minf 100%
8.4.5.2 Null Media Header Box nmhd -
8.4.6 Extended language tag elng -
8.5.1 Sample Table Box stbl 100%
8.5.2 Sample Description Box stsd 100%
8.5.3 Degradation Priority Box stdp -
8.6.1.2 Decoding Time to Sample Box stts 100%
8.6.1.3 Composition Time to Sample Box ctts -
8.6.1.4 Composition to Decode Box cslg -
8.6.2 Sync Sample Box stss -
8.6.3 Shadow Sync Sample Box stsh -
8.6.4 Independent and Disposable Samples Box sdtp -
8.6.5 Edit Box edts -
8.6.6 Edit List Box elst -
8.7.1 Data Information Box dinf 100%
8.7.2 Data Reference Box dref, url, urn 100%
8.7.3 Sample Size Boxes stsz, stz2 50%
8.7.4 Sample To Chunk Box stsc 100%
8.7.5 Chunk Offset Box stco, co64 50%
8.7.6 Padding Bits Box padb -
8.7.7 Sub-Sample Information Box subs -
8.7.8 Sample Auxiliary Information Sizes Box saiz -
8.7.9 Sample Auxiliary Information Offsets Box saio -
8.8.1 Movie Extends Box mvex 100%
8.8.2 Movie Extends Header Box mehd -
8.8.3 Track Extends Box trex 100%
8.8.4 Movie Fragment Box moof 100%
8.8.5 Movie Fragment Header Box mfhd 100%
8.8.6 Track Fragment Box traf 100%
8.8.7 Track Fragment Header Box tfhd 20%
8.8.8 Track Fragment Run Box traf 100%
8.8.9 Movie Fragment Random Access Box mfra -
8.8.10 Track Fragment Random Access Box tfra -
8.8.11 Movie Fragment Random Access Offset Box mfro -
8.8.12 Track fragment decode time tfdt 100%
8.8.13 Level Assignment Box leva -
8.8.15 Track Extension Properties Box trep -
8.8.16 Alternative Startup Sequence Properties Box assp -
8.9.2 Sample to Group Box sbgp -
8.9.3 Sample Group Description Box sgpd -
8.10.1 User Data Box udta -
8.10.2 Copyright Box cprt -
8.10.3 Track Selection Box tsel -
8.10.4 Track kind kind -
8.11.1 The Meta box meta -
8.11.2 XML Boxes xml, bxml -
8.11.3 The Item Location Box iloc -
8.11.4 Primary Item Box pitm -
8.11.5 Item Protection Box ipro -
8.11.6 Item Information Box iinf -
8.11.7 Additional Metadata Container Box meco -
8.11.8 Metabox Relation Box mere -
8.11.11 Item Data Box idat -
8.11.12 Item Reference Box iref -
8.12.1 Protection Scheme Information Box sinf -
8.12.2 Original Format Box frma -
8.12.5 Scheme Type Box schm -
8.12.6 Scheme Information Box schi -
8.13.2 FD Item Information Box fiin -
8.13.3 File Partition Box fpar -
8.13.4 FEC Reservoir Box fecr -
8.13.5 FD Session Group Box segr -
8.13.6 Group ID to Name Box gitn -
8.13.7 File Reservoir Box fire -
8.14.3 Sub Track box strk -
8.14.4 Sub Track Information box stri -
8.14.5 Sub Track Definition box strd -
8.14.6 Sub Track Sample Group box stsg -
8.15.3 Restricted Scheme Information box rinf -
8.15.4.2 Stereo video box stvi -
8.16.2 Segment Type Box styp -
8.16.3 Segment Index Box sidx -
8.16.4 Subsegment Index Box ssix -
8.16.5 Producer Reference Time Box prft -
8.17.3 Complete Track Information Box cinf -
9.1.2.1 SRTP Process box srpp -
9.2.4.7 FEC Information Box feci -
12.1.2 Video media header vmhd 100%
12.2.1 Media handler soun -
12.2.2 Sound media header smhd -
12.2.4 Channel layout chnl -
12.2.5 Downmix Instructions dmix -
12.2.7 Audio stream loudness ludt -
12.4.2 Hint Media Header Box hmhd -

Implementation progress of ISO/IEC 14496-15:2017:

Chapter Box Types Parser
5.4.2 AVC video stream definition avc1, avc2, avc3, avc4, avcC, m4ds, btrt 10%

Helper Tools