1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 18:56:52 +03:00
fq/format/id3/testdata/apic.fqtest
Mattias Wadman 1b32b42f93 decode: Major decode API refactor
Generate more code
More generic and comfortable API
Improve and Update format decoder to new API
Add some more format tests
2021-11-15 21:12:07 +01:00

108 lines
11 KiB
Plaintext

# ffmpeg -f lavfi -i anullsrc=d=10ms -f lavfi -i testsrc=s=4x4:r=1:d=1 -map 0:0 -map 1:0 -f mp3 test.mp3
# fq test.mp3 '.. | select(format == "id3v2")._bytes' > apic
$ fq -d id3v2 verbose /apic
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.: {} /apic (id3v2) 0x0-0xb3.7 (180)
0x00|49 44 33 |ID3 | magic: "ID3" (valid) 0x0-0x2.7 (3)
0x00| 04 | . | version: 4 0x3-0x3.7 (1)
0x00| 00 | . | revision: 0 0x4-0x4.7 (1)
| | | flags: {} 0x5-0x5.7 (1)
0x00| 00 | . | unsynchronisation: false 0x5-0x5 (0.1)
0x00| 00 | . | extended_header: false 0x5.1-0x5.1 (0.1)
0x00| 00 | . | experimental_indicator: false 0x5.2-0x5.2 (0.1)
0x00| 00 | . | unused: 0 0x5.3-0x5.7 (0.5)
0x00| 00 00 01 2a | ...* | size: 170 0x6-0x9.7 (4)
| | | frames: [2] 0xa-0xa9.7 (160)
| | | [0]: frame {} 0xa-0x22.7 (25)
0x00| 54 53 53 45 | TSSE | id: "TSSE" (Software/Hardware and settings used for encoding) 0xa-0xd.7 (4)
0x00| 00 00| ..| size: 15 0xe-0x11.7 (4)
0x10|00 0f |.. |
| | | flags: {} 0x12-0x13.7 (2)
0x10| 00 | . | unused0: 0 0x12-0x12 (0.1)
0x10| 00 | . | tag_alter_preservation: false 0x12.1-0x12.1 (0.1)
0x10| 00 | . | file_alter_preservation: false 0x12.2-0x12.2 (0.1)
0x10| 00 | . | read_only: false 0x12.3-0x12.3 (0.1)
0x10| 00 00 | .. | unused1: 0 0x12.4-0x13 (0.5)
0x10| 00 | . | grouping_identity: false 0x13.1-0x13.1 (0.1)
0x10| 00 | . | unused2: 0 0x13.2-0x13.3 (0.2)
0x10| 00 | . | compression: false 0x13.4-0x13.4 (0.1)
0x10| 00 | . | encryption: false 0x13.5-0x13.5 (0.1)
0x10| 00 | . | unsync: false 0x13.6-0x13.6 (0.1)
0x10| 00 | . | data_length_indicator: false 0x13.7-0x13.7 (0.1)
0x10| 03 | . | text_encoding: "UTF-8" (3) 0x14-0x14.7 (1)
0x10| 4c 61 76 66 35 38 2e 37 36 2e 31| Lavf58.76.1| text: "Lavf58.76.100" 0x15-0x22.7 (14)
0x20|30 30 00 |00. |
| | | [1]: frame {} 0x23-0xa9.7 (135)
0x20| 41 50 49 43 | APIC | id: "APIC" (Attached picture) 0x23-0x26.7 (4)
0x20| 00 00 00 7d | ...} | size: 125 0x27-0x2a.7 (4)
| | | flags: {} 0x2b-0x2c.7 (2)
0x20| 00 | . | unused0: 0 0x2b-0x2b (0.1)
0x20| 00 | . | tag_alter_preservation: false 0x2b.1-0x2b.1 (0.1)
0x20| 00 | . | file_alter_preservation: false 0x2b.2-0x2b.2 (0.1)
0x20| 00 | . | read_only: false 0x2b.3-0x2b.3 (0.1)
0x20| 00 00 | .. | unused1: 0 0x2b.4-0x2c (0.5)
0x20| 00 | . | grouping_identity: false 0x2c.1-0x2c.1 (0.1)
0x20| 00 | . | unused2: 0 0x2c.2-0x2c.3 (0.2)
0x20| 00 | . | compression: false 0x2c.4-0x2c.4 (0.1)
0x20| 00 | . | encryption: false 0x2c.5-0x2c.5 (0.1)
0x20| 00 | . | unsync: false 0x2c.6-0x2c.6 (0.1)
0x20| 00 | . | data_length_indicator: false 0x2c.7-0x2c.7 (0.1)
0x20| 03 | . | text_encoding: "UTF-8" (3) 0x2d-0x2d.7 (1)
0x20| 69 6d| im| mime_type: "image/png" 0x2e-0x37.7 (10)
0x30|61 67 65 2f 70 6e 67 00 |age/png. |
0x30| 00 | . | picture_type: 0 0x38-0x38.7 (1)
0x30| 00 | . | description: "" 0x39-0x39.7 (1)
| | | picture: {} (png) 0x3a-0xa9.7 (112)
0x30| 89 50 4e 47 0d 0a| .PNG..| signature: raw bits (valid) 0x3a-0x41.7 (8)
0x40|1a 0a |.. |
| | | chunks: [4] 0x42-0xa9.7 (104)
| | | [0]: chunk {} 0x42-0x5a.7 (25)
0x40| 00 00 00 0d | .... | length: 13 0x42-0x45.7 (4)
0x40| 49 48 44 52 | IHDR | type: "IHDR" 0x46-0x49.7 (4)
0x40| 49 | I | ancillary: false 0x46.3-0x46.3 (0.1)
0x40| 48 | H | private: false 0x47.3-0x47.3 (0.1)
0x40| 44 | D | reserved: false 0x48.3-0x48.3 (0.1)
0x40| 52 | R | safe_to_copy: true 0x49.3-0x49.3 (0.1)
0x40| 00 00 00 04 | .... | width: 4 0x4a-0x4d.7 (4)
0x40| 00 00| ..| height: 4 0x4e-0x51.7 (4)
0x50|00 04 |.. |
0x50| 08 | . | bit_depth: 8 0x52-0x52.7 (1)
0x50| 02 | . | color_type: 2 0x53-0x53.7 (1)
0x50| 00 | . | compression_method: "deflate" (0) 0x54-0x54.7 (1)
0x50| 00 | . | filter_method: "Adaptive filtering" (0) 0x55-0x55.7 (1)
0x50| 00 | . | interlace_method: "No interlace" (0) 0x56-0x56.7 (1)
0x50| 26 93 09 29 | &..) | crc: "26930929" (raw bits) (valid) 0x57-0x5a.7 (4)
| | | [1]: chunk {} 0x5b-0x6f.7 (21)
0x50| 00 00 00 09 | .... | length: 9 0x5b-0x5e.7 (4)
0x50| 70| p| type: "pHYs" 0x5f-0x62.7 (4)
0x60|48 59 73 |HYs |
0x50| 70| p| ancillary: true 0x5f.3-0x5f.3 (0.1)
0x60|48 |H | private: false 0x60.3-0x60.3 (0.1)
0x60| 59 | Y | reserved: true 0x61.3-0x61.3 (0.1)
0x60| 73 | s | safe_to_copy: true 0x62.3-0x62.3 (0.1)
0x60| 00 00 00 01 | .... | x_pixels_per_unit: 1 0x63-0x66.7 (4)
0x60| 00 00 00 01 | .... | y_pixels_per_unit: 1 0x67-0x6a.7 (4)
0x60| 00 | . | unit: 0 0x6b-0x6b.7 (1)
0x60| 4f 25 c4 d6| O%..| crc: "4f25c4d6" (raw bits) (valid) 0x6c-0x6f.7 (4)
| | | [2]: chunk {} 0x70-0x9d.7 (46)
0x70|00 00 00 22 |..." | length: 34 0x70-0x73.7 (4)
0x70| 49 44 41 54 | IDAT | type: "IDAT" 0x74-0x77.7 (4)
0x70| 49 | I | ancillary: false 0x74.3-0x74.3 (0.1)
0x70| 44 | D | private: false 0x75.3-0x75.3 (0.1)
0x70| 41 | A | reserved: false 0x76.3-0x76.3 (0.1)
0x70| 54 | T | safe_to_copy: true 0x77.3-0x77.3 (0.1)
0x70| 78 9c 63 60 60 60 f8 0f| x.c```..| data: raw bits 0x78-0x99.7 (34)
0x80|c6 ff 41 14 88 05 64 fc 87 08 22 71 80 44 3d 88|..A...d..."q.D=.|
0x90|f1 bf 81 e1 3f 00 c8 76 13 ed |....?..v.. |
0x90| 2f 76 8a 2a | /v.* | crc: "2f768a2a" (raw bits) (valid) 0x9a-0x9d.7 (4)
| | | [3]: chunk {} 0x9e-0xa9.7 (12)
0x90| 00 00| ..| length: 0 0x9e-0xa1.7 (4)
0xa0|00 00 |.. |
0xa0| 49 45 4e 44 | IEND | type: "IEND" 0xa2-0xa5.7 (4)
0xa0| 49 | I | ancillary: false 0xa2.3-0xa2.3 (0.1)
0xa0| 45 | E | private: false 0xa3.3-0xa3.3 (0.1)
0xa0| 4e | N | reserved: false 0xa4.3-0xa4.3 (0.1)
0xa0| 44 | D | safe_to_copy: false 0xa5.3-0xa5.3 (0.1)
0xa0| ae 42 60 82 | .B`. | crc: "ae426082" (raw bits) (valid) 0xa6-0xa9.7 (4)
0xa0| 00 00 00 00 00 00| ......| padding: raw bits (all zero) 0xaa-0xb3.7 (10)
0xb0|00 00 00 00| |....| |