mirror of
https://github.com/wader/fq.git
synced 2024-11-24 03:05:22 +03:00
1b32b42f93
Generate more code More generic and comfortable API Improve and Update format decoder to new API Add some more format tests
185 lines
19 KiB
Plaintext
185 lines
19 KiB
Plaintext
# ffmpeg -f lavfi -i sine -t 50ms -c:a libvorbis vorbis.ogg
|
|
$ fq -d ogg verbose /vorbis.ogg
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.: {} /vorbis.ogg (ogg) 0x0-0xe46.7 (3655)
|
|
| | | pages: [3] 0x0-0xe46.7 (3655)
|
|
| | | [0]: page {} (ogg_page) 0x0-0x39.7 (58)
|
|
0x0000|4f 67 67 53 |OggS | capture_pattern: "OggS" (valid) 0x0-0x3.7 (4)
|
|
0x0000| 00 | . | stream_structure_version: 0 (valid) 0x4-0x4.7 (1)
|
|
0x0000| 02 | . | unused_flags: 0 0x5-0x5.4 (0.5)
|
|
0x0000| 02 | . | last_page: false 0x5.5-0x5.5 (0.1)
|
|
0x0000| 02 | . | first_page: true 0x5.6-0x5.6 (0.1)
|
|
0x0000| 02 | . | continued_packet: false 0x5.7-0x5.7 (0.1)
|
|
0x0000| 00 00 00 00 00 00 00 00 | ........ | absolute_granule_position: 0 0x6-0xd.7 (8)
|
|
0x0000| e6 34| .4| stream_serial_number: 3971626214 0xe-0x11.7 (4)
|
|
0x0010|ba ec |.. |
|
|
0x0010| 00 00 00 00 | .... | page_sequence_no: 0 0x12-0x15.7 (4)
|
|
0x0010| 63 a5 40 49 | c.@I | page_checksum: "4940a563" (raw bits) (valid) 0x16-0x19.7 (4)
|
|
0x0010| 01 | . | page_segments: 1 0x1a-0x1a.7 (1)
|
|
| | | segment_table: [1] 0x1b-0x1b.7 (1)
|
|
0x0010| 1e | . | [0]: segment_size 30 0x1b-0x1b.7 (1)
|
|
| | | segments: [1] 0x1c-0x39.7 (30)
|
|
0x0010| 01 76 6f 72| .vor| [0]: segment raw bits 0x1c-0x39.7 (30)
|
|
0x0020|62 69 73 00 00 00 00 01 44 ac 00 00 00 00 00 00|bis.....D.......|
|
|
0x0030|80 38 01 00 00 00 00 00 b8 01 |.8........ |
|
|
| | | [1]: page {} (ogg_page) 0x3a-0xd18.7 (3295)
|
|
0x0030| 4f 67 67 53 | OggS | capture_pattern: "OggS" (valid) 0x3a-0x3d.7 (4)
|
|
0x0030| 00 | . | stream_structure_version: 0 (valid) 0x3e-0x3e.7 (1)
|
|
0x0030| 00| .| unused_flags: 0 0x3f-0x3f.4 (0.5)
|
|
0x0030| 00| .| last_page: false 0x3f.5-0x3f.5 (0.1)
|
|
0x0030| 00| .| first_page: false 0x3f.6-0x3f.6 (0.1)
|
|
0x0030| 00| .| continued_packet: false 0x3f.7-0x3f.7 (0.1)
|
|
0x0040|00 00 00 00 00 00 00 00 |........ | absolute_granule_position: 0 0x40-0x47.7 (8)
|
|
0x0040| e6 34 ba ec | .4.. | stream_serial_number: 3971626214 0x48-0x4b.7 (4)
|
|
0x0040| 01 00 00 00| ....| page_sequence_no: 1 0x4c-0x4f.7 (4)
|
|
0x0050|20 cf 02 ee | ... | page_checksum: "ee02cf20" (raw bits) (valid) 0x50-0x53.7 (4)
|
|
0x0050| 0e | . | page_segments: 14 0x54-0x54.7 (1)
|
|
| | | segment_table: [14] 0x55-0x62.7 (14)
|
|
0x0050| 41 | A | [0]: segment_size 65 0x55-0x55.7 (1)
|
|
0x0050| ff | . | [1]: segment_size 255 0x56-0x56.7 (1)
|
|
0x0050| ff | . | [2]: segment_size 255 0x57-0x57.7 (1)
|
|
0x0050| ff | . | [3]: segment_size 255 0x58-0x58.7 (1)
|
|
0x0050| ff | . | [4]: segment_size 255 0x59-0x59.7 (1)
|
|
0x0050| ff | . | [5]: segment_size 255 0x5a-0x5a.7 (1)
|
|
0x0050| ff | . | [6]: segment_size 255 0x5b-0x5b.7 (1)
|
|
0x0050| ff | . | [7]: segment_size 255 0x5c-0x5c.7 (1)
|
|
0x0050| ff | . | [8]: segment_size 255 0x5d-0x5d.7 (1)
|
|
0x0050| ff | . | [9]: segment_size 255 0x5e-0x5e.7 (1)
|
|
0x0050| ff| .| [10]: segment_size 255 0x5f-0x5f.7 (1)
|
|
0x0060|ff |. | [11]: segment_size 255 0x60-0x60.7 (1)
|
|
0x0060| ff | . | [12]: segment_size 255 0x61-0x61.7 (1)
|
|
0x0060| 81 | . | [13]: segment_size 129 0x62-0x62.7 (1)
|
|
| | | segments: [14] 0x63-0xd18.7 (3254)
|
|
0x0060| 03 76 6f 72 62 69 73 0d 00 00 00 4c 61| .vorbis....La| [0]: segment raw bits 0x63-0xa3.7 (65)
|
|
0x0070|76 66 35 38 2e 37 36 2e 31 30 30 01 00 00 00 20|vf58.76.100.... |
|
|
* |until 0xa3.7 (65) | |
|
|
0x00a0| 05 76 6f 72 62 69 73 22 42 43 56 01| .vorbis"BCV.| [1]: segment raw bits 0xa4-0x1a2.7 (255)
|
|
0x00b0|00 40 00 00 24 73 18 2a 46 a5 73 16 84 10 1a 42|.@..$s.*F.s....B|
|
|
* |until 0x1a2.7 (255) | |
|
|
0x01a0| c9 91 1c c9 b1 1c 0b 08 0d 59 05 00 00| .........Y...| [2]: segment raw bits 0x1a3-0x2a1.7 (255)
|
|
0x01b0|01 00 08 00 00 a0 48 8a a4 48 8e e4 48 92 24 59|......H..H..H.$Y|
|
|
* |until 0x2a1.7 (255) | |
|
|
0x02a0| e7 9c 05 ad 69 8e 9a 4b b1 39 e7 9c 48 b9| ....i..K.9..H.| [3]: segment raw bits 0x2a2-0x3a0.7 (255)
|
|
0x02b0|79 52 9b 4b b5 39 e7 9c 73 ce 39 e7 9c 73 ce 39|yR.K.9..s.9..s.9|
|
|
* |until 0x3a0.7 (255) | |
|
|
0x03a0| 11 1d d1 11 1d d1 11 1d d1 11 1d d1 f1 1c cf| ...............| [4]: segment raw bits 0x3a1-0x49f.7 (255)
|
|
0x03b0|11 25 51 12 25 51 12 2d d3 32 35 d3 53 45 55 75|.%Q.%Q.-.25.SEUu|
|
|
* |until 0x49f.7 (255) | |
|
|
0x04a0|78 8a a9 78 8a a8 78 8e e8 88 92 68 99 96 a8 a9|x..x..x....h....| [5]: segment raw bits 0x4a0-0x59e.7 (255)
|
|
* |until 0x59e.7 (255) | |
|
|
0x0590| 45| E| [6]: segment raw bits 0x59f-0x69d.7 (255)
|
|
0x05a0|ce 39 2a 1d a5 c6 39 47 a9 a3 d4 51 4a b1 a6 5a|.9*...9G...QJ..Z|
|
|
* |until 0x69d.7 (255) | |
|
|
0x0690| 57 d6| W.| [7]: segment raw bits 0x69e-0x79c.7 (255)
|
|
0x06a0|7d 4d 14 55 d5 53 4d d9 15 55 55 96 55 d9 d5 65|}M.U.SM..UU.U..e|
|
|
* |until 0x79c.7 (255) | |
|
|
0x0790| 57 65 d9| We.| [8]: segment raw bits 0x79d-0x89b.7 (255)
|
|
0x07a0|f7 55 57 f6 7d 5b f7 85 e1 f6 7d df 18 55 d7 f7|.UW.}[....}..U..|
|
|
* |until 0x89b.7 (255) | |
|
|
0x0890| 52 6b 95 73| Rk.s| [9]: segment raw bits 0x89c-0x99a.7 (255)
|
|
0x08a0|52 3a 08 29 65 0e 4a 2a 29 c5 58 4a 4a 31 73 4e|R:.)e.J*).XJJ1sN|
|
|
* |until 0x99a.7 (255) | |
|
|
0x0990| 9c 94 8a 31 e7| ...1.| [10]: segment raw bits 0x99b-0xa99.7 (255)
|
|
0x09a0|20 a4 52 31 e6 1c 84 52 32 e7 20 94 92 52 e6 1c| .R1...R2. ..R..|
|
|
* |until 0xa99.7 (255) | |
|
|
0x0a90| 52 4a 29 a5 94 12| RJ)...| [11]: segment raw bits 0xa9a-0xb98.7 (255)
|
|
0x0aa0|42 08 21 84 10 42 08 21 84 10 42 08 21 84 10 42|B.!..B.!..B.!..B|
|
|
* |until 0xb98.7 (255) | |
|
|
0x0b90| 08 25 64 8c 39 e7 1c| .%d.9..| [12]: segment raw bits 0xb99-0xc97.7 (255)
|
|
0x0ba0|84 10 42 28 a5 94 8c 31 e7 9c 83 10 42 09 a5 94|..B(...1....B...|
|
|
* |until 0xc97.7 (255) | |
|
|
0x0c90| 87 07 95 00 11 31 15 00| .....1..| [13]: segment raw bits 0xc98-0xd18.7 (129)
|
|
0x0ca0|24 26 28 e4 02 40 85 c5 45 da c5 05 74 19 e0 82|$&(..@..E...t...|
|
|
* |until 0xd18.7 (129) | |
|
|
| | | [2]: page {} (ogg_page) 0xd19-0xe46.7 (302)
|
|
0x0d10| 4f 67 67 53 | OggS | capture_pattern: "OggS" (valid) 0xd19-0xd1c.7 (4)
|
|
0x0d10| 00 | . | stream_structure_version: 0 (valid) 0xd1d-0xd1d.7 (1)
|
|
0x0d10| 04 | . | unused_flags: 0 0xd1e-0xd1e.4 (0.5)
|
|
0x0d10| 04 | . | last_page: true 0xd1e.5-0xd1e.5 (0.1)
|
|
0x0d10| 04 | . | first_page: false 0xd1e.6-0xd1e.6 (0.1)
|
|
0x0d10| 04 | . | continued_packet: false 0xd1e.7-0xd1e.7 (0.1)
|
|
0x0d10| 9d| .| absolute_granule_position: 2205 0xd1f-0xd26.7 (8)
|
|
0x0d20|08 00 00 00 00 00 00 |....... |
|
|
0x0d20| e6 34 ba ec | .4.. | stream_serial_number: 3971626214 0xd27-0xd2a.7 (4)
|
|
0x0d20| 02 00 00 00 | .... | page_sequence_no: 2 0xd2b-0xd2e.7 (4)
|
|
0x0d20| 73| s| page_checksum: "c510e973" (raw bits) (valid) 0xd2f-0xd32.7 (4)
|
|
0x0d30|e9 10 c5 |... |
|
|
0x0d30| 04 | . | page_segments: 4 0xd33-0xd33.7 (1)
|
|
| | | segment_table: [4] 0xd34-0xd37.7 (4)
|
|
0x0d30| 1f | . | [0]: segment_size 31 0xd34-0xd34.7 (1)
|
|
0x0d30| 3c | < | [1]: segment_size 60 0xd35-0xd35.7 (1)
|
|
0x0d30| 34 | 4 | [2]: segment_size 52 0xd36-0xd36.7 (1)
|
|
0x0d30| 80 | . | [3]: segment_size 128 0xd37-0xd37.7 (1)
|
|
| | | segments: [4] 0xd38-0xe46.7 (271)
|
|
0x0d30| 5c dd ab 3a ab ba b0 ff| \..:....| [0]: segment raw bits 0xd38-0xd56.7 (31)
|
|
0x0d40|5a 02 04 10 00 c0 8c da 2d b6 37 df 7c f3 cd 30|Z.......-.7.|..0|
|
|
0x0d50|0c c3 30 0c c3 7a 00 |..0..z. |
|
|
0x0d50| 9a d8 3d 07 6f d2 9e 5b 5c| ..=.o..[\| [1]: segment raw bits 0xd57-0xd92.7 (60)
|
|
0x0d60|05 66 22 40 2a 00 00 00 00 00 00 00 00 00 00 00|.f"@*...........|
|
|
* |until 0xd92.7 (60) | |
|
|
0x0d90| be d8 dd e6 ae 92 f7 23 3e 6f cc 0d 80| .......#>o...| [2]: segment raw bits 0xd93-0xdc6.7 (52)
|
|
0x0da0|7a 00 00 00 00 01 06 00 00 00 00 00 00 e0 b9 05|z...............|
|
|
* |until 0xdc6.7 (52) | |
|
|
0x0dc0| 3e 37 dd 37 fe ee 85 47 7c| >7.7...G|| [3]: segment raw bits 0xdc7-0xe46.7 (128)
|
|
0x0dd0|3c 61 02 9b 31 06 f6 bb ef 9f 04 62 46 41 04 c0|<a..1......bFA..|
|
|
* |until 0xe46.7 (end) (128) | |
|
|
| | | streams: [1] 0x3a-NA (0)
|
|
| | | [0]: stream {} 0x3a-NA (0)
|
|
| | | serial_number: 3971626214 0x3a-NA (0)
|
|
| | | packets: [7] 0x3a-NA (0)
|
|
| | | [0]: packet {} (vorbis_packet) 0x0-0x1d.7 (30)
|
|
0x000|01 |. | packet_type: "Identification" (1) 0x0-0x0.7 (1)
|
|
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x6.7 (6)
|
|
0x000| 00 00 00 00 | .... | vorbis_version: 0 (valid) 0x7-0xa.7 (4)
|
|
0x000| 01 | . | audio_channels: 1 0xb-0xb.7 (1)
|
|
0x000| 44 ac 00 00| D...| audio_sample_rate: 44100 0xc-0xf.7 (4)
|
|
0x010|00 00 00 00 |.... | bitrate_maximum: 0 0x10-0x13.7 (4)
|
|
0x010| 80 38 01 00 | .8.. | bitrate_nominal: 80000 0x14-0x17.7 (4)
|
|
0x010| 00 00 00 00 | .... | bitrate_minimum: 0 0x18-0x1b.7 (4)
|
|
0x010| b8 | . | blocksize_1: 2048 0x1c-0x1c.3 (0.4)
|
|
0x010| b8 | . | blocksize_0: 256 0x1c.4-0x1c.7 (0.4)
|
|
0x010| 01| | .| | padding0: raw bits (all zero) 0x1d-0x1d.6 (0.7)
|
|
0x010| 01| | .| | framing_flag: 1 (valid) 0x1d.7-0x1d.7 (0.1)
|
|
| | | [1]: packet {} (vorbis_packet) 0x0-0x40.7 (65)
|
|
0x000|03 |. | packet_type: "Comment" (3) 0x0-0x0.7 (1)
|
|
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x6.7 (6)
|
|
| | | comment: {} (vorbis_comment) 0x7-0x3f.7 (57)
|
|
0x000| 0d 00 00 00 | .... | vendor_length: 13 0x7-0xa.7 (4)
|
|
0x000| 4c 61 76 66 35| Lavf5| vendor: "Lavf58.76.100" 0xb-0x17.7 (13)
|
|
0x010|38 2e 37 36 2e 31 30 30 |8.76.100 |
|
|
0x010| 01 00 00 00 | .... | user_comment_list_length: 1 0x18-0x1b.7 (4)
|
|
| | | user_comments: [1] 0x1c-0x3f.7 (36)
|
|
| | | [0]: user_comment {} 0x1c-0x3f.7 (36)
|
|
0x010| 20 00 00 00| ...| length: 32 0x1c-0x1f.7 (4)
|
|
0x020|65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e 31|encoder=Lavc58.1| comment: "encoder=Lavc58.134.100 libvorbis" 0x20-0x3f.7 (32)
|
|
0x030|33 34 2e 31 30 30 20 6c 69 62 76 6f 72 62 69 73|34.100 libvorbis|
|
|
0x040|01| |.| | padding0: raw bits (all zero) 0x40-0x40.6 (0.7)
|
|
0x040|01| |.| | frame_bit: 1 (valid) 0x40.7-0x40.7 (0.1)
|
|
| | | [2]: packet {} (vorbis_packet) 0x0-0xc74.7 (3189)
|
|
0x000|05 |. | packet_type: "Setup" (5) 0x0-0x0.7 (1)
|
|
0x000| 76 6f 72 62 69 73 | vorbis | magic: "vorbis" (valid) 0x1-0x6.7 (6)
|
|
0x000| 22 | " | vorbis_codebook_count: 35 0x7-0x7.7 (1)
|
|
0x000| 42 43 56 | BCV | codecooke_sync: 0x564342 (valid) 0x8-0xa.7 (3)
|
|
0x000| 01 00 | .. | codebook_dimensions: 1 0xb-0xc.7 (2)
|
|
0x000| 40 00 00| @..| codebook_entries: 64 0xd-0xf.7 (3)
|
|
0x010|24 73 18 2a 46 a5 73 16 84 10 1a 42 50 19 e3 1c|$s.*F.s....BP...| unknown0: raw bits 0x10-0xc74.7 (3173)
|
|
* |until 0xc74.7 (end) (3173) | |
|
|
| | | [3]: packet {} (vorbis_packet) 0x0-0x1e.7 (31)
|
|
0x000|5c |\ | packet_type: "Audio" (0) 0x0-0x0.7 (1)
|
|
0x000| dd ab 3a ab ba b0 ff 5a 02 04 10 00 c0 8c da| ..:....Z.......| unknown0: raw bits 0x1-0x1e.7 (30)
|
|
0x010|2d b6 37 df 7c f3 cd 30 0c c3 30 0c c3 7a 00| |-.7.|..0..0..z.||
|
|
| | | [4]: packet {} (vorbis_packet) 0x0-0x3b.7 (60)
|
|
0x000|9a |. | packet_type: "Audio" (0) 0x0-0x0.7 (1)
|
|
0x000| d8 3d 07 6f d2 9e 5b 5c 05 66 22 40 2a 00 00| .=.o..[\.f"@*..| unknown0: raw bits 0x1-0x3b.7 (59)
|
|
0x010|00 00 00 00 00 00 00 00 00 fa fd 60 9f ce 01 d1|...........`....|
|
|
* |until 0x3b.7 (end) (59) | |
|
|
| | | [5]: packet {} (vorbis_packet) 0x0-0x33.7 (52)
|
|
0x000|be |. | packet_type: "Audio" (0) 0x0-0x0.7 (1)
|
|
0x000| d8 dd e6 ae 92 f7 23 3e 6f cc 0d 80 7a 00 00| ......#>o...z..| unknown0: raw bits 0x1-0x33.7 (51)
|
|
0x010|00 00 01 06 00 00 00 00 00 00 e0 b9 05 42 5c 27|.............B\'|
|
|
* |until 0x33.7 (end) (51) | |
|
|
| | | [6]: packet {} (vorbis_packet) 0x0-0x7f.7 (128)
|
|
0x000|3e |> | packet_type: "Audio" (0) 0x0-0x0.7 (1)
|
|
0x000| 37 dd 37 fe ee 85 47 7c 3c 61 02 9b 31 06 f6| 7.7...G|<a..1..| unknown0: raw bits 0x1-0x7f.7 (127)
|
|
0x010|bb ef 9f 04 62 46 41 04 c0 c0 00 00 f0 3d f4 1d|....bFA......=..|
|
|
* |until 0x7f.7 (end) (127) | |
|