2022-05-21 20:33:52 +03:00
|
|
|
$ fq -i -d mp3 . test.mp3
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> decode
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| headers[0:1]:
|
2021-09-04 13:54:26 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
0x020| ff fb 40| ..@| frames[0:3]:
|
2021-09-04 13:54:26 +03:00
|
|
|
0x030|c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
|
|
|
* |until 0x283.7 (end) (599) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | footers[0:0]:
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> decode("mp3")
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| headers[0:1]:
|
2021-09-04 13:54:26 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
0x020| ff fb 40| ..@| frames[0:3]:
|
2021-09-04 13:54:26 +03:00
|
|
|
0x030|c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
|
|
|
* |until 0x283.7 (end) (599) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | footers[0:0]:
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> decode("mp3"; {})
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| headers[0:1]:
|
2021-09-04 13:54:26 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
0x020| ff fb 40| ..@| frames[0:3]:
|
2021-09-04 13:54:26 +03:00
|
|
|
0x030|c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
|
|
|
* |until 0x283.7 (end) (599) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | footers[0:0]:
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> probe
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| headers[0:1]:
|
2021-09-04 13:54:26 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
0x020| ff fb 40| ..@| frames[0:3]:
|
2021-09-04 13:54:26 +03:00
|
|
|
0x030|c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
|
|
|
* |until 0x283.7 (end) (599) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | footers[0:0]:
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> probe({})
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| headers[0:1]:
|
2021-09-04 13:54:26 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
0x020| ff fb 40| ..@| frames[0:3]:
|
2021-09-04 13:54:26 +03:00
|
|
|
0x030|c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
|
|
|
* |until 0x283.7 (end) (599) | |
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | footers[0:0]:
|
2021-11-03 12:58:33 +03:00
|
|
|
mp3> format
|
|
|
|
"mp3"
|
|
|
|
mp3> null | format
|
|
|
|
null
|
2022-04-19 19:59:24 +03:00
|
|
|
mp3> path(.[])
|
|
|
|
[
|
|
|
|
"headers"
|
|
|
|
]
|
|
|
|
[
|
|
|
|
"frames"
|
|
|
|
]
|
|
|
|
[
|
|
|
|
"footers"
|
|
|
|
]
|
|
|
|
mp3> .[] = 1
|
|
|
|
{
|
|
|
|
"footers": 1,
|
|
|
|
"frames": 1,
|
|
|
|
"headers": 1
|
|
|
|
}
|
|
|
|
mp3> walk(tovalue) | .headers[0].magic
|
|
|
|
"ID3"
|
2021-09-04 13:54:26 +03:00
|
|
|
mp3> ^D
|
2022-11-20 21:22:16 +03:00
|
|
|
$ fq -d bytes 'png | d' test.mp3
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (png)
|
2021-11-05 17:04:26 +03:00
|
|
|
| | | error: png: RawLen(signature): failed at position 8 (read size 0 seek pos 0): failed to validate raw
|
2022-12-01 22:37:40 +03:00
|
|
|
0x000|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| gap0: raw bits
|
2021-11-05 17:04:26 +03:00
|
|
|
* |until 0x283.7 (end) (644) | |
|
2022-11-20 21:22:16 +03:00
|
|
|
$ fq -d bytes '.[0:1] | png | d' test.mp3
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (png)
|
2021-11-05 17:04:26 +03:00
|
|
|
| | | error: png: RawLen(signature): failed at position 0 (read size 0 seek pos 0): outside buffer
|
2022-12-01 22:37:40 +03:00
|
|
|
0x0|49 |I | gap0: raw bits
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -o force=true -d png d test.mp3
|
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: test.mp3 (png)
|
2022-02-05 19:16:10 +03:00
|
|
|
| | | error: png: BitBufRange: failed at position 0 (read size 2315363 seek pos 0): outside buffer
|
|
|
|
0x000|49 44 33 04 00 00 00 00 |ID3..... | signature: raw bits (invalid)
|
|
|
|
| | | chunks[0:1]:
|
2022-04-21 18:31:34 +03:00
|
|
|
| | | [0]{}: chunk
|
2022-02-05 19:16:10 +03:00
|
|
|
0x000| 00 23 54 53 | .#TS | length: 2315347
|
|
|
|
0x000| 53 45 00 00| SE..| type: "SE\x00\x00"
|
|
|
|
0x000| 53 | S | ancillary: true
|
|
|
|
0x000| 45 | E | private: false
|
|
|
|
0x000| 00 | . | reserved: false
|
|
|
|
0x000| 00| .| safe_to_copy: false
|
2022-12-01 22:37:40 +03:00
|
|
|
0x010|00 0f 00 00 03 4c 61 76 66 35 38 2e 34 35 2e 31|.....Lavf58.45.1| gap0: raw bits
|
2022-02-05 19:16:10 +03:00
|
|
|
* |until 0x283.7 (end) (628) | |
|
2022-11-20 21:22:16 +03:00
|
|
|
$ fq -d bytes '.[0:1] | try probe catch . | type' test.mp3
|
2021-11-01 19:35:37 +03:00
|
|
|
"array"
|
2022-11-20 21:22:16 +03:00
|
|
|
$ fq -d bytes 'png({force: true}) | d' test.mp3
|
2021-12-08 18:20:37 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (png)
|
2021-11-16 15:03:45 +03:00
|
|
|
| | | error: png: BitBufRange: failed at position 0 (read size 2315363 seek pos 0): outside buffer
|
|
|
|
0x000|49 44 33 04 00 00 00 00 |ID3..... | signature: raw bits (invalid)
|
2021-12-08 18:20:37 +03:00
|
|
|
| | | chunks[0:1]:
|
2022-04-21 18:31:34 +03:00
|
|
|
| | | [0]{}: chunk
|
2021-11-16 15:03:45 +03:00
|
|
|
0x000| 00 23 54 53 | .#TS | length: 2315347
|
|
|
|
0x000| 53 45 00 00| SE..| type: "SE\x00\x00"
|
|
|
|
0x000| 53 | S | ancillary: true
|
|
|
|
0x000| 45 | E | private: false
|
|
|
|
0x000| 00 | . | reserved: false
|
|
|
|
0x000| 00| .| safe_to_copy: false
|
2022-12-01 22:37:40 +03:00
|
|
|
0x010|00 0f 00 00 03 4c 61 76 66 35 38 2e 34 35 2e 31|.....Lavf58.45.1| gap0: raw bits
|
2021-11-16 15:03:45 +03:00
|
|
|
* |until 0x283.7 (end) (628) | |
|
2022-05-21 20:33:52 +03:00
|
|
|
$ fq -d bbb . test.mp3
|
2021-11-22 15:28:18 +03:00
|
|
|
exitcode: 4
|
|
|
|
stderr:
|
2022-05-21 20:33:52 +03:00
|
|
|
error: test.mp3: bbb: format group not found
|
2021-11-22 15:28:18 +03:00
|
|
|
$ fq -n '"aaa" | decode("aaa")'
|
|
|
|
exitcode: 5
|
|
|
|
stderr:
|
|
|
|
error: format group not found
|