2021-08-15 15:07:16 +03:00
|
|
|
$ fq -i -d mp3 . /test.mp3
|
|
|
|
mp3> .headers | ., tovalue, type, length?
|
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|.headers[0:1]:
|
|
|
|
0x00|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..| [0]{}: (id3v2)
|
2020-06-08 03:29:51 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2021-08-12 00:51:00 +03:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"flags": {
|
|
|
|
"experimental_indicator": false,
|
|
|
|
"extended_header": false,
|
|
|
|
"unsynchronisation": false,
|
|
|
|
"unused": 0
|
|
|
|
},
|
|
|
|
"frames": [
|
|
|
|
{
|
|
|
|
"flags": {
|
|
|
|
"compression": false,
|
|
|
|
"data_length_indicator": false,
|
|
|
|
"encryption": false,
|
|
|
|
"file_alter_preservation": false,
|
|
|
|
"grouping_identity": false,
|
|
|
|
"read_only": false,
|
|
|
|
"tag_alter_preservation": false,
|
|
|
|
"unsync": false,
|
|
|
|
"unused0": 0,
|
|
|
|
"unused1": 0,
|
|
|
|
"unused2": 0
|
|
|
|
},
|
|
|
|
"id": "TSSE",
|
|
|
|
"size": 15,
|
|
|
|
"text": "Lavf58.45.100",
|
2021-11-05 19:24:49 +03:00
|
|
|
"text_encoding": "UTF-8"
|
2021-08-12 00:51:00 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"magic": "ID3",
|
2021-11-05 17:04:26 +03:00
|
|
|
"padding": "<10>AAAAAAAAAAAAAA==",
|
2021-08-12 00:51:00 +03:00
|
|
|
"revision": 0,
|
|
|
|
"size": 35,
|
|
|
|
"version": 4
|
|
|
|
}
|
|
|
|
]
|
2020-06-08 03:29:51 +03:00
|
|
|
"array"
|
|
|
|
1
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0] | ., type, length?
|
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|.headers[0]{}: (id3v2)
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|49 44 33 |ID3 | magic: "ID3" (valid)
|
2020-06-08 03:29:51 +03:00
|
|
|
0x00| 04 | . | version: 4
|
|
|
|
0x00| 00 | . | revision: 0
|
2021-12-08 18:20:37 +03:00
|
|
|
0x00| 00 | . | flags{}:
|
2020-06-08 03:29:51 +03:00
|
|
|
0x00| 00 00 00 23 | ...# | size: 35
|
2021-12-08 18:20:37 +03:00
|
|
|
0x00| 54 53 53 45 00 00| TSSE..| frames[0:1]:
|
2020-06-08 03:29:51 +03:00
|
|
|
0x10|00 0f 00 00 03 4c 61 76 66 35 38 2e 34 35 2e 31|.....Lavf58.45.1|
|
|
|
|
0x20|30 30 00 |00. |
|
2021-11-05 17:04:26 +03:00
|
|
|
0x20| 00 00 00 00 00 00 00 00 00 00 | .......... | padding: raw bits (all zero)
|
2020-06-08 03:29:51 +03:00
|
|
|
"object"
|
|
|
|
7
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[-1000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[1000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[1:3] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[]
|
|
|
|
"array"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0:-1] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[]
|
|
|
|
"array"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[-1000:2000] | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"flags": {
|
|
|
|
"experimental_indicator": false,
|
|
|
|
"extended_header": false,
|
|
|
|
"unsynchronisation": false,
|
|
|
|
"unused": 0
|
|
|
|
},
|
|
|
|
"frames": [
|
|
|
|
{
|
|
|
|
"flags": {
|
|
|
|
"compression": false,
|
|
|
|
"data_length_indicator": false,
|
|
|
|
"encryption": false,
|
|
|
|
"file_alter_preservation": false,
|
|
|
|
"grouping_identity": false,
|
|
|
|
"read_only": false,
|
|
|
|
"tag_alter_preservation": false,
|
|
|
|
"unsync": false,
|
|
|
|
"unused0": 0,
|
|
|
|
"unused1": 0,
|
|
|
|
"unused2": 0
|
|
|
|
},
|
|
|
|
"id": "TSSE",
|
|
|
|
"size": 15,
|
|
|
|
"text": "Lavf58.45.100",
|
2021-11-05 19:24:49 +03:00
|
|
|
"text_encoding": "UTF-8"
|
2020-06-08 03:29:51 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"magic": "ID3",
|
2021-11-05 17:04:26 +03:00
|
|
|
"padding": "<10>AAAAAAAAAAAAAA==",
|
2020-06-08 03:29:51 +03:00
|
|
|
"revision": 0,
|
|
|
|
"size": 35,
|
|
|
|
"version": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
"array"
|
|
|
|
1
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers["test"] | ., type, length?
|
2021-08-12 00:51:00 +03:00
|
|
|
error: expected an object with key "test" but got: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> [.headers[]] | type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"array"
|
|
|
|
1
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | keys
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
0
|
|
|
|
]
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | has("a")
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot check whether array has a key: a
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | has(0)
|
2020-06-08 03:29:51 +03:00
|
|
|
true
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | type
|
2020-06-08 03:29:51 +03:00
|
|
|
"array"
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | tonumber
|
2020-06-08 03:29:51 +03:00
|
|
|
error: tonumber cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | tostring
|
2020-06-08 03:29:51 +03:00
|
|
|
error: tostring cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers + ""
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot add: array ([{"flags":{"experimental_ ...]) and string ("")
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers + 1
|
2020-06-08 03:29:51 +03:00
|
|
|
error: cannot add: array ([{"flags":{"experimental_ ...]) and number (1)
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._start | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
|
|
|
"number"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._stop | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
360
|
|
|
|
"number"
|
|
|
|
360
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._len | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
360
|
|
|
|
"number"
|
|
|
|
360
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._name | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
"headers"
|
|
|
|
"string"
|
|
|
|
7
|
2021-11-03 19:19:33 +03:00
|
|
|
mp3> .headers._sym | ., type, length?
|
2021-11-05 19:24:49 +03:00
|
|
|
null
|
|
|
|
"null"
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._description | ., type, length?
|
2021-11-19 13:44:23 +03:00
|
|
|
null
|
|
|
|
"null"
|
2020-06-08 03:29:51 +03:00
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._path | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
[
|
|
|
|
"headers"
|
|
|
|
]
|
|
|
|
"array"
|
|
|
|
1
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._bits | ., type, length?
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..|.: raw bits 0x0-0x2c.7 (45)
|
2021-10-05 23:26:05 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2022-02-08 20:44:48 +03:00
|
|
|
"binary"
|
2020-06-08 03:29:51 +03:00
|
|
|
360
|
2021-09-27 23:42:34 +03:00
|
|
|
mp3>
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._bytes | ., type, length?
|
2021-09-28 00:14:08 +03:00
|
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
2021-11-05 17:04:26 +03:00
|
|
|
0x00|49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00|ID3......#TSSE..|.: raw bits 0x0-0x2c.7 (45)
|
2021-10-05 23:26:05 +03:00
|
|
|
* |until 0x2c.7 (45) | |
|
2022-02-08 20:44:48 +03:00
|
|
|
"binary"
|
2020-06-08 03:29:51 +03:00
|
|
|
45
|
2021-09-27 23:42:34 +03:00
|
|
|
mp3>
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._error | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
null
|
|
|
|
"null"
|
|
|
|
0
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers._unknown | ., type, length?
|
2020-06-08 03:29:51 +03:00
|
|
|
false
|
|
|
|
"boolean"
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers.a = 1
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers[0] = 1
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers.a |= empty
|
|
|
|
error: expected an object with key "a" but got: array
|
|
|
|
mp3> .headers[0] |= empty
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | setpath(["a"]; 1)
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | setpath([0]; 1)
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | delpaths([["a"]])
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key a cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> .headers | delpaths([[0]])
|
2021-12-02 23:39:04 +03:00
|
|
|
error: update key 0 cannot be applied to: array
|
2021-08-15 15:07:16 +03:00
|
|
|
mp3> ^D
|