Skip to content

Instantly share code, notes, and snippets.

@wader
Created October 11, 2023 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wader/b9cbe973eebd88e80b2e956dff77dcff to your computer and use it in GitHub Desktop.
Save wader/b9cbe973eebd88e80b2e956dff77dcff to your computer and use it in GitHub Desktop.
$ fq -o line_bytes=16 -o force=true -d mp4 dd format/mp4/testdata/emsg.mp4
│00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f│0123456789abcdef│.{}: format/mp4/testdata/emsg.mp4 (mp4)
│ │ │ boxes[0:1]:
│ │ │ [0]{}: box
0x000│00 00 01 a1 │.... │ size: 417
0x000│ 65 6d 73 67 │ emsg │ type: "emsg" (Event message)
0x000│ 00 │ . │ version: 0
0x000│ 00 00 00 │ ... │ flags: 0
0x000│ 68 74 74 70│ http│ scheme_id_uri: "http://youtube.com/streaming/metadata/segment/1..."
0x010│3a 2f 2f 79 6f 75 74 75 62 65 2e 63 6f 6d 2f 73│://youtube.com/s│
0x020│74 72 65 61 6d 69 6e 67 2f 6d 65 74 61 64 61 74│treaming/metadat│
0x030│61 2f 73 65 67 6d 65 6e 74 2f 31 30 32 30 31 35│a/segment/102015│
0x040│00 │. │
0x040│ 00 │ . │ value: ""
0x040│ 00 00 00 01 │ .... │ timescale: 1
0x040│ 00 00 00 00 │ .... │ presentation_time_delta: 0
0x040│ 00 00 00 00 │ .... │ event_duration: 0
0x040│ 30 d7│ 0.│ id: 819396933
0x050│01 45 │.E │
0x050│ 53 65 71 75 65 6e 63 65 2d 4e 75 6d 62 65│ Sequence-Numbe│ message_data: raw bits
0x060│72 3a 20 30 0d 0a 49 6e 67 65 73 74 69 6f 6e 2d│r: 0..Ingestion-│
0x070│57 61 6c 6c 74 69 6d 65 2d 55 73 3a 20 31 36 32│Walltime-Us: 162│
0x080│34 34 35 36 37 39 35 30 34 35 33 37 30 0d 0a 49│4456795045370..I│
0x090│6e 67 65 73 74 69 6f 6e 2d 55 6e 63 65 72 74 61│ngestion-Uncerta│
0x0a0│69 6e 74 79 2d 55 73 3a 20 31 30 30 0d 0a 43 61│inty-Us: 100..Ca│
0x0b0│70 74 75 72 65 2d 57 61 6c 6c 74 69 6d 65 2d 55│pture-Walltime-U│
0x0c0│73 3a 20 31 36 32 34 34 35 36 37 39 35 30 33 37│s: 1624456795037│
0x0d0│36 36 32 0d 0a 53 74 72 65 61 6d 2d 44 75 72 61│662..Stream-Dura│
0x0e0│74 69 6f 6e 2d 55 73 3a 20 30 0d 0a 4d 61 78 2d│tion-Us: 0..Max-│
0x0f0│44 76 72 2d 44 75 72 61 74 69 6f 6e 2d 55 73 3a│Dvr-Duration-Us:│
0x100│20 31 34 34 30 30 30 30 30 30 30 30 0d 0a 54 61│ 14400000000..Ta│
0x110│72 67 65 74 2d 44 75 72 61 74 69 6f 6e 2d 55 73│rget-Duration-Us│
0x120│3a 20 35 30 30 30 30 30 30 0d 0a 53 74 72 65 61│: 5000000..Strea│
0x130│6d 61 62 6c 65 3a 20 54 0d 0a 46 69 72 73 74 2d│mable: T..First-│
0x140│46 72 61 6d 65 2d 54 69 6d 65 2d 55 73 3a 20 31│Frame-Time-Us: 1│
0x150│36 32 34 34 35 36 37 39 35 32 38 35 37 33 33 0d│624456795285733.│
0x160│0a 46 69 72 73 74 2d 46 72 61 6d 65 2d 55 6e 63│.First-Frame-Unc│
0x170│65 72 74 61 69 6e 74 79 2d 55 73 3a 20 38 34 0d│ertainty-Us: 84.│
0x180│0a 43 75 72 72 65 6e 74 2d 53 65 67 6d 65 6e 74│.Current-Segment│
0x190│2d 58 66 6f 72 6d 61 74 3a 20 31 34 30 0d 0a 0d│-Xformat: 140...│
0x1a0│0a│ │.│ │
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment