Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APPLICATION: A CLI tool to parse mp4 file, show boxes and validate the structure #821

Closed
winlinvip opened this issue Mar 26, 2017 · 2 comments
Assignees
Labels
EnglishNative This issue is conveyed exclusively in English. Feature It's a new feature.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Mar 26, 2017

Like objs/research/librtmp/srs_flv_parser, I need a mp4 parser CLI.

@winlinvip winlinvip changed the title APPLICATION: A CLI tool to parse mp4 file, show boxes and validate the structure **APPLICATION**: A CLI tool to parse mp4 file, show boxes and validate the structure Mar 26, 2017
@winlinvip winlinvip changed the title **APPLICATION**: A CLI tool to parse mp4 file, show boxes and validate the structure APPLICATION: A CLI tool to parse mp4 file, show boxes and validate the structure Mar 26, 2017
@winlinvip winlinvip added the Feature It's a new feature. label Mar 26, 2017
@winlinvip winlinvip added this to the srs 3.0 release milestone Mar 26, 2017
winlinvip added a commit that referenced this issue May 21, 2017
winlinvip added a commit that referenced this issue May 30, 2017
winlinvip added a commit that referenced this issue Jun 3, 2017
@winlinvip
Copy link
Member Author

winlin:srs winlin$  ./objs/srs_mp4_parser  html/dash/testpic_2s/V300/init.mp4 
SRS MP4 parser/3.0.24, parse and show the mp4 boxes structure.
[2017-06-04 10:36:15.663][Trace][2384][0] Parse MP4 file html/dash/testpic_2s/V300/init.mp4, verbose=0
[2017-06-04 10:36:15.664][Trace][2384][0] MP4 file open success
[2017-06-04 10:36:15.664][Trace][2384][0] MP4 box reader open success

html/dash/testpic_2s/V300/init.mp4
    ftyp, 32B, brands:iso5,0(isom,iso5,dash,mp42)
    skip, 37B, free 29B
        0x00, 0x00, 0x00, 0x1d, 0x6d, 0x6f, 0x62, 0x69
    moov, 646B, 3 boxes
        mvhd, 108B, FB(4B), 0ms, TBN=90000, nTID=3
        trak, 490B, 2 boxes
            tkhd, 92B, FB(4B,V0,0x07), track #2, 0TBN, size=640x360
            mdia, 390B, 3 boxes
                mdhd, 32B, FB(4B), TBN=90000, 0TBN
                hdlr, 59B, FB(4B), vide, MobiTV Video Media handler
                minf, 291B, 3 boxes
                    vmhd, 20B, FB(4B)
                    dinf, 36B, 1 boxes
                        dref, 28B, FB(4B), 1 childs(+)
                            URL: Same file
                    stbl, 227B, 5 boxes
                        stsd, 151B, FB(4B), 1 childs(+)
                            avc1, 135B, refs#1, size=640x360, 1 boxes
                                avcC, 49B, AVC Config: 41B
                                    0x01, 0x64, 0x00, 0x1e, 0xff, 0xe1, 0x00, 0x19, 
                                    0x67, 0x64, 0x00, 0x1e, 0xac, 0xd9, 0x40, 0xa0, 
                                    0x2f, 0xf9, 0x61, 0x00, 0x00, 0x03, 0x00, 0x01, 
                                    0x00, 0x00, 0x03, 0x00, 0x3c, 0x8f, 0x16, 0x2d, 
                                    0x96, 0x01, 0x00, 0x05, 0x68, 0xeb, 0xec, 0xb2, 
                                    0x2c
                        stts, 16B, FB(4B), 0 childs (+)
                        stsc, 16B, FB(4B), 0 childs (+)
                        stsz, 20B, FB(4B), size=0, 0 childs (+)
                        stco, 16B, FB(4B), 0 childs (+)
        mvex, 40B, 1 boxes
            trex, 32B, FB(4B), track=#2, default-sample(index:1, size:0, duration:0, flags:0)

[2017-06-04 10:36:15.664][Trace][2384][0] Parse complete
winlin:srs winlin$ 

@winlinvip
Copy link
Member Author

winlin:srs winlin$  ./objs/srs_mp4_parser  html/dash/testpic_2s/V300/743408904.m4s 
SRS MP4 parser/3.0.24, parse and show the mp4 boxes structure.
[2017-06-04 10:35:08.703][Trace][2326][0] Parse MP4 file html/dash/testpic_2s/V300/743408904.m4s, verbose=0
[2017-06-04 10:35:08.704][Trace][2326][0] MP4 file open success
[2017-06-04 10:35:08.704][Trace][2326][0] MP4 box reader open success

html/dash/testpic_2s/V300/743408904.m4s
    styp, 24B, brands:msdh,0(msdh,dash)
    moof, 1048B, 2 boxes
        mfhd, 16B, FB(4B), sequence=743408904
        traf, 1024B, 3 boxes
            tfhd, 16B, FB(4B,V0,0x20000), track=2, moof-base
            tfdt, 20B, FB(4B,V1,0x00), bmdt=133813602720000
            trun, 980B, FB(4B,V0,0xf01), samples=60, data-offset=1056
                duration=3000, size=7319, flags=33554432, cts=6000
                duration=3000, size=597, flags=16777216, cts=15000
                duration=3000, size=371, flags=16777216, cts=6000
                duration=3000, size=218, flags=16777216, cts=0
                duration=3000, size=266, flags=16777216, cts=3000
                duration=3000, size=438, flags=16777216, cts=15000
                duration=3000, size=327, flags=16777216, cts=6000
                duration=3000, size=297, flags=16777216, cts=0
    mdat, 37692B, total 37684 bytes

[2017-06-04 10:35:08.704][Trace][2326][0] Parse complete

@winlinvip winlinvip self-assigned this Sep 17, 2021
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. Feature It's a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant