mirror of
https://github.com/wader/fq.git
synced 2024-12-27 15:42:07 +03:00
051a70bd4b
All other ranges and slicing uses exclusive end so i think it make sense to make it consistent. Update docs and add additional example for non-byte-aligned field. Also fixes issue showing zero bit ranges as start-NA.
49 lines
4.4 KiB
Plaintext
49 lines
4.4 KiB
Plaintext
# ffmpeg -y -f lavfi -i sine -t 10ms -ac 2 -metadata artist=bla -c:a libopus opus.ogg
|
|
# fq opus.ogg '.stream[0].packet[1] | tobits' > opus-tags
|
|
$ fq -d opus_packet dv opus-audio
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: opus-audio (opus_packet) 0x0-0x1b6 (438)
|
|
| | | type: "audio"
|
|
| | | toc{}: 0x0-0x1b6 (438)
|
|
| | | config{}: 0x0-0x0.5 (0.5)
|
|
0x000|fc |. | config: 31 0x0-0x0.5 (0.5)
|
|
| | | mode: "CELT-only"
|
|
| | | bandwidth: "FB"
|
|
| | | frame_size: 20
|
|
0x000|fc |. | stereo: true 0x0.5-0x0.6 (0.1)
|
|
| | | frames_per_packet{}: 0x0.6-0x1 (0.2)
|
|
0x000|fc |. | config: 0 0x0.6-0x1 (0.2)
|
|
| | | frames: 1
|
|
| | | mode: "1 frame"
|
|
0x000| 70 5b f3 71 54 45 4a c7 79 14 ea d1 59 61 85| p[.qTEJ.y...Ya.| data: raw bits 0x1-0x1b6 (437)
|
|
0x010|c8 c2 56 2c a6 b7 6e 98 00 9b 34 cb 23 1d 98 b7|..V,..n...4.#...|
|
|
* |until 0x1b5.7 (end) (437) | |
|
|
$ fq -d opus_packet dv opus-head
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: opus-head (opus_packet) 0x0-0x13 (19)
|
|
| | | type: "head"
|
|
0x00|4f 70 75 73 48 65 61 64 |OpusHead | prefix: "OpusHead" 0x0-0x8 (8)
|
|
0x00| 01 | . | version: 1 0x8-0x9 (1)
|
|
0x00| 02 | . | channel_count: 2 0x9-0xa (1)
|
|
0x00| 38 01 | 8. | pre_skip: 312 0xa-0xc (2)
|
|
0x00| 80 bb 00 00| ....| sample_rate: 48000 0xc-0x10 (4)
|
|
0x10|00 00 |.. | output_gain: 0 0x10-0x12 (2)
|
|
0x10| 00| | .| | map_family: 0 0x12-0x13 (1)
|
|
$ fq -d opus_packet dv opus-tags
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: opus-tags (opus_packet) 0x0-0x4c (76)
|
|
| | | type: "tags"
|
|
0x00|4f 70 75 73 54 61 67 73 |OpusTags | prefix: "OpusTags" 0x0-0x8 (8)
|
|
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| comment{}: (vorbis_comment) 0x8-0x4c (68)
|
|
0x00| 0d 00 00 00 | .... | vendor_length: 13 0x8-0xc (4)
|
|
0x00| 4c 61 76 66| Lavf| vendor: "Lavf58.45.100" 0xc-0x19 (13)
|
|
0x10|35 38 2e 34 35 2e 31 30 30 |58.45.100 |
|
|
0x10| 02 00 00 00 | .... | user_comment_list_length: 2 0x19-0x1d (4)
|
|
| | | user_comments[0:2]: 0x1d-0x4c (47)
|
|
| | | [0]{}: user_comment 0x1d-0x3e (33)
|
|
0x10| 1d 00 00| ...| length: 29 0x1d-0x21 (4)
|
|
0x20|00 |. |
|
|
0x20| 65 6e 63 6f 64 65 72 3d 4c 61 76 63 35 38 2e| encoder=Lavc58.| comment: "encoder=Lavc58.91.100 libopus" 0x21-0x3e (29)
|
|
0x30|39 31 2e 31 30 30 20 6c 69 62 6f 70 75 73 |91.100 libopus |
|
|
| | | [1]{}: user_comment 0x3e-0x4c (14)
|
|
0x30| 0a 00| ..| length: 10 0x3e-0x42 (4)
|
|
0x40|00 00 |.. |
|
|
0x40| 61 72 74 69 73 74 3d 62 6c 61| | artist=bla| | comment: "artist=bla" 0x42-0x4c (10)
|