mirror of
https://github.com/wader/fq.git
synced 2024-11-26 21:55:57 +03:00
mp3_frame_tags: Refactor and rename xing format to mp3_frame_tags
Make more sense to use a more general name when there is both info and xing and possibly vbri in the future. Also both xing and info seems to have extension fields Remove some old tests that are not really needed anymore.
This commit is contained in:
parent
2606e7ba46
commit
c3a0686c9e
@ -96,6 +96,7 @@ macho_fat,
|
||||
[matroska](doc/formats.md#matroska),
|
||||
[mp3](doc/formats.md#mp3),
|
||||
mp3_frame,
|
||||
mp3_frame_tags,
|
||||
[mp4](doc/formats.md#mp4),
|
||||
mpeg_asc,
|
||||
mpeg_es,
|
||||
@ -132,7 +133,6 @@ vpx_ccr,
|
||||
[wasm](doc/formats.md#wasm),
|
||||
wav,
|
||||
webp,
|
||||
xing,
|
||||
[xml](doc/formats.md#xml),
|
||||
yaml,
|
||||
[zip](doc/formats.md#zip)
|
||||
|
@ -71,7 +71,8 @@
|
||||
|[`markdown`](#markdown) |Markdown |<sub></sub>|
|
||||
|[`matroska`](#matroska) |Matroska file |<sub>`aac_frame` `av1_ccr` `av1_frame` `avc_au` `avc_dcr` `flac_frame` `flac_metadatablocks` `hevc_au` `hevc_dcr` `image` `mp3_frame` `mpeg_asc` `mpeg_pes_packet` `mpeg_spu` `opus_packet` `vorbis_packet` `vp8_frame` `vp9_cfm` `vp9_frame`</sub>|
|
||||
|[`mp3`](#mp3) |MP3 file |<sub>`id3v2` `id3v1` `id3v11` `apev2` `mp3_frame`</sub>|
|
||||
|`mp3_frame` |MPEG audio layer 3 frame |<sub>`xing`</sub>|
|
||||
|`mp3_frame` |MPEG audio layer 3 frame |<sub>`mp3_frame_tags`</sub>|
|
||||
|`mp3_frame_tags` |MP3 frame info/xing tags |<sub></sub>|
|
||||
|[`mp4`](#mp4) |ISOBMFF, QuickTime and similar |<sub>`aac_frame` `av1_ccr` `av1_frame` `avc_au` `avc_dcr` `flac_frame` `flac_metadatablocks` `hevc_au` `hevc_dcr` `icc_profile` `id3v2` `image` `jpeg` `mp3_frame` `mpeg_es` `mpeg_pes_packet` `opus_packet` `prores_frame` `protobuf_widevine` `pssh_playready` `vorbis_packet` `vp9_frame` `vpx_ccr`</sub>|
|
||||
|`mpeg_asc` |MPEG-4 Audio Specific Config |<sub></sub>|
|
||||
|`mpeg_es` |MPEG Elementary Stream |<sub>`mpeg_asc` `vorbis_packet`</sub>|
|
||||
@ -108,7 +109,6 @@
|
||||
|[`wasm`](#wasm) |WebAssembly Binary Format |<sub></sub>|
|
||||
|`wav` |WAV file |<sub>`id3v2` `id3v1` `id3v11`</sub>|
|
||||
|`webp` |WebP image |<sub>`vp8_frame`</sub>|
|
||||
|`xing` |Xing header |<sub></sub>|
|
||||
|[`xml`](#xml) |Extensible Markup Language |<sub></sub>|
|
||||
|`yaml` |YAML Ain't Markup Language |<sub></sub>|
|
||||
|[`zip`](#zip) |ZIP archive |<sub>`probe`</sub>|
|
||||
|
1256
doc/formats.svg
1256
doc/formats.svg
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 134 KiB |
@ -102,6 +102,7 @@ markdown Markdown
|
||||
matroska Matroska file
|
||||
mp3 MP3 file
|
||||
mp3_frame MPEG audio layer 3 frame
|
||||
mp3_frame_tags MP3 frame info/xing tags
|
||||
mp4 ISOBMFF, QuickTime and similar
|
||||
mpeg_asc MPEG-4 Audio Specific Config
|
||||
mpeg_es MPEG Elementary Stream
|
||||
@ -138,7 +139,6 @@ vpx_ccr VPX Codec Configuration Record
|
||||
wasm WebAssembly Binary Format
|
||||
wav WAV file
|
||||
webp WebP image
|
||||
xing Xing header
|
||||
xml Extensible Markup Language
|
||||
yaml YAML Ain't Markup Language
|
||||
zip ZIP archive
|
||||
|
@ -91,6 +91,7 @@ const (
|
||||
MATROSKA = "matroska"
|
||||
MP3 = "mp3"
|
||||
MP3_FRAME = "mp3_frame"
|
||||
MP3_FRAME_TAGS = "mp3_frame_tags"
|
||||
MP4 = "mp4"
|
||||
MPEG_ASC = "mpeg_asc"
|
||||
MPEG_ES = "mpeg_es"
|
||||
@ -127,7 +128,6 @@ const (
|
||||
WASM = "wasm"
|
||||
WAV = "wav"
|
||||
WEBP = "webp"
|
||||
XING = "xing"
|
||||
XML = "xml"
|
||||
YAML = "yaml"
|
||||
ZIP = "zip"
|
||||
|
78
format/mp3/mp3_tags.go
Normal file
78
format/mp3/mp3_tags.go
Normal file
@ -0,0 +1,78 @@
|
||||
package mp3
|
||||
|
||||
// https://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header
|
||||
// http://gabriel.mp3-tech.org/mp3infotag.html
|
||||
// https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/mp3dec.c
|
||||
|
||||
import (
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
)
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(decode.Format{
|
||||
Name: format.MP3_FRAME_TAGS,
|
||||
Description: "MP3 frame info/xing tags",
|
||||
DecodeFn: mp3FrameTagsDecode,
|
||||
})
|
||||
}
|
||||
|
||||
func mp3FrameTagsDecode(d *decode.D, _ any) any {
|
||||
switch d.FieldUTF8("header", 4) {
|
||||
case "Xing":
|
||||
case "Info":
|
||||
default:
|
||||
d.Errorf("no xing or info header found")
|
||||
}
|
||||
|
||||
qualityPresent := false
|
||||
tocPresent := false
|
||||
bytesPresent := false
|
||||
framesPresent := false
|
||||
d.FieldStruct("present_flags", func(d *decode.D) {
|
||||
d.FieldU("unused", 28)
|
||||
qualityPresent = d.FieldBool("quality")
|
||||
tocPresent = d.FieldBool("toc")
|
||||
bytesPresent = d.FieldBool("bytes")
|
||||
framesPresent = d.FieldBool("frames")
|
||||
})
|
||||
|
||||
if framesPresent {
|
||||
d.FieldU32BE("frames")
|
||||
}
|
||||
if bytesPresent {
|
||||
d.FieldU32BE("bytes")
|
||||
}
|
||||
if tocPresent {
|
||||
d.FieldArray("toc", func(d *decode.D) {
|
||||
for i := 0; i < 100; i++ {
|
||||
d.FieldU8("entry")
|
||||
}
|
||||
})
|
||||
}
|
||||
if qualityPresent {
|
||||
d.FieldU32BE("quality")
|
||||
}
|
||||
|
||||
d.FieldUTF8("encoder", 9)
|
||||
d.FieldU4("tag_revision")
|
||||
d.FieldU4("vbr_method")
|
||||
d.FieldU8("lowpass_filter") // TODO: /100
|
||||
d.FieldU32("replay_gain_peak")
|
||||
d.FieldU16("radio_replay_gain")
|
||||
d.FieldU16("audiophile_replay_gain")
|
||||
d.FieldU4("lame_flags")
|
||||
d.FieldU4("lame_ath_type")
|
||||
d.FieldU8("abr_vbr") // TODO:
|
||||
d.FieldU12("encoder_delay") // TODO:
|
||||
d.FieldU12("encoder_padding") // TODO:
|
||||
d.FieldU8("misc") // TODO:
|
||||
d.FieldU8("mp3_gain") // TODO:
|
||||
d.FieldU16("preset") // TODO:
|
||||
d.FieldU32("length")
|
||||
d.FieldU16("music_crc") // TODO:
|
||||
d.FieldU16("tag_crc") // TODO:
|
||||
|
||||
return nil
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
# ffmpeg -y -f lavfi -i sine -ac 2 -t 10ms -f mp3 temp.mp3 && fq temp.mp3 '.frame[0].xing | tobits' > xing
|
||||
$ fq -d xing dv xing
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: xing (xing) 0x0-0x9b.7 (156)
|
||||
# ffmpeg -y -f lavfi -i sine -ac 2 -t 10ms -f mp3 temp.mp3 && fq temp.mp3 '.frames[0].tags | tobits' > mp3_frame_tags_info
|
||||
$ fq -d mp3_frame_tags dv mp3_frame_tags_info
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: mp3_frame_tags_info (mp3_frame_tags) 0x0-0x9b.7 (156)
|
||||
0x00|49 6e 66 6f |Info | header: "Info" 0x0-0x3.7 (4)
|
||||
| | | present_flags{}: 0x4-0x7.7 (4)
|
||||
0x00| 00 00 00 0f | .... | unused: 0 0x4-0x7.3 (3.4)
|
||||
@ -112,23 +112,22 @@ $ fq -d xing dv xing
|
||||
0x70| ff | . | [98]: 255 entry 0x72-0x72.7 (1)
|
||||
0x70| ff | . | [99]: 255 entry 0x73-0x73.7 (1)
|
||||
0x70| 00 00 00 00 | .... | quality: 0 0x74-0x77.7 (4)
|
||||
| | | lame_extension{}: 0x78-0x9b.7 (36)
|
||||
0x70| 4c 61 76 63 35 38 2e 39| Lavc58.9| encoder: "Lavc58.91" 0x78-0x80.7 (9)
|
||||
0x70| 4c 61 76 63 35 38 2e 39| Lavc58.9| encoder: "Lavc58.91" 0x78-0x80.7 (9)
|
||||
0x80|31 |1 |
|
||||
0x80| 00 | . | tag_revision: 0 0x81-0x81.3 (0.4)
|
||||
0x80| 00 | . | vbr_method: 0 0x81.4-0x81.7 (0.4)
|
||||
0x80| 00 | . | lowpass_filter: 0 0x82-0x82.7 (1)
|
||||
0x80| 00 00 00 00 | .... | replay_gain_peak: 0 0x83-0x86.7 (4)
|
||||
0x80| 00 00 | .. | radio_replay_gain: 0 0x87-0x88.7 (2)
|
||||
0x80| 00 00 | .. | audiophile_replay_gain: 0 0x89-0x8a.7 (2)
|
||||
0x80| 00 | . | lame_flags: 0 0x8b-0x8b.3 (0.4)
|
||||
0x80| 00 | . | lame_ath_type: 0 0x8b.4-0x8b.7 (0.4)
|
||||
0x80| 00 | . | abr_vbr: 0 0x8c-0x8c.7 (1)
|
||||
0x80| 24 05 | $. | encoder_delay: 576 0x8d-0x8e.3 (1.4)
|
||||
0x80| 05 07| ..| encoder_padding: 1287 0x8e.4-0x8f.7 (1.4)
|
||||
0x90|00 |. | misc: 0 0x90-0x90.7 (1)
|
||||
0x90| 00 | . | mp3_gain: 0 0x91-0x91.7 (1)
|
||||
0x90| 00 00 | .. | preset: 0 0x92-0x93.7 (2)
|
||||
0x90| 00 00 04 13 | .... | length: 1043 0x94-0x97.7 (4)
|
||||
0x90| c2 aa | .. | music_crc: 49834 0x98-0x99.7 (2)
|
||||
0x90| 92 0f| | ..| | tag_crc: 37391 0x9a-0x9b.7 (2)
|
||||
0x80| 00 | . | tag_revision: 0 0x81-0x81.3 (0.4)
|
||||
0x80| 00 | . | vbr_method: 0 0x81.4-0x81.7 (0.4)
|
||||
0x80| 00 | . | lowpass_filter: 0 0x82-0x82.7 (1)
|
||||
0x80| 00 00 00 00 | .... | replay_gain_peak: 0 0x83-0x86.7 (4)
|
||||
0x80| 00 00 | .. | radio_replay_gain: 0 0x87-0x88.7 (2)
|
||||
0x80| 00 00 | .. | audiophile_replay_gain: 0 0x89-0x8a.7 (2)
|
||||
0x80| 00 | . | lame_flags: 0 0x8b-0x8b.3 (0.4)
|
||||
0x80| 00 | . | lame_ath_type: 0 0x8b.4-0x8b.7 (0.4)
|
||||
0x80| 00 | . | abr_vbr: 0 0x8c-0x8c.7 (1)
|
||||
0x80| 24 05 | $. | encoder_delay: 576 0x8d-0x8e.3 (1.4)
|
||||
0x80| 05 07| ..| encoder_padding: 1287 0x8e.4-0x8f.7 (1.4)
|
||||
0x90|00 |. | misc: 0 0x90-0x90.7 (1)
|
||||
0x90| 00 | . | mp3_gain: 0 0x91-0x91.7 (1)
|
||||
0x90| 00 00 | .. | preset: 0 0x92-0x93.7 (2)
|
||||
0x90| 00 00 04 13 | .... | length: 1043 0x94-0x97.7 (4)
|
||||
0x90| c2 aa | .. | music_crc: 49834 0x98-0x99.7 (2)
|
||||
0x90| 92 0f| | ..| | tag_crc: 37391 0x9a-0x9b.7 (2)
|
BIN
format/mp3/testdata/mp3_frame_tags_xing
vendored
Normal file
BIN
format/mp3/testdata/mp3_frame_tags_xing
vendored
Normal file
Binary file not shown.
133
format/mp3/testdata/mp3_frame_tags_xing.fqtest
vendored
Normal file
133
format/mp3/testdata/mp3_frame_tags_xing.fqtest
vendored
Normal file
@ -0,0 +1,133 @@
|
||||
# ffmpeg -y -f lavfi -i sine -ac 2 -t 10ms -qscale:a 2 -f mp3 temp.mp3 && fq temp.mp3 '.frames[0].tags | tobits' > mp3_frame_tags_xing
|
||||
$ fq -d mp3_frame_tags dv mp3_frame_tags_xing
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: mp3_frame_tags_xing (mp3_frame_tags) 0x0-0x9b.7 (156)
|
||||
0x00|58 69 6e 67 |Xing | header: "Xing" 0x0-0x3.7 (4)
|
||||
| | | present_flags{}: 0x4-0x7.7 (4)
|
||||
0x00| 00 00 00 0f | .... | unused: 0 0x4-0x7.3 (3.4)
|
||||
0x00| 0f | . | quality: true 0x7.4-0x7.4 (0.1)
|
||||
0x00| 0f | . | toc: true 0x7.5-0x7.5 (0.1)
|
||||
0x00| 0f | . | bytes: true 0x7.6-0x7.6 (0.1)
|
||||
0x00| 0f | . | frames: true 0x7.7-0x7.7 (0.1)
|
||||
0x00| 00 00 00 02 | .... | frames: 2 0x8-0xb.7 (4)
|
||||
0x00| 00 00 05 18| ....| bytes: 1304 0xc-0xf.7 (4)
|
||||
| | | toc[0:100]: 0x10-0x73.7 (100)
|
||||
0x10|00 |. | [0]: 0 entry 0x10-0x10.7 (1)
|
||||
0x10| cc | . | [1]: 204 entry 0x11-0x11.7 (1)
|
||||
0x10| cc | . | [2]: 204 entry 0x12-0x12.7 (1)
|
||||
0x10| cc | . | [3]: 204 entry 0x13-0x13.7 (1)
|
||||
0x10| cc | . | [4]: 204 entry 0x14-0x14.7 (1)
|
||||
0x10| cc | . | [5]: 204 entry 0x15-0x15.7 (1)
|
||||
0x10| cc | . | [6]: 204 entry 0x16-0x16.7 (1)
|
||||
0x10| cc | . | [7]: 204 entry 0x17-0x17.7 (1)
|
||||
0x10| cc | . | [8]: 204 entry 0x18-0x18.7 (1)
|
||||
0x10| cc | . | [9]: 204 entry 0x19-0x19.7 (1)
|
||||
0x10| cc | . | [10]: 204 entry 0x1a-0x1a.7 (1)
|
||||
0x10| cc | . | [11]: 204 entry 0x1b-0x1b.7 (1)
|
||||
0x10| cc | . | [12]: 204 entry 0x1c-0x1c.7 (1)
|
||||
0x10| cc | . | [13]: 204 entry 0x1d-0x1d.7 (1)
|
||||
0x10| cc | . | [14]: 204 entry 0x1e-0x1e.7 (1)
|
||||
0x10| cc| .| [15]: 204 entry 0x1f-0x1f.7 (1)
|
||||
0x20|cc |. | [16]: 204 entry 0x20-0x20.7 (1)
|
||||
0x20| cc | . | [17]: 204 entry 0x21-0x21.7 (1)
|
||||
0x20| cc | . | [18]: 204 entry 0x22-0x22.7 (1)
|
||||
0x20| cc | . | [19]: 204 entry 0x23-0x23.7 (1)
|
||||
0x20| cc | . | [20]: 204 entry 0x24-0x24.7 (1)
|
||||
0x20| cc | . | [21]: 204 entry 0x25-0x25.7 (1)
|
||||
0x20| cc | . | [22]: 204 entry 0x26-0x26.7 (1)
|
||||
0x20| cc | . | [23]: 204 entry 0x27-0x27.7 (1)
|
||||
0x20| cc | . | [24]: 204 entry 0x28-0x28.7 (1)
|
||||
0x20| cc | . | [25]: 204 entry 0x29-0x29.7 (1)
|
||||
0x20| cc | . | [26]: 204 entry 0x2a-0x2a.7 (1)
|
||||
0x20| cc | . | [27]: 204 entry 0x2b-0x2b.7 (1)
|
||||
0x20| cc | . | [28]: 204 entry 0x2c-0x2c.7 (1)
|
||||
0x20| cc | . | [29]: 204 entry 0x2d-0x2d.7 (1)
|
||||
0x20| cc | . | [30]: 204 entry 0x2e-0x2e.7 (1)
|
||||
0x20| cc| .| [31]: 204 entry 0x2f-0x2f.7 (1)
|
||||
0x30|cc |. | [32]: 204 entry 0x30-0x30.7 (1)
|
||||
0x30| cc | . | [33]: 204 entry 0x31-0x31.7 (1)
|
||||
0x30| cc | . | [34]: 204 entry 0x32-0x32.7 (1)
|
||||
0x30| cc | . | [35]: 204 entry 0x33-0x33.7 (1)
|
||||
0x30| cc | . | [36]: 204 entry 0x34-0x34.7 (1)
|
||||
0x30| cc | . | [37]: 204 entry 0x35-0x35.7 (1)
|
||||
0x30| cc | . | [38]: 204 entry 0x36-0x36.7 (1)
|
||||
0x30| cc | . | [39]: 204 entry 0x37-0x37.7 (1)
|
||||
0x30| cc | . | [40]: 204 entry 0x38-0x38.7 (1)
|
||||
0x30| cc | . | [41]: 204 entry 0x39-0x39.7 (1)
|
||||
0x30| cc | . | [42]: 204 entry 0x3a-0x3a.7 (1)
|
||||
0x30| cc | . | [43]: 204 entry 0x3b-0x3b.7 (1)
|
||||
0x30| cc | . | [44]: 204 entry 0x3c-0x3c.7 (1)
|
||||
0x30| cc | . | [45]: 204 entry 0x3d-0x3d.7 (1)
|
||||
0x30| cc | . | [46]: 204 entry 0x3e-0x3e.7 (1)
|
||||
0x30| cc| .| [47]: 204 entry 0x3f-0x3f.7 (1)
|
||||
0x40|cc |. | [48]: 204 entry 0x40-0x40.7 (1)
|
||||
0x40| cc | . | [49]: 204 entry 0x41-0x41.7 (1)
|
||||
0x40| ff | . | [50]: 255 entry 0x42-0x42.7 (1)
|
||||
0x40| ff | . | [51]: 255 entry 0x43-0x43.7 (1)
|
||||
0x40| ff | . | [52]: 255 entry 0x44-0x44.7 (1)
|
||||
0x40| ff | . | [53]: 255 entry 0x45-0x45.7 (1)
|
||||
0x40| ff | . | [54]: 255 entry 0x46-0x46.7 (1)
|
||||
0x40| ff | . | [55]: 255 entry 0x47-0x47.7 (1)
|
||||
0x40| ff | . | [56]: 255 entry 0x48-0x48.7 (1)
|
||||
0x40| ff | . | [57]: 255 entry 0x49-0x49.7 (1)
|
||||
0x40| ff | . | [58]: 255 entry 0x4a-0x4a.7 (1)
|
||||
0x40| ff | . | [59]: 255 entry 0x4b-0x4b.7 (1)
|
||||
0x40| ff | . | [60]: 255 entry 0x4c-0x4c.7 (1)
|
||||
0x40| ff | . | [61]: 255 entry 0x4d-0x4d.7 (1)
|
||||
0x40| ff | . | [62]: 255 entry 0x4e-0x4e.7 (1)
|
||||
0x40| ff| .| [63]: 255 entry 0x4f-0x4f.7 (1)
|
||||
0x50|ff |. | [64]: 255 entry 0x50-0x50.7 (1)
|
||||
0x50| ff | . | [65]: 255 entry 0x51-0x51.7 (1)
|
||||
0x50| ff | . | [66]: 255 entry 0x52-0x52.7 (1)
|
||||
0x50| ff | . | [67]: 255 entry 0x53-0x53.7 (1)
|
||||
0x50| ff | . | [68]: 255 entry 0x54-0x54.7 (1)
|
||||
0x50| ff | . | [69]: 255 entry 0x55-0x55.7 (1)
|
||||
0x50| ff | . | [70]: 255 entry 0x56-0x56.7 (1)
|
||||
0x50| ff | . | [71]: 255 entry 0x57-0x57.7 (1)
|
||||
0x50| ff | . | [72]: 255 entry 0x58-0x58.7 (1)
|
||||
0x50| ff | . | [73]: 255 entry 0x59-0x59.7 (1)
|
||||
0x50| ff | . | [74]: 255 entry 0x5a-0x5a.7 (1)
|
||||
0x50| ff | . | [75]: 255 entry 0x5b-0x5b.7 (1)
|
||||
0x50| ff | . | [76]: 255 entry 0x5c-0x5c.7 (1)
|
||||
0x50| ff | . | [77]: 255 entry 0x5d-0x5d.7 (1)
|
||||
0x50| ff | . | [78]: 255 entry 0x5e-0x5e.7 (1)
|
||||
0x50| ff| .| [79]: 255 entry 0x5f-0x5f.7 (1)
|
||||
0x60|ff |. | [80]: 255 entry 0x60-0x60.7 (1)
|
||||
0x60| ff | . | [81]: 255 entry 0x61-0x61.7 (1)
|
||||
0x60| ff | . | [82]: 255 entry 0x62-0x62.7 (1)
|
||||
0x60| ff | . | [83]: 255 entry 0x63-0x63.7 (1)
|
||||
0x60| ff | . | [84]: 255 entry 0x64-0x64.7 (1)
|
||||
0x60| ff | . | [85]: 255 entry 0x65-0x65.7 (1)
|
||||
0x60| ff | . | [86]: 255 entry 0x66-0x66.7 (1)
|
||||
0x60| ff | . | [87]: 255 entry 0x67-0x67.7 (1)
|
||||
0x60| ff | . | [88]: 255 entry 0x68-0x68.7 (1)
|
||||
0x60| ff | . | [89]: 255 entry 0x69-0x69.7 (1)
|
||||
0x60| ff | . | [90]: 255 entry 0x6a-0x6a.7 (1)
|
||||
0x60| ff | . | [91]: 255 entry 0x6b-0x6b.7 (1)
|
||||
0x60| ff | . | [92]: 255 entry 0x6c-0x6c.7 (1)
|
||||
0x60| ff | . | [93]: 255 entry 0x6d-0x6d.7 (1)
|
||||
0x60| ff | . | [94]: 255 entry 0x6e-0x6e.7 (1)
|
||||
0x60| ff| .| [95]: 255 entry 0x6f-0x6f.7 (1)
|
||||
0x70|ff |. | [96]: 255 entry 0x70-0x70.7 (1)
|
||||
0x70| ff | . | [97]: 255 entry 0x71-0x71.7 (1)
|
||||
0x70| ff | . | [98]: 255 entry 0x72-0x72.7 (1)
|
||||
0x70| ff | . | [99]: 255 entry 0x73-0x73.7 (1)
|
||||
0x70| 00 00 00 00 | .... | quality: 0 0x74-0x77.7 (4)
|
||||
0x70| 4c 61 76 63 35 39 2e 33| Lavc59.3| encoder: "Lavc59.37" 0x78-0x80.7 (9)
|
||||
0x80|37 |7 |
|
||||
0x80| 00 | . | tag_revision: 0 0x81-0x81.3 (0.4)
|
||||
0x80| 00 | . | vbr_method: 0 0x81.4-0x81.7 (0.4)
|
||||
0x80| 00 | . | lowpass_filter: 0 0x82-0x82.7 (1)
|
||||
0x80| 00 00 00 00 | .... | replay_gain_peak: 0 0x83-0x86.7 (4)
|
||||
0x80| 00 00 | .. | radio_replay_gain: 0 0x87-0x88.7 (2)
|
||||
0x80| 00 00 | .. | audiophile_replay_gain: 0 0x89-0x8a.7 (2)
|
||||
0x80| 00 | . | lame_flags: 0 0x8b-0x8b.3 (0.4)
|
||||
0x80| 00 | . | lame_ath_type: 0 0x8b.4-0x8b.7 (0.4)
|
||||
0x80| 00 | . | abr_vbr: 0 0x8c-0x8c.7 (1)
|
||||
0x80| 24 05 | $. | encoder_delay: 576 0x8d-0x8e.3 (1.4)
|
||||
0x80| 05 07| ..| encoder_padding: 1287 0x8e.4-0x8f.7 (1.4)
|
||||
0x90|00 |. | misc: 0 0x90-0x90.7 (1)
|
||||
0x90| 00 | . | mp3_gain: 0 0x91-0x91.7 (1)
|
||||
0x90| 00 00 | .. | preset: 0 0x92-0x93.7 (2)
|
||||
0x90| 00 00 05 18 | .... | length: 1304 0x94-0x97.7 (4)
|
||||
0x90| 43 2e | C. | music_crc: 17198 0x98-0x99.7 (2)
|
||||
0x90| 2f 6c| | /l| | tag_crc: 12140 0x9a-0x9b.7 (2)
|
476
format/mp3/testdata/test.fqtest
vendored
476
format/mp3/testdata/test.fqtest
vendored
@ -1,476 +0,0 @@
|
||||
# ffmpeg -f lavfi -i sine -ac 2 -t 10ms -metadata title=test -write_xing 1 -write_id3v1 1 -f mp3 test.mp3
|
||||
$ fq -d mp3 '.headers[0].magic | verbose' test.mp3
|
||||
exitcode: 3
|
||||
stderr:
|
||||
error: arg: function not defined: verbose/0
|
||||
$ fq -d mp3 dv test.mp3
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: test.mp3 (mp3) 0x0-0x4cf.7 (1232)
|
||||
| | | headers[0:1]: 0x0-0x3c.7 (61)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: header (id3v2) 0x0-0x3c.7 (61)
|
||||
0x000|49 44 33 |ID3 | magic: "ID3" (valid) 0x0-0x2.7 (3)
|
||||
0x000| 04 | . | version: 4 0x3-0x3.7 (1)
|
||||
0x000| 00 | . | revision: 0 0x4-0x4.7 (1)
|
||||
| | | flags{}: 0x5-0x5.7 (1)
|
||||
0x000| 00 | . | unsynchronisation: false 0x5-0x5 (0.1)
|
||||
0x000| 00 | . | extended_header: false 0x5.1-0x5.1 (0.1)
|
||||
0x000| 00 | . | experimental_indicator: false 0x5.2-0x5.2 (0.1)
|
||||
0x000| 00 | . | unused: 0 0x5.3-0x5.7 (0.5)
|
||||
0x000| 00 00 00 33 | ...3 | size: 51 0x6-0x9.7 (4)
|
||||
| | | frames[0:2]: 0xa-0x32.7 (41)
|
||||
| | | [0]{}: frame 0xa-0x19.7 (16)
|
||||
0x000| 54 49 54 32 | TIT2 | id: "TIT2" (Title/songname/content description) 0xa-0xd.7 (4)
|
||||
0x000| 00 00| ..| size: 6 0xe-0x11.7 (4)
|
||||
0x010|00 06 |.. |
|
||||
| | | flags{}: 0x12-0x13.7 (2)
|
||||
0x010| 00 | . | unused0: 0 0x12-0x12 (0.1)
|
||||
0x010| 00 | . | tag_alter_preservation: false 0x12.1-0x12.1 (0.1)
|
||||
0x010| 00 | . | file_alter_preservation: false 0x12.2-0x12.2 (0.1)
|
||||
0x010| 00 | . | read_only: false 0x12.3-0x12.3 (0.1)
|
||||
0x010| 00 00 | .. | unused1: 0 0x12.4-0x13 (0.5)
|
||||
0x010| 00 | . | grouping_identity: false 0x13.1-0x13.1 (0.1)
|
||||
0x010| 00 | . | unused2: 0 0x13.2-0x13.3 (0.2)
|
||||
0x010| 00 | . | compression: false 0x13.4-0x13.4 (0.1)
|
||||
0x010| 00 | . | encryption: false 0x13.5-0x13.5 (0.1)
|
||||
0x010| 00 | . | unsync: false 0x13.6-0x13.6 (0.1)
|
||||
0x010| 00 | . | data_length_indicator: false 0x13.7-0x13.7 (0.1)
|
||||
0x010| 03 | . | text_encoding: "utf8" (3) 0x14-0x14.7 (1)
|
||||
0x010| 74 65 73 74 00 | test. | text: "test" 0x15-0x19.7 (5)
|
||||
| | | [1]{}: frame 0x1a-0x32.7 (25)
|
||||
0x010| 54 53 53 45 | TSSE | id: "TSSE" (Software/Hardware and settings used for encoding) 0x1a-0x1d.7 (4)
|
||||
0x010| 00 00| ..| size: 15 0x1e-0x21.7 (4)
|
||||
0x020|00 0f |.. |
|
||||
| | | flags{}: 0x22-0x23.7 (2)
|
||||
0x020| 00 | . | unused0: 0 0x22-0x22 (0.1)
|
||||
0x020| 00 | . | tag_alter_preservation: false 0x22.1-0x22.1 (0.1)
|
||||
0x020| 00 | . | file_alter_preservation: false 0x22.2-0x22.2 (0.1)
|
||||
0x020| 00 | . | read_only: false 0x22.3-0x22.3 (0.1)
|
||||
0x020| 00 00 | .. | unused1: 0 0x22.4-0x23 (0.5)
|
||||
0x020| 00 | . | grouping_identity: false 0x23.1-0x23.1 (0.1)
|
||||
0x020| 00 | . | unused2: 0 0x23.2-0x23.3 (0.2)
|
||||
0x020| 00 | . | compression: false 0x23.4-0x23.4 (0.1)
|
||||
0x020| 00 | . | encryption: false 0x23.5-0x23.5 (0.1)
|
||||
0x020| 00 | . | unsync: false 0x23.6-0x23.6 (0.1)
|
||||
0x020| 00 | . | data_length_indicator: false 0x23.7-0x23.7 (0.1)
|
||||
0x020| 03 | . | text_encoding: "utf8" (3) 0x24-0x24.7 (1)
|
||||
0x020| 4c 61 76 66 35 38 2e 37 36 2e 31| Lavf58.76.1| text: "Lavf58.76.100" 0x25-0x32.7 (14)
|
||||
0x030|30 30 00 |00. |
|
||||
0x030| 00 00 00 00 00 00 00 00 00 00 | .......... | padding: raw bits (all zero) 0x33-0x3c.7 (10)
|
||||
| | | frames[0:3]: 0x3d-0x44f.7 (1043)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: frame (mp3_frame) 0x3d-0x10c.7 (208)
|
||||
| | | header{}: 0x3d-0x40.7 (4)
|
||||
0x030| ff fb | .. | sync: 0b11111111111 (valid) 0x3d-0x3e.2 (1.3)
|
||||
0x030| fb | . | mpeg_version: "1" (3) (MPEG Version 1) 0x3e.3-0x3e.4 (0.2)
|
||||
0x030| fb | . | layer: 3 (1) (MPEG Layer 3) 0x3e.5-0x3e.6 (0.2)
|
||||
| | | sample_count: 1152 0x3e.7-NA (0)
|
||||
0x030| fb | . | protection_absent: true (No CRC) 0x3e.7-0x3e.7 (0.1)
|
||||
0x030| 50| P| bitrate: 64000 (5) 0x3f-0x3f.3 (0.4)
|
||||
0x030| 50| P| sample_rate: 44100 (0) 0x3f.4-0x3f.5 (0.2)
|
||||
0x030| 50| P| padding: "not_padded" (0b0) 0x3f.6-0x3f.6 (0.1)
|
||||
0x030| 50| P| private: 0 0x3f.7-0x3f.7 (0.1)
|
||||
0x040|00 |. | channels: "stereo" (0b0) 0x40-0x40.1 (0.2)
|
||||
0x040|00 |. | channel_mode: "none" (0b0) 0x40.2-0x40.3 (0.2)
|
||||
0x040|00 |. | copyright: 0 0x40.4-0x40.4 (0.1)
|
||||
0x040|00 |. | original: 0 0x40.5-0x40.5 (0.1)
|
||||
0x040|00 |. | emphasis: "none" (0b0) 0x40.6-0x40.7 (0.2)
|
||||
| | | side_info{}: 0x41-0x60.7 (32)
|
||||
0x040| 00 00 | .. | main_data_begin: 0 0x41-0x42 (1.1)
|
||||
0x040| 00 | . | share: 0 0x42.1-0x42.3 (0.3)
|
||||
0x040| 00 | . | scfsi0: 0 0x42.4-0x42.7 (0.4)
|
||||
0x040| 00 | . | scfsi1: 0 0x43-0x43.3 (0.4)
|
||||
| | | granules[0:2]: 0x43.4-0x60.7 (29.4)
|
||||
| | | [0][0:2]: granule 0x43.4-0x52.1 (14.6)
|
||||
| | | [0]{}: channel 0x43.4-0x4a.6 (7.3)
|
||||
0x040| 00 00 | .. | part2_3_length: 0 0x43.4-0x44.7 (1.4)
|
||||
0x040| 00 00 | .. | big_values: 0 0x45-0x46 (1.1)
|
||||
0x040| 00 00 | .. | global_gain: 0 0x46.1-0x47 (1)
|
||||
0x040| 00 | . | scalefac_compress: 0 0x47.1-0x47.4 (0.4)
|
||||
0x040| 00 | . | blocksplit_flag: 0 0x47.5-0x47.5 (0.1)
|
||||
0x040| 00 00 | .. | table_select0: 0 0x47.6-0x48.2 (0.5)
|
||||
0x040| 00 | . | table_select1: 0 0x48.3-0x48.7 (0.5)
|
||||
0x040| 00 | . | table_select2: 0 0x49-0x49.4 (0.5)
|
||||
0x040| 00 00 | .. | region_address1: 0 0x49.5-0x4a (0.4)
|
||||
0x040| 00 | . | region_address2: 0 0x4a.1-0x4a.3 (0.3)
|
||||
0x040| 00 | . | preflag: 0 0x4a.4-0x4a.4 (0.1)
|
||||
0x040| 00 | . | scalefac_scale: 0 0x4a.5-0x4a.5 (0.1)
|
||||
0x040| 00 | . | count1table_select: 0 0x4a.6-0x4a.6 (0.1)
|
||||
| | | [1]{}: channel 0x4a.7-0x52.1 (7.3)
|
||||
0x040| 00 00 00 | ... | part2_3_length: 0 0x4a.7-0x4c.2 (1.4)
|
||||
0x040| 00 00 | .. | big_values: 0 0x4c.3-0x4d.3 (1.1)
|
||||
0x040| 00 00 | .. | global_gain: 0 0x4d.4-0x4e.3 (1)
|
||||
0x040| 00 | . | scalefac_compress: 0 0x4e.4-0x4e.7 (0.4)
|
||||
0x040| 00| .| blocksplit_flag: 0 0x4f-0x4f (0.1)
|
||||
0x040| 00| .| table_select0: 0 0x4f.1-0x4f.5 (0.5)
|
||||
0x040| 00| .| table_select1: 0 0x4f.6-0x50.2 (0.5)
|
||||
0x050|00 |. |
|
||||
0x050|00 |. | table_select2: 0 0x50.3-0x50.7 (0.5)
|
||||
0x050| 00 | . | region_address1: 0 0x51-0x51.3 (0.4)
|
||||
0x050| 00 | . | region_address2: 0 0x51.4-0x51.6 (0.3)
|
||||
0x050| 00 | . | preflag: 0 0x51.7-0x51.7 (0.1)
|
||||
0x050| 00 | . | scalefac_scale: 0 0x52-0x52 (0.1)
|
||||
0x050| 00 | . | count1table_select: 0 0x52.1-0x52.1 (0.1)
|
||||
| | | [1][0:2]: granule 0x52.2-0x60.7 (14.6)
|
||||
| | | [0]{}: channel 0x52.2-0x59.4 (7.3)
|
||||
0x050| 00 00 | .. | part2_3_length: 0 0x52.2-0x53.5 (1.4)
|
||||
0x050| 00 00 | .. | big_values: 0 0x53.6-0x54.6 (1.1)
|
||||
0x050| 00 00 | .. | global_gain: 0 0x54.7-0x55.6 (1)
|
||||
0x050| 00 00 | .. | scalefac_compress: 0 0x55.7-0x56.2 (0.4)
|
||||
0x050| 00 | . | blocksplit_flag: 0 0x56.3-0x56.3 (0.1)
|
||||
0x050| 00 00 | .. | table_select0: 0 0x56.4-0x57 (0.5)
|
||||
0x050| 00 | . | table_select1: 0 0x57.1-0x57.5 (0.5)
|
||||
0x050| 00 00 | .. | table_select2: 0 0x57.6-0x58.2 (0.5)
|
||||
0x050| 00 | . | region_address1: 0 0x58.3-0x58.6 (0.4)
|
||||
0x050| 00 00 | .. | region_address2: 0 0x58.7-0x59.1 (0.3)
|
||||
0x050| 00 | . | preflag: 0 0x59.2-0x59.2 (0.1)
|
||||
0x050| 00 | . | scalefac_scale: 0 0x59.3-0x59.3 (0.1)
|
||||
0x050| 00 | . | count1table_select: 0 0x59.4-0x59.4 (0.1)
|
||||
| | | [1]{}: channel 0x59.5-0x60.7 (7.3)
|
||||
0x050| 00 00 00 | ... | part2_3_length: 0 0x59.5-0x5b (1.4)
|
||||
0x050| 00 00 | .. | big_values: 0 0x5b.1-0x5c.1 (1.1)
|
||||
0x050| 00 00 | .. | global_gain: 0 0x5c.2-0x5d.1 (1)
|
||||
0x050| 00 | . | scalefac_compress: 0 0x5d.2-0x5d.5 (0.4)
|
||||
0x050| 00 | . | blocksplit_flag: 0 0x5d.6-0x5d.6 (0.1)
|
||||
0x050| 00 00 | .. | table_select0: 0 0x5d.7-0x5e.3 (0.5)
|
||||
0x050| 00 00| ..| table_select1: 0 0x5e.4-0x5f (0.5)
|
||||
0x050| 00| .| table_select2: 0 0x5f.1-0x5f.5 (0.5)
|
||||
0x050| 00| .| region_address1: 0 0x5f.6-0x60.1 (0.4)
|
||||
0x060|00 |. |
|
||||
0x060|00 |. | region_address2: 0 0x60.2-0x60.4 (0.3)
|
||||
0x060|00 |. | preflag: 0 0x60.5-0x60.5 (0.1)
|
||||
0x060|00 |. | scalefac_scale: 0 0x60.6-0x60.6 (0.1)
|
||||
0x060|00 |. | count1table_select: 0 0x60.7-0x60.7 (0.1)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| xing{}: (xing) 0x61-0xfc.7 (156)
|
||||
0x060| 49 6e 66 6f | Info | header: "Info" 0x61-0x64.7 (4)
|
||||
| | | present_flags{}: 0x65-0x68.7 (4)
|
||||
0x060| 00 00 00 0f | .... | unused: 0 0x65-0x68.3 (3.4)
|
||||
0x060| 0f | . | quality: true 0x68.4-0x68.4 (0.1)
|
||||
0x060| 0f | . | toc: true 0x68.5-0x68.5 (0.1)
|
||||
0x060| 0f | . | bytes: true 0x68.6-0x68.6 (0.1)
|
||||
0x060| 0f | . | frames: true 0x68.7-0x68.7 (0.1)
|
||||
0x060| 00 00 00 02 | .... | frames: 2 0x69-0x6c.7 (4)
|
||||
0x060| 00 00 04| ...| bytes: 1043 0x6d-0x70.7 (4)
|
||||
0x070|13 |. |
|
||||
| | | toc[0:100]: 0x71-0xd4.7 (100)
|
||||
0x070| 00 | . | [0]: 0 entry 0x71-0x71.7 (1)
|
||||
0x070| 99 | . | [1]: 153 entry 0x72-0x72.7 (1)
|
||||
0x070| 99 | . | [2]: 153 entry 0x73-0x73.7 (1)
|
||||
0x070| 99 | . | [3]: 153 entry 0x74-0x74.7 (1)
|
||||
0x070| 99 | . | [4]: 153 entry 0x75-0x75.7 (1)
|
||||
0x070| 99 | . | [5]: 153 entry 0x76-0x76.7 (1)
|
||||
0x070| 99 | . | [6]: 153 entry 0x77-0x77.7 (1)
|
||||
0x070| 99 | . | [7]: 153 entry 0x78-0x78.7 (1)
|
||||
0x070| 99 | . | [8]: 153 entry 0x79-0x79.7 (1)
|
||||
0x070| 99 | . | [9]: 153 entry 0x7a-0x7a.7 (1)
|
||||
0x070| 99 | . | [10]: 153 entry 0x7b-0x7b.7 (1)
|
||||
0x070| 99 | . | [11]: 153 entry 0x7c-0x7c.7 (1)
|
||||
0x070| 99 | . | [12]: 153 entry 0x7d-0x7d.7 (1)
|
||||
0x070| 99 | . | [13]: 153 entry 0x7e-0x7e.7 (1)
|
||||
0x070| 99| .| [14]: 153 entry 0x7f-0x7f.7 (1)
|
||||
0x080|99 |. | [15]: 153 entry 0x80-0x80.7 (1)
|
||||
0x080| 99 | . | [16]: 153 entry 0x81-0x81.7 (1)
|
||||
0x080| 99 | . | [17]: 153 entry 0x82-0x82.7 (1)
|
||||
0x080| 99 | . | [18]: 153 entry 0x83-0x83.7 (1)
|
||||
0x080| 99 | . | [19]: 153 entry 0x84-0x84.7 (1)
|
||||
0x080| 99 | . | [20]: 153 entry 0x85-0x85.7 (1)
|
||||
0x080| 99 | . | [21]: 153 entry 0x86-0x86.7 (1)
|
||||
0x080| 99 | . | [22]: 153 entry 0x87-0x87.7 (1)
|
||||
0x080| 99 | . | [23]: 153 entry 0x88-0x88.7 (1)
|
||||
0x080| 99 | . | [24]: 153 entry 0x89-0x89.7 (1)
|
||||
0x080| 99 | . | [25]: 153 entry 0x8a-0x8a.7 (1)
|
||||
0x080| 99 | . | [26]: 153 entry 0x8b-0x8b.7 (1)
|
||||
0x080| 99 | . | [27]: 153 entry 0x8c-0x8c.7 (1)
|
||||
0x080| 99 | . | [28]: 153 entry 0x8d-0x8d.7 (1)
|
||||
0x080| 99 | . | [29]: 153 entry 0x8e-0x8e.7 (1)
|
||||
0x080| 99| .| [30]: 153 entry 0x8f-0x8f.7 (1)
|
||||
0x090|99 |. | [31]: 153 entry 0x90-0x90.7 (1)
|
||||
0x090| 99 | . | [32]: 153 entry 0x91-0x91.7 (1)
|
||||
0x090| 99 | . | [33]: 153 entry 0x92-0x92.7 (1)
|
||||
0x090| 99 | . | [34]: 153 entry 0x93-0x93.7 (1)
|
||||
0x090| 99 | . | [35]: 153 entry 0x94-0x94.7 (1)
|
||||
0x090| 99 | . | [36]: 153 entry 0x95-0x95.7 (1)
|
||||
0x090| 99 | . | [37]: 153 entry 0x96-0x96.7 (1)
|
||||
0x090| 99 | . | [38]: 153 entry 0x97-0x97.7 (1)
|
||||
0x090| 99 | . | [39]: 153 entry 0x98-0x98.7 (1)
|
||||
0x090| 99 | . | [40]: 153 entry 0x99-0x99.7 (1)
|
||||
0x090| 99 | . | [41]: 153 entry 0x9a-0x9a.7 (1)
|
||||
0x090| 99 | . | [42]: 153 entry 0x9b-0x9b.7 (1)
|
||||
0x090| 99 | . | [43]: 153 entry 0x9c-0x9c.7 (1)
|
||||
0x090| 99 | . | [44]: 153 entry 0x9d-0x9d.7 (1)
|
||||
0x090| 99 | . | [45]: 153 entry 0x9e-0x9e.7 (1)
|
||||
0x090| 99| .| [46]: 153 entry 0x9f-0x9f.7 (1)
|
||||
0x0a0|99 |. | [47]: 153 entry 0xa0-0xa0.7 (1)
|
||||
0x0a0| 99 | . | [48]: 153 entry 0xa1-0xa1.7 (1)
|
||||
0x0a0| 99 | . | [49]: 153 entry 0xa2-0xa2.7 (1)
|
||||
0x0a0| ff | . | [50]: 255 entry 0xa3-0xa3.7 (1)
|
||||
0x0a0| ff | . | [51]: 255 entry 0xa4-0xa4.7 (1)
|
||||
0x0a0| ff | . | [52]: 255 entry 0xa5-0xa5.7 (1)
|
||||
0x0a0| ff | . | [53]: 255 entry 0xa6-0xa6.7 (1)
|
||||
0x0a0| ff | . | [54]: 255 entry 0xa7-0xa7.7 (1)
|
||||
0x0a0| ff | . | [55]: 255 entry 0xa8-0xa8.7 (1)
|
||||
0x0a0| ff | . | [56]: 255 entry 0xa9-0xa9.7 (1)
|
||||
0x0a0| ff | . | [57]: 255 entry 0xaa-0xaa.7 (1)
|
||||
0x0a0| ff | . | [58]: 255 entry 0xab-0xab.7 (1)
|
||||
0x0a0| ff | . | [59]: 255 entry 0xac-0xac.7 (1)
|
||||
0x0a0| ff | . | [60]: 255 entry 0xad-0xad.7 (1)
|
||||
0x0a0| ff | . | [61]: 255 entry 0xae-0xae.7 (1)
|
||||
0x0a0| ff| .| [62]: 255 entry 0xaf-0xaf.7 (1)
|
||||
0x0b0|ff |. | [63]: 255 entry 0xb0-0xb0.7 (1)
|
||||
0x0b0| ff | . | [64]: 255 entry 0xb1-0xb1.7 (1)
|
||||
0x0b0| ff | . | [65]: 255 entry 0xb2-0xb2.7 (1)
|
||||
0x0b0| ff | . | [66]: 255 entry 0xb3-0xb3.7 (1)
|
||||
0x0b0| ff | . | [67]: 255 entry 0xb4-0xb4.7 (1)
|
||||
0x0b0| ff | . | [68]: 255 entry 0xb5-0xb5.7 (1)
|
||||
0x0b0| ff | . | [69]: 255 entry 0xb6-0xb6.7 (1)
|
||||
0x0b0| ff | . | [70]: 255 entry 0xb7-0xb7.7 (1)
|
||||
0x0b0| ff | . | [71]: 255 entry 0xb8-0xb8.7 (1)
|
||||
0x0b0| ff | . | [72]: 255 entry 0xb9-0xb9.7 (1)
|
||||
0x0b0| ff | . | [73]: 255 entry 0xba-0xba.7 (1)
|
||||
0x0b0| ff | . | [74]: 255 entry 0xbb-0xbb.7 (1)
|
||||
0x0b0| ff | . | [75]: 255 entry 0xbc-0xbc.7 (1)
|
||||
0x0b0| ff | . | [76]: 255 entry 0xbd-0xbd.7 (1)
|
||||
0x0b0| ff | . | [77]: 255 entry 0xbe-0xbe.7 (1)
|
||||
0x0b0| ff| .| [78]: 255 entry 0xbf-0xbf.7 (1)
|
||||
0x0c0|ff |. | [79]: 255 entry 0xc0-0xc0.7 (1)
|
||||
0x0c0| ff | . | [80]: 255 entry 0xc1-0xc1.7 (1)
|
||||
0x0c0| ff | . | [81]: 255 entry 0xc2-0xc2.7 (1)
|
||||
0x0c0| ff | . | [82]: 255 entry 0xc3-0xc3.7 (1)
|
||||
0x0c0| ff | . | [83]: 255 entry 0xc4-0xc4.7 (1)
|
||||
0x0c0| ff | . | [84]: 255 entry 0xc5-0xc5.7 (1)
|
||||
0x0c0| ff | . | [85]: 255 entry 0xc6-0xc6.7 (1)
|
||||
0x0c0| ff | . | [86]: 255 entry 0xc7-0xc7.7 (1)
|
||||
0x0c0| ff | . | [87]: 255 entry 0xc8-0xc8.7 (1)
|
||||
0x0c0| ff | . | [88]: 255 entry 0xc9-0xc9.7 (1)
|
||||
0x0c0| ff | . | [89]: 255 entry 0xca-0xca.7 (1)
|
||||
0x0c0| ff | . | [90]: 255 entry 0xcb-0xcb.7 (1)
|
||||
0x0c0| ff | . | [91]: 255 entry 0xcc-0xcc.7 (1)
|
||||
0x0c0| ff | . | [92]: 255 entry 0xcd-0xcd.7 (1)
|
||||
0x0c0| ff | . | [93]: 255 entry 0xce-0xce.7 (1)
|
||||
0x0c0| ff| .| [94]: 255 entry 0xcf-0xcf.7 (1)
|
||||
0x0d0|ff |. | [95]: 255 entry 0xd0-0xd0.7 (1)
|
||||
0x0d0| ff | . | [96]: 255 entry 0xd1-0xd1.7 (1)
|
||||
0x0d0| ff | . | [97]: 255 entry 0xd2-0xd2.7 (1)
|
||||
0x0d0| ff | . | [98]: 255 entry 0xd3-0xd3.7 (1)
|
||||
0x0d0| ff | . | [99]: 255 entry 0xd4-0xd4.7 (1)
|
||||
0x0d0| 00 00 00 00 | .... | quality: 0 0xd5-0xd8.7 (4)
|
||||
| | | lame_extension{}: 0xd9-0xfc.7 (36)
|
||||
0x0d0| 4c 61 76 63 35 38 2e| Lavc58.| encoder: "Lavc58.13" 0xd9-0xe1.7 (9)
|
||||
0x0e0|31 33 |13 |
|
||||
0x0e0| 00 | . | tag_revision: 0 0xe2-0xe2.3 (0.4)
|
||||
0x0e0| 00 | . | vbr_method: 0 0xe2.4-0xe2.7 (0.4)
|
||||
0x0e0| 00 | . | lowpass_filter: 0 0xe3-0xe3.7 (1)
|
||||
0x0e0| 00 00 00 00 | .... | replay_gain_peak: 0 0xe4-0xe7.7 (4)
|
||||
0x0e0| 00 00 | .. | radio_replay_gain: 0 0xe8-0xe9.7 (2)
|
||||
0x0e0| 00 00 | .. | audiophile_replay_gain: 0 0xea-0xeb.7 (2)
|
||||
0x0e0| 00 | . | lame_flags: 0 0xec-0xec.3 (0.4)
|
||||
0x0e0| 00 | . | lame_ath_type: 0 0xec.4-0xec.7 (0.4)
|
||||
0x0e0| 00 | . | abr_vbr: 0 0xed-0xed.7 (1)
|
||||
0x0e0| 24 05| $.| encoder_delay: 576 0xee-0xef.3 (1.4)
|
||||
0x0e0| 05| .| encoder_padding: 1287 0xef.4-0xf0.7 (1.4)
|
||||
0x0f0|07 |. |
|
||||
0x0f0| 00 | . | misc: 0 0xf1-0xf1.7 (1)
|
||||
0x0f0| 00 | . | mp3_gain: 0 0xf2-0xf2.7 (1)
|
||||
0x0f0| 00 00 | .. | preset: 0 0xf3-0xf4.7 (2)
|
||||
0x0f0| 00 00 04 13 | .... | length: 1043 0xf5-0xf8.7 (4)
|
||||
0x0f0| c2 aa | .. | music_crc: 49834 0xf9-0xfa.7 (2)
|
||||
0x0f0| 7a 03 | z. | tag_crc: 31235 0xfb-0xfc.7 (2)
|
||||
0x0f0| 00 00 00| ...| audio_data: raw bits 0xfd-0x10c.7 (16)
|
||||
0x100|00 00 00 00 00 00 00 00 00 00 00 00 00 |............. |
|
||||
| | | crc_calculated: "f7d3" (raw bits) 0x10d-NA (0)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [1]{}: frame (mp3_frame) 0x10d-0x2ad.7 (417)
|
||||
| | | header{}: 0x10d-0x110.7 (4)
|
||||
0x100| ff fb | .. | sync: 0b11111111111 (valid) 0x10d-0x10e.2 (1.3)
|
||||
0x100| fb | . | mpeg_version: "1" (3) (MPEG Version 1) 0x10e.3-0x10e.4 (0.2)
|
||||
0x100| fb | . | layer: 3 (1) (MPEG Layer 3) 0x10e.5-0x10e.6 (0.2)
|
||||
| | | sample_count: 1152 0x10e.7-NA (0)
|
||||
0x100| fb | . | protection_absent: true (No CRC) 0x10e.7-0x10e.7 (0.1)
|
||||
0x100| 90| .| bitrate: 128000 (9) 0x10f-0x10f.3 (0.4)
|
||||
0x100| 90| .| sample_rate: 44100 (0) 0x10f.4-0x10f.5 (0.2)
|
||||
0x100| 90| .| padding: "not_padded" (0b0) 0x10f.6-0x10f.6 (0.1)
|
||||
0x100| 90| .| private: 0 0x10f.7-0x10f.7 (0.1)
|
||||
0x110|64 |d | channels: "joint_stereo" (0b1) 0x110-0x110.1 (0.2)
|
||||
0x110|64 |d | channel_mode: "ms_stereo" (0b10) 0x110.2-0x110.3 (0.2)
|
||||
0x110|64 |d | copyright: 0 0x110.4-0x110.4 (0.1)
|
||||
0x110|64 |d | original: 1 0x110.5-0x110.5 (0.1)
|
||||
0x110|64 |d | emphasis: "none" (0b0) 0x110.6-0x110.7 (0.2)
|
||||
| | | side_info{}: 0x111-0x130.7 (32)
|
||||
0x110| 00 00 | .. | main_data_begin: 0 0x111-0x112 (1.1)
|
||||
0x110| 00 | . | share: 0 0x112.1-0x112.3 (0.3)
|
||||
0x110| 00 | . | scfsi0: 0 0x112.4-0x112.7 (0.4)
|
||||
0x110| 02 | . | scfsi1: 0 0x113-0x113.3 (0.4)
|
||||
| | | granules[0:2]: 0x113.4-0x130.7 (29.4)
|
||||
| | | [0][0:2]: granule 0x113.4-0x122.1 (14.6)
|
||||
| | | [0]{}: channel 0x113.4-0x11a.6 (7.3)
|
||||
0x110| 02 6b | .k | part2_3_length: 619 0x113.4-0x114.7 (1.4)
|
||||
0x110| 0b ce | .. | big_values: 23 0x115-0x116 (1.1)
|
||||
0x110| ce 9d | .. | global_gain: 157 0x116.1-0x117 (1)
|
||||
0x110| 9d | . | scalefac_compress: 3 0x117.1-0x117.4 (0.4)
|
||||
0x110| 9d | . | blocksplit_flag: 1 0x117.5-0x117.5 (0.1)
|
||||
0x110| 9d | . | block_type: "start block" (1) 0x117.6-0x117.7 (0.2)
|
||||
0x110| 60 | ` | switch_point: 0 0x118-0x118 (0.1)
|
||||
0x110| 60 | ` | table_select0: 24 0x118.1-0x118.5 (0.5)
|
||||
0x110| 60 60 | `` | table_select1: 3 0x118.6-0x119.2 (0.5)
|
||||
0x110| 60 | ` | subblock_gain0: 0 0x119.3-0x119.5 (0.3)
|
||||
0x110| 60 00 | `. | subblock_gain1: 0 0x119.6-0x11a (0.3)
|
||||
0x110| 00 | . | subblock_gain2: 0 0x11a.1-0x11a.3 (0.3)
|
||||
0x110| 00 | . | preflag: 0 0x11a.4-0x11a.4 (0.1)
|
||||
0x110| 00 | . | scalefac_scale: 0 0x11a.5-0x11a.5 (0.1)
|
||||
0x110| 00 | . | count1table_select: 0 0x11a.6-0x11a.6 (0.1)
|
||||
| | | [1]{}: channel 0x11a.7-0x122.1 (7.3)
|
||||
0x110| 00 00 00 | ... | part2_3_length: 0 0x11a.7-0x11c.2 (1.4)
|
||||
0x110| 00 0d | .. | big_values: 0 0x11c.3-0x11d.3 (1.1)
|
||||
0x110| 0d 20 | . | global_gain: 210 0x11d.4-0x11e.3 (1)
|
||||
0x110| 20 | | scalefac_compress: 0 0x11e.4-0x11e.7 (0.4)
|
||||
0x110| a0| .| blocksplit_flag: 1 0x11f-0x11f (0.1)
|
||||
0x110| a0| .| block_type: "start block" (1) 0x11f.1-0x11f.2 (0.2)
|
||||
0x110| a0| .| switch_point: 0 0x11f.3-0x11f.3 (0.1)
|
||||
0x110| a0| .| table_select0: 0 0x11f.4-0x120 (0.5)
|
||||
0x120|00 |. |
|
||||
0x120|00 |. | table_select1: 0 0x120.1-0x120.5 (0.5)
|
||||
0x120|00 01 |.. | subblock_gain0: 0 0x120.6-0x121 (0.3)
|
||||
0x120| 01 | . | subblock_gain1: 0 0x121.1-0x121.3 (0.3)
|
||||
0x120| 01 | . | subblock_gain2: 0 0x121.4-0x121.6 (0.3)
|
||||
0x120| 01 | . | preflag: 1 0x121.7-0x121.7 (0.1)
|
||||
0x120| 18 | . | scalefac_scale: 0 0x122-0x122 (0.1)
|
||||
0x120| 18 | . | count1table_select: 0 0x122.1-0x122.1 (0.1)
|
||||
| | | [1][0:2]: granule 0x122.2-0x130.7 (14.6)
|
||||
| | | [0]{}: channel 0x122.2-0x129.4 (7.3)
|
||||
0x120| 18 c9 | .. | part2_3_length: 1586 0x122.2-0x123.5 (1.4)
|
||||
0x120| c9 99 | .. | big_values: 204 0x123.6-0x124.6 (1.1)
|
||||
0x120| 99 51 | .Q | global_gain: 168 0x124.7-0x125.6 (1)
|
||||
0x120| 51 b9 | Q. | scalefac_compress: 13 0x125.7-0x126.2 (0.4)
|
||||
0x120| b9 | . | blocksplit_flag: 1 0x126.3-0x126.3 (0.1)
|
||||
0x120| b9 | . | block_type: "3 short windows" (2) 0x126.4-0x126.5 (0.2)
|
||||
0x120| b9 | . | switch_point: 0 0x126.6-0x126.6 (0.1)
|
||||
0x120| b9 a7 | .. | table_select0: 26 0x126.7-0x127.3 (0.5)
|
||||
0x120| a7 80 | .. | table_select1: 15 0x127.4-0x128 (0.5)
|
||||
0x120| 80 | . | subblock_gain0: 0 0x128.1-0x128.3 (0.3)
|
||||
0x120| 80 | . | subblock_gain1: 0 0x128.4-0x128.6 (0.3)
|
||||
0x120| 80 00 | .. | subblock_gain2: 0 0x128.7-0x129.1 (0.3)
|
||||
0x120| 00 | . | preflag: 0 0x129.2-0x129.2 (0.1)
|
||||
0x120| 00 | . | scalefac_scale: 0 0x129.3-0x129.3 (0.1)
|
||||
0x120| 00 | . | count1table_select: 0 0x129.4-0x129.4 (0.1)
|
||||
| | | [1]{}: channel 0x129.5-0x130.7 (7.3)
|
||||
0x120| 00 00 00 | ... | part2_3_length: 0 0x129.5-0x12b (1.4)
|
||||
0x120| 00 34 | .4 | big_values: 0 0x12b.1-0x12c.1 (1.1)
|
||||
0x120| 34 83 | 4. | global_gain: 210 0x12c.2-0x12d.1 (1)
|
||||
0x120| 83 | . | scalefac_compress: 0 0x12d.2-0x12d.5 (0.4)
|
||||
0x120| 83 | . | blocksplit_flag: 1 0x12d.6-0x12d.6 (0.1)
|
||||
0x120| 83 00 | .. | block_type: "3 short windows" (2) 0x12d.7-0x12e (0.2)
|
||||
0x120| 00 | . | switch_point: 0 0x12e.1-0x12e.1 (0.1)
|
||||
0x120| 00 | . | table_select0: 0 0x12e.2-0x12e.6 (0.5)
|
||||
0x120| 00 00| ..| table_select1: 0 0x12e.7-0x12f.3 (0.5)
|
||||
0x120| 00| .| subblock_gain0: 0 0x12f.4-0x12f.6 (0.3)
|
||||
0x120| 00| .| subblock_gain1: 0 0x12f.7-0x130.1 (0.3)
|
||||
0x130|00 |. |
|
||||
0x130|00 |. | subblock_gain2: 0 0x130.2-0x130.4 (0.3)
|
||||
0x130|00 |. | preflag: 0 0x130.5-0x130.5 (0.1)
|
||||
0x130|00 |. | scalefac_scale: 0 0x130.6-0x130.6 (0.1)
|
||||
0x130|00 |. | count1table_select: 0 0x130.7-0x130.7 (0.1)
|
||||
0x130| 0a 6b 6d d8 c2 12 cd a0 0d bf 4d 03 01 8d 4c| .km.......M...L| audio_data: raw bits 0x131-0x2ad.7 (381)
|
||||
0x140|35 18 20 0c 1d db 6b 6d 7d df 7f e3 72 fb 62 10|5. ...km}...r.b.|
|
||||
* |until 0x2ad.7 (381) | |
|
||||
| | | crc_calculated: "1855" (raw bits) 0x2ae-NA (0)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [2]{}: frame (mp3_frame) 0x2ae-0x44f.7 (418)
|
||||
| | | header{}: 0x2ae-0x2b1.7 (4)
|
||||
0x2a0| ff fb| ..| sync: 0b11111111111 (valid) 0x2ae-0x2af.2 (1.3)
|
||||
0x2a0| fb| .| mpeg_version: "1" (3) (MPEG Version 1) 0x2af.3-0x2af.4 (0.2)
|
||||
0x2a0| fb| .| layer: 3 (1) (MPEG Layer 3) 0x2af.5-0x2af.6 (0.2)
|
||||
| | | sample_count: 1152 0x2af.7-NA (0)
|
||||
0x2a0| fb| .| protection_absent: true (No CRC) 0x2af.7-0x2af.7 (0.1)
|
||||
0x2b0|92 |. | bitrate: 128000 (9) 0x2b0-0x2b0.3 (0.4)
|
||||
0x2b0|92 |. | sample_rate: 44100 (0) 0x2b0.4-0x2b0.5 (0.2)
|
||||
0x2b0|92 |. | padding: "padded" (0b1) 0x2b0.6-0x2b0.6 (0.1)
|
||||
0x2b0|92 |. | private: 0 0x2b0.7-0x2b0.7 (0.1)
|
||||
0x2b0| 64 | d | channels: "joint_stereo" (0b1) 0x2b1-0x2b1.1 (0.2)
|
||||
0x2b0| 64 | d | channel_mode: "ms_stereo" (0b10) 0x2b1.2-0x2b1.3 (0.2)
|
||||
0x2b0| 64 | d | copyright: 0 0x2b1.4-0x2b1.4 (0.1)
|
||||
0x2b0| 64 | d | original: 1 0x2b1.5-0x2b1.5 (0.1)
|
||||
0x2b0| 64 | d | emphasis: "none" (0b0) 0x2b1.6-0x2b1.7 (0.2)
|
||||
| | | side_info{}: 0x2b2-0x2d1.7 (32)
|
||||
0x2b0| 34 8f | 4. | main_data_begin: 105 0x2b2-0x2b3 (1.1)
|
||||
0x2b0| 8f | . | share: 0 0x2b3.1-0x2b3.3 (0.3)
|
||||
0x2b0| 8f | . | scfsi0: 15 0x2b3.4-0x2b3.7 (0.4)
|
||||
0x2b0| f3 | . | scfsi1: 15 0x2b4-0x2b4.3 (0.4)
|
||||
| | | granules[0:2]: 0x2b4.4-0x2d1.7 (29.4)
|
||||
| | | [0][0:2]: granule 0x2b4.4-0x2c3.1 (14.6)
|
||||
| | | [0]{}: channel 0x2b4.4-0x2bb.6 (7.3)
|
||||
0x2b0| f3 19 | .. | part2_3_length: 793 0x2b4.4-0x2b5.7 (1.4)
|
||||
0x2b0| 1f c8 | .. | big_values: 63 0x2b6-0x2b7 (1.1)
|
||||
0x2b0| c8 47 | .G | global_gain: 144 0x2b7.1-0x2b8 (1)
|
||||
0x2b0| 47 | G | scalefac_compress: 8 0x2b8.1-0x2b8.4 (0.4)
|
||||
0x2b0| 47 | G | blocksplit_flag: 1 0x2b8.5-0x2b8.5 (0.1)
|
||||
0x2b0| 47 | G | block_type: "end" (3) 0x2b8.6-0x2b8.7 (0.2)
|
||||
0x2b0| 3d | = | switch_point: 0 0x2b9-0x2b9 (0.1)
|
||||
0x2b0| 3d | = | table_select0: 15 0x2b9.1-0x2b9.5 (0.5)
|
||||
0x2b0| 3d 00 | =. | table_select1: 8 0x2b9.6-0x2ba.2 (0.5)
|
||||
0x2b0| 00 | . | subblock_gain0: 0 0x2ba.3-0x2ba.5 (0.3)
|
||||
0x2b0| 00 00 | .. | subblock_gain1: 0 0x2ba.6-0x2bb (0.3)
|
||||
0x2b0| 00 | . | subblock_gain2: 0 0x2bb.1-0x2bb.3 (0.3)
|
||||
0x2b0| 00 | . | preflag: 0 0x2bb.4-0x2bb.4 (0.1)
|
||||
0x2b0| 00 | . | scalefac_scale: 0 0x2bb.5-0x2bb.5 (0.1)
|
||||
0x2b0| 00 | . | count1table_select: 0 0x2bb.6-0x2bb.6 (0.1)
|
||||
| | | [1]{}: channel 0x2bb.7-0x2c3.1 (7.3)
|
||||
0x2b0| 00 00 00 | ... | part2_3_length: 0 0x2bb.7-0x2bd.2 (1.4)
|
||||
0x2b0| 00 0d | .. | big_values: 0 0x2bd.3-0x2be.3 (1.1)
|
||||
0x2b0| 0d 20| . | global_gain: 210 0x2be.4-0x2bf.3 (1)
|
||||
0x2b0| 20| | scalefac_compress: 0 0x2bf.4-0x2bf.7 (0.4)
|
||||
0x2c0|e0 |. | blocksplit_flag: 1 0x2c0-0x2c0 (0.1)
|
||||
0x2c0|e0 |. | block_type: "end" (3) 0x2c0.1-0x2c0.2 (0.2)
|
||||
0x2c0|e0 |. | switch_point: 0 0x2c0.3-0x2c0.3 (0.1)
|
||||
0x2c0|e0 00 |.. | table_select0: 0 0x2c0.4-0x2c1 (0.5)
|
||||
0x2c0| 00 | . | table_select1: 0 0x2c1.1-0x2c1.5 (0.5)
|
||||
0x2c0| 00 01 | .. | subblock_gain0: 0 0x2c1.6-0x2c2 (0.3)
|
||||
0x2c0| 01 | . | subblock_gain1: 0 0x2c2.1-0x2c2.3 (0.3)
|
||||
0x2c0| 01 | . | subblock_gain2: 0 0x2c2.4-0x2c2.6 (0.3)
|
||||
0x2c0| 01 | . | preflag: 1 0x2c2.7-0x2c2.7 (0.1)
|
||||
0x2c0| 00 | . | scalefac_scale: 0 0x2c3-0x2c3 (0.1)
|
||||
0x2c0| 00 | . | count1table_select: 0 0x2c3.1-0x2c3.1 (0.1)
|
||||
| | | [1][0:2]: granule 0x2c3.2-0x2d1.7 (14.6)
|
||||
| | | [0]{}: channel 0x2c3.2-0x2ca.4 (7.3)
|
||||
0x2c0| 00 00 | .. | part2_3_length: 0 0x2c3.2-0x2c4.5 (1.4)
|
||||
0x2c0| 00 01 | .. | big_values: 0 0x2c4.6-0x2c5.6 (1.1)
|
||||
0x2c0| 01 a4 | .. | global_gain: 210 0x2c5.7-0x2c6.6 (1)
|
||||
0x2c0| a4 00 | .. | scalefac_compress: 0 0x2c6.7-0x2c7.2 (0.4)
|
||||
0x2c0| 00 | . | blocksplit_flag: 0 0x2c7.3-0x2c7.3 (0.1)
|
||||
0x2c0| 00 00 | .. | table_select0: 0 0x2c7.4-0x2c8 (0.5)
|
||||
0x2c0| 00 | . | table_select1: 0 0x2c8.1-0x2c8.5 (0.5)
|
||||
0x2c0| 00 00 | .. | table_select2: 0 0x2c8.6-0x2c9.2 (0.5)
|
||||
0x2c0| 00 | . | region_address1: 0 0x2c9.3-0x2c9.6 (0.4)
|
||||
0x2c0| 00 20 | . | region_address2: 0 0x2c9.7-0x2ca.1 (0.3)
|
||||
0x2c0| 20 | | preflag: 1 0x2ca.2-0x2ca.2 (0.1)
|
||||
0x2c0| 20 | | scalefac_scale: 0 0x2ca.3-0x2ca.3 (0.1)
|
||||
0x2c0| 20 | | count1table_select: 0 0x2ca.4-0x2ca.4 (0.1)
|
||||
| | | [1]{}: channel 0x2ca.5-0x2d1.7 (7.3)
|
||||
0x2c0| 20 00 00 | .. | part2_3_length: 0 0x2ca.5-0x2cc (1.4)
|
||||
0x2c0| 00 34 | .4 | big_values: 0 0x2cc.1-0x2cd.1 (1.1)
|
||||
0x2c0| 34 80 | 4. | global_gain: 210 0x2cd.2-0x2ce.1 (1)
|
||||
0x2c0| 80 | . | scalefac_compress: 0 0x2ce.2-0x2ce.5 (0.4)
|
||||
0x2c0| 80 | . | blocksplit_flag: 0 0x2ce.6-0x2ce.6 (0.1)
|
||||
0x2c0| 80 00| ..| table_select0: 0 0x2ce.7-0x2cf.3 (0.5)
|
||||
0x2c0| 00| .| table_select1: 0 0x2cf.4-0x2d0 (0.5)
|
||||
0x2d0|00 |. |
|
||||
0x2d0|00 |. | table_select2: 0 0x2d0.1-0x2d0.5 (0.5)
|
||||
0x2d0|00 04 |.. | region_address1: 0 0x2d0.6-0x2d1.1 (0.4)
|
||||
0x2d0| 04 | . | region_address2: 0 0x2d1.2-0x2d1.4 (0.3)
|
||||
0x2d0| 04 | . | preflag: 1 0x2d1.5-0x2d1.5 (0.1)
|
||||
0x2d0| 04 | . | scalefac_scale: 0 0x2d1.6-0x2d1.6 (0.1)
|
||||
0x2d0| 04 | . | count1table_select: 0 0x2d1.7-0x2d1.7 (0.1)
|
||||
0x2d0| 2e 31 30 30 55 55 55 55 55 55 55 55 55 55| .100UUUUUUUUUU| audio_data: raw bits 0x2d2-0x44f.7 (382)
|
||||
0x2e0|55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55|UUUUUUUUUUUUUUUU|
|
||||
* |until 0x44f.7 (382) | |
|
||||
| | | crc_calculated: "53c8" (raw bits) 0x450-NA (0)
|
||||
| | | footers[0:1]: 0x450-0x4cf.7 (128)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef| [0]{}: footer (id3v1) 0x450-0x4cf.7 (128)
|
||||
0x450|54 41 47 |TAG | magic: "TAG" (valid) 0x450-0x452.7 (3)
|
||||
0x450| 74 65 73 74 00 00 00 00 00 00 00 00 00| test.........| song_name: "test" 0x453-0x470.7 (30)
|
||||
0x460|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
||||
0x470|00 |. |
|
||||
0x470| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| artist: "" 0x471-0x48e.7 (30)
|
||||
0x480|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |............... |
|
||||
0x480| 00| .| album_name: "" 0x48f-0x4ac.7 (30)
|
||||
0x490|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|................|
|
||||
0x4a0|00 00 00 00 00 00 00 00 00 00 00 00 00 |............. |
|
||||
0x4a0| 00 00 00| ...| year: "" 0x4ad-0x4b0.7 (4)
|
||||
0x4b0|00 |. |
|
||||
0x4b0| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| comment: "" 0x4b1-0x4ce.7 (30)
|
||||
0x4c0|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |............... |
|
||||
0x4c0| ff| .| genre: 255 0x4cf-0x4cf.7 (1)
|
BIN
format/mp3/testdata/test.mp3
vendored
BIN
format/mp3/testdata/test.mp3
vendored
Binary file not shown.
@ -1,83 +0,0 @@
|
||||
package mp3
|
||||
|
||||
// https://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header
|
||||
|
||||
import (
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
)
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(decode.Format{
|
||||
Name: format.XING,
|
||||
Description: "Xing header",
|
||||
DecodeFn: xingDecode,
|
||||
})
|
||||
}
|
||||
|
||||
func xingDecode(d *decode.D, _ any) any {
|
||||
// TODO: info has lame extension?
|
||||
hasLameExtension := false
|
||||
switch d.FieldUTF8("header", 4) {
|
||||
case "Xing":
|
||||
case "Info":
|
||||
hasLameExtension = true
|
||||
default:
|
||||
d.Errorf("no xing header found")
|
||||
}
|
||||
|
||||
qualityPresent := false
|
||||
tocPresent := false
|
||||
bytesPresent := false
|
||||
framesPresent := false
|
||||
d.FieldStruct("present_flags", func(d *decode.D) {
|
||||
d.FieldU("unused", 28)
|
||||
qualityPresent = d.FieldBool("quality")
|
||||
tocPresent = d.FieldBool("toc")
|
||||
bytesPresent = d.FieldBool("bytes")
|
||||
framesPresent = d.FieldBool("frames")
|
||||
})
|
||||
|
||||
if framesPresent {
|
||||
d.FieldU32BE("frames")
|
||||
}
|
||||
if bytesPresent {
|
||||
d.FieldU32BE("bytes")
|
||||
}
|
||||
if tocPresent {
|
||||
d.FieldArray("toc", func(d *decode.D) {
|
||||
for i := 0; i < 100; i++ {
|
||||
d.FieldU8("entry")
|
||||
}
|
||||
})
|
||||
}
|
||||
if qualityPresent {
|
||||
d.FieldU32BE("quality")
|
||||
}
|
||||
|
||||
if hasLameExtension {
|
||||
d.FieldStruct("lame_extension", func(d *decode.D) {
|
||||
d.FieldUTF8("encoder", 9)
|
||||
d.FieldU4("tag_revision")
|
||||
d.FieldU4("vbr_method")
|
||||
d.FieldU8("lowpass_filter") // TODO: /100
|
||||
d.FieldU32("replay_gain_peak")
|
||||
d.FieldU16("radio_replay_gain")
|
||||
d.FieldU16("audiophile_replay_gain")
|
||||
d.FieldU4("lame_flags")
|
||||
d.FieldU4("lame_ath_type")
|
||||
d.FieldU8("abr_vbr") // TODO:
|
||||
d.FieldU12("encoder_delay") // TODO:
|
||||
d.FieldU12("encoder_padding") // TODO:
|
||||
d.FieldU8("misc") // TODO:
|
||||
d.FieldU8("mp3_gain") // TODO:
|
||||
d.FieldU16("preset") // TODO:
|
||||
d.FieldU32("length")
|
||||
d.FieldU16("music_crc") // TODO:
|
||||
d.FieldU16("tag_crc") // TODO:
|
||||
})
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
@ -20,7 +20,7 @@ import (
|
||||
"github.com/wader/fq/pkg/scalar"
|
||||
)
|
||||
|
||||
var xingHeader decode.Group
|
||||
var mp3FrameTagsHeader decode.Group
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(decode.Format{
|
||||
@ -28,7 +28,7 @@ func init() {
|
||||
Description: "MPEG audio layer 3 frame",
|
||||
DecodeFn: frameDecode,
|
||||
Dependencies: []decode.Dependency{
|
||||
{Names: []string{format.XING}, Group: &xingHeader},
|
||||
{Names: []string{format.MP3_FRAME_TAGS}, Group: &mp3FrameTagsHeader},
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -369,7 +369,7 @@ func frameDecode(d *decode.D, _ any) any {
|
||||
// audio data size, may include audio data from other frames also if main_data_begin is used
|
||||
restBytes := frameBytes - headerBytes - crcBytes - sideInfoBytes
|
||||
d.FramedFn(int64(restBytes)*8, func(d *decode.D) {
|
||||
_, _, _ = d.TryFieldFormat("xing", xingHeader, nil)
|
||||
_, _, _ = d.TryFieldFormat("tags", mp3FrameTagsHeader, nil)
|
||||
d.FieldRawLen("audio_data", d.BitsLeft())
|
||||
})
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# ffmpeg -f lavfi -i sine -t 10ms -f wav pipe:1 | lame - - | fq - '.frame[1] | tobits' > mp3-frame-mono-crc
|
||||
# ffmpeg -f lavfi -i sine -t 10ms -f wav pipe:1 | lame - - | fq - '.frames[1] | tobits' > mp3-frame-mono-crc
|
||||
$ fq -d mp3_frame dv mp3-frame-mono-crc
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: mp3-frame-mono-crc (mp3_frame) 0x0-0xd0.7 (209)
|
||||
| | | header{}: 0x0-0x5.7 (6)
|
||||
|
201
pkg/interp/testdata/display.fqtest
vendored
201
pkg/interp/testdata/display.fqtest
vendored
@ -61,7 +61,7 @@ mp3> .frames[0] | dv({depth: 1, addrbase: 10})
|
||||
048| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| side_info{}: 49-65.7 (17)
|
||||
064|00 00 |.. |
|
||||
|00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15|0123456789012345|
|
||||
064| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| xing{}: (xing) 66-221.7 (156)
|
||||
064| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| tags{}: (mp3_frame_tags) 66-221.7 (156)
|
||||
080|02 57 00 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6|.W..............|
|
||||
* |until 221.7 (156) | |
|
||||
208| 00 00| ..| audio_data: raw bits 222-226.7 (5)
|
||||
@ -74,15 +74,15 @@ mp3> .frames[0] | dv({depth: 1, sizebase: 16})
|
||||
0x30| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| side_info{}: 0x31-0x41.7 (0x11)
|
||||
0x40|00 00 |.. |
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x40| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| xing{}: (xing) 0x42-0xdd.7 (0x9c)
|
||||
0x40| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| tags{}: (mp3_frame_tags) 0x42-0xdd.7 (0x9c)
|
||||
0x50|02 57 00 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6|.W..............|
|
||||
* |until 0xdd.7 (0x9c) | |
|
||||
0xd0| 00 00| ..| audio_data: raw bits 0xde-0xe2.7 (0x5)
|
||||
0xe0|00 00 00 |... |
|
||||
| | | crc_calculated: "827a" (raw bits) 0xe3-NA (0x0)
|
||||
mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
mp3> .frames[0].tags | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
"d"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].xing{}: (xing)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].tags{}: (mp3_frame_tags)
|
||||
0x40| 49 6e 66 6f | Info | header: "Info"
|
||||
| | | present_flags{}:
|
||||
0x40| 00 00 00 0f | .... | unused: 0
|
||||
@ -146,29 +146,28 @@ mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
0x80| a6 | . | [49]: 166
|
||||
| | | [50:100]: ...
|
||||
0xb0| 00 00 00 00 | .... | quality: 0
|
||||
| | | lame_extension{}:
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xc0|2e 39 31 |.91 |
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xd0|05 |. |
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
"da"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].xing{}: (xing)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].tags{}: (mp3_frame_tags)
|
||||
0x40| 49 6e 66 6f | Info | header: "Info"
|
||||
| | | present_flags{}:
|
||||
0x40| 00 00 00 0f | .... | unused: 0
|
||||
@ -281,29 +280,28 @@ mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
0xb0| ff | . | [98]: 255
|
||||
0xb0| ff | . | [99]: 255
|
||||
0xb0| 00 00 00 00 | .... | quality: 0
|
||||
| | | lame_extension{}:
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xc0|2e 39 31 |.91 |
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xd0|05 |. |
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
"dd"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].xing{}: (xing)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].tags{}: (mp3_frame_tags)
|
||||
0x40| 49 6e 66 6f | Info | header: "Info"
|
||||
| | | present_flags{}:
|
||||
0x40| 00 00 00 0f | .... | unused: 0
|
||||
@ -416,29 +414,28 @@ mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
0xb0| ff | . | [98]: 255
|
||||
0xb0| ff | . | [99]: 255
|
||||
0xb0| 00 00 00 00 | .... | quality: 0
|
||||
| | | lame_extension{}:
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91"
|
||||
0xc0|2e 39 31 |.91 |
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xc0| 00 | . | tag_revision: 0
|
||||
0xc0| 00 | . | vbr_method: 0
|
||||
0xc0| 00 | . | lowpass_filter: 0
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0
|
||||
0xc0| 00 | . | lame_flags: 0
|
||||
0xc0| 00 | . | lame_ath_type: 0
|
||||
0xc0| 00 | . | abr_vbr: 0
|
||||
0xc0| 24| $| encoder_delay: 576
|
||||
0xd0|05 |. |
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
0xd0|05 07 |.. | encoder_padding: 1287
|
||||
0xd0| 00 | . | misc: 0
|
||||
0xd0| 00 | . | mp3_gain: 0
|
||||
0xd0| 00 00 | .. | preset: 0
|
||||
0xd0| 00 00 02 57 | ...W | length: 599
|
||||
0xd0| 62 f0 | b. | music_crc: 25328
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093
|
||||
"dv"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].xing{}: (xing) 0x42-0xdd.7 (156)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].tags{}: (mp3_frame_tags) 0x42-0xdd.7 (156)
|
||||
0x40| 49 6e 66 6f | Info | header: "Info" 0x42-0x45.7 (4)
|
||||
| | | present_flags{}: 0x46-0x49.7 (4)
|
||||
0x40| 00 00 00 0f | .... | unused: 0 0x46-0x49.3 (3.4)
|
||||
@ -551,29 +548,28 @@ mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
0xb0| ff | . | [98]: 255 entry 0xb4-0xb4.7 (1)
|
||||
0xb0| ff | . | [99]: 255 entry 0xb5-0xb5.7 (1)
|
||||
0xb0| 00 00 00 00 | .... | quality: 0 0xb6-0xb9.7 (4)
|
||||
| | | lame_extension{}: 0xba-0xdd.7 (36)
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91" 0xba-0xc2.7 (9)
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91" 0xba-0xc2.7 (9)
|
||||
0xc0|2e 39 31 |.91 |
|
||||
0xc0| 00 | . | tag_revision: 0 0xc3-0xc3.3 (0.4)
|
||||
0xc0| 00 | . | vbr_method: 0 0xc3.4-0xc3.7 (0.4)
|
||||
0xc0| 00 | . | lowpass_filter: 0 0xc4-0xc4.7 (1)
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0 0xc5-0xc8.7 (4)
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0 0xc9-0xca.7 (2)
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0 0xcb-0xcc.7 (2)
|
||||
0xc0| 00 | . | lame_flags: 0 0xcd-0xcd.3 (0.4)
|
||||
0xc0| 00 | . | lame_ath_type: 0 0xcd.4-0xcd.7 (0.4)
|
||||
0xc0| 00 | . | abr_vbr: 0 0xce-0xce.7 (1)
|
||||
0xc0| 24| $| encoder_delay: 576 0xcf-0xd0.3 (1.4)
|
||||
0xc0| 00 | . | tag_revision: 0 0xc3-0xc3.3 (0.4)
|
||||
0xc0| 00 | . | vbr_method: 0 0xc3.4-0xc3.7 (0.4)
|
||||
0xc0| 00 | . | lowpass_filter: 0 0xc4-0xc4.7 (1)
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0 0xc5-0xc8.7 (4)
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0 0xc9-0xca.7 (2)
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0 0xcb-0xcc.7 (2)
|
||||
0xc0| 00 | . | lame_flags: 0 0xcd-0xcd.3 (0.4)
|
||||
0xc0| 00 | . | lame_ath_type: 0 0xcd.4-0xcd.7 (0.4)
|
||||
0xc0| 00 | . | abr_vbr: 0 0xce-0xce.7 (1)
|
||||
0xc0| 24| $| encoder_delay: 576 0xcf-0xd0.3 (1.4)
|
||||
0xd0|05 |. |
|
||||
0xd0|05 07 |.. | encoder_padding: 1287 0xd0.4-0xd1.7 (1.4)
|
||||
0xd0| 00 | . | misc: 0 0xd2-0xd2.7 (1)
|
||||
0xd0| 00 | . | mp3_gain: 0 0xd3-0xd3.7 (1)
|
||||
0xd0| 00 00 | .. | preset: 0 0xd4-0xd5.7 (2)
|
||||
0xd0| 00 00 02 57 | ...W | length: 599 0xd6-0xd9.7 (4)
|
||||
0xd0| 62 f0 | b. | music_crc: 25328 0xda-0xdb.7 (2)
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093 0xdc-0xdd.7 (2)
|
||||
0xd0|05 07 |.. | encoder_padding: 1287 0xd0.4-0xd1.7 (1.4)
|
||||
0xd0| 00 | . | misc: 0 0xd2-0xd2.7 (1)
|
||||
0xd0| 00 | . | mp3_gain: 0 0xd3-0xd3.7 (1)
|
||||
0xd0| 00 00 | .. | preset: 0 0xd4-0xd5.7 (2)
|
||||
0xd0| 00 00 02 57 | ...W | length: 599 0xd6-0xd9.7 (4)
|
||||
0xd0| 62 f0 | b. | music_crc: 25328 0xda-0xdb.7 (2)
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093 0xdc-0xdd.7 (2)
|
||||
"ddv"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].xing{}: (xing) 0x42-0xdd.7 (156)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.frames[0].tags{}: (mp3_frame_tags) 0x42-0xdd.7 (156)
|
||||
0x40| 49 6e 66 6f | Info | header: "Info" 0x42-0x45.7 (4)
|
||||
| | | present_flags{}: 0x46-0x49.7 (4)
|
||||
0x40| 00 00 00 0f | .... | unused: 0 0x46-0x49.3 (3.4)
|
||||
@ -686,27 +682,26 @@ mp3> .frames[0].xing | "d", d, "da", da, "dd", dd, "dv", dv, "ddv", ddv
|
||||
0xb0| ff | . | [98]: 255 entry 0xb4-0xb4.7 (1)
|
||||
0xb0| ff | . | [99]: 255 entry 0xb5-0xb5.7 (1)
|
||||
0xb0| 00 00 00 00 | .... | quality: 0 0xb6-0xb9.7 (4)
|
||||
| | | lame_extension{}: 0xba-0xdd.7 (36)
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91" 0xba-0xc2.7 (9)
|
||||
0xb0| 4c 61 76 63 35 38| Lavc58| encoder: "Lavc58.91" 0xba-0xc2.7 (9)
|
||||
0xc0|2e 39 31 |.91 |
|
||||
0xc0| 00 | . | tag_revision: 0 0xc3-0xc3.3 (0.4)
|
||||
0xc0| 00 | . | vbr_method: 0 0xc3.4-0xc3.7 (0.4)
|
||||
0xc0| 00 | . | lowpass_filter: 0 0xc4-0xc4.7 (1)
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0 0xc5-0xc8.7 (4)
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0 0xc9-0xca.7 (2)
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0 0xcb-0xcc.7 (2)
|
||||
0xc0| 00 | . | lame_flags: 0 0xcd-0xcd.3 (0.4)
|
||||
0xc0| 00 | . | lame_ath_type: 0 0xcd.4-0xcd.7 (0.4)
|
||||
0xc0| 00 | . | abr_vbr: 0 0xce-0xce.7 (1)
|
||||
0xc0| 24| $| encoder_delay: 576 0xcf-0xd0.3 (1.4)
|
||||
0xc0| 00 | . | tag_revision: 0 0xc3-0xc3.3 (0.4)
|
||||
0xc0| 00 | . | vbr_method: 0 0xc3.4-0xc3.7 (0.4)
|
||||
0xc0| 00 | . | lowpass_filter: 0 0xc4-0xc4.7 (1)
|
||||
0xc0| 00 00 00 00 | .... | replay_gain_peak: 0 0xc5-0xc8.7 (4)
|
||||
0xc0| 00 00 | .. | radio_replay_gain: 0 0xc9-0xca.7 (2)
|
||||
0xc0| 00 00 | .. | audiophile_replay_gain: 0 0xcb-0xcc.7 (2)
|
||||
0xc0| 00 | . | lame_flags: 0 0xcd-0xcd.3 (0.4)
|
||||
0xc0| 00 | . | lame_ath_type: 0 0xcd.4-0xcd.7 (0.4)
|
||||
0xc0| 00 | . | abr_vbr: 0 0xce-0xce.7 (1)
|
||||
0xc0| 24| $| encoder_delay: 576 0xcf-0xd0.3 (1.4)
|
||||
0xd0|05 |. |
|
||||
0xd0|05 07 |.. | encoder_padding: 1287 0xd0.4-0xd1.7 (1.4)
|
||||
0xd0| 00 | . | misc: 0 0xd2-0xd2.7 (1)
|
||||
0xd0| 00 | . | mp3_gain: 0 0xd3-0xd3.7 (1)
|
||||
0xd0| 00 00 | .. | preset: 0 0xd4-0xd5.7 (2)
|
||||
0xd0| 00 00 02 57 | ...W | length: 599 0xd6-0xd9.7 (4)
|
||||
0xd0| 62 f0 | b. | music_crc: 25328 0xda-0xdb.7 (2)
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093 0xdc-0xdd.7 (2)
|
||||
0xd0|05 07 |.. | encoder_padding: 1287 0xd0.4-0xd1.7 (1.4)
|
||||
0xd0| 00 | . | misc: 0 0xd2-0xd2.7 (1)
|
||||
0xd0| 00 | . | mp3_gain: 0 0xd3-0xd3.7 (1)
|
||||
0xd0| 00 00 | .. | preset: 0 0xd4-0xd5.7 (2)
|
||||
0xd0| 00 00 02 57 | ...W | length: 599 0xd6-0xd9.7 (4)
|
||||
0xd0| 62 f0 | b. | music_crc: 25328 0xda-0xdb.7 (2)
|
||||
0xd0| 5a 35 | Z5 | tag_crc: 23093 0xdc-0xdd.7 (2)
|
||||
mp3> ^D
|
||||
$ fq -n '"broken" | mp3 | d'
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.{}: (mp3)
|
||||
|
8
pkg/interp/testdata/gojq.fqtest
vendored
8
pkg/interp/testdata/gojq.fqtest
vendored
@ -210,7 +210,7 @@ $ fq -d mp3 '.frames[0] | . + .header | keys, .bitrate' test.mp3
|
||||
"sample_rate",
|
||||
"side_info",
|
||||
"sync",
|
||||
"xing"
|
||||
"tags"
|
||||
]
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x20| 40| @|.frames[0].header.bitrate: 56000 (4)
|
||||
@ -234,7 +234,7 @@ $ fq -d mp3 '[.frames[0] | ., .header] | add | keys, .bitrate' test.mp3
|
||||
"sample_rate",
|
||||
"side_info",
|
||||
"sync",
|
||||
"xing"
|
||||
"tags"
|
||||
]
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x20| 40| @|.frames[0].header.bitrate: 56000 (4)
|
||||
@ -243,14 +243,14 @@ $ fq -d mp3 '.frames[0] | keys' test.mp3
|
||||
[
|
||||
"header",
|
||||
"side_info",
|
||||
"xing",
|
||||
"tags",
|
||||
"audio_data",
|
||||
"crc_calculated"
|
||||
]
|
||||
$ fq -d mp3 '.frames[0] | to_entries[].key' test.mp3
|
||||
"header"
|
||||
"side_info"
|
||||
"xing"
|
||||
"tags"
|
||||
"audio_data"
|
||||
"crc_calculated"
|
||||
# xml, csv does string normalization, make sure it works with nested JQValue:s
|
||||
|
6
pkg/interp/testdata/grep.fqtest
vendored
6
pkg/interp/testdata/grep.fqtest
vendored
@ -17,7 +17,7 @@ mp3> grep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].xing.header: "Info"
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].tags.header: "Info"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
mp3> vgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
|
||||
@ -34,7 +34,7 @@ mp3> vgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x4
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].xing.header: "Info"
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].tags.header: "Info"
|
||||
mp3> fgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x44])
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
@ -50,7 +50,7 @@ mp3> bgrep(44100, "ID", "^ID3$", "^ID.?$", "Info", "magic", "\u00ff", [0x49, 0x4
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].xing.header: "Info"
|
||||
0x40| 49 6e 66 6f | Info |.frames[0].tags.header: "Info"
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (valid)
|
||||
mp3> "64ff65ff66" | fromhex | bgrep("\u00ff"; "b")
|
||||
|
2
pkg/interp/testdata/slurp.fqtest
vendored
2
pkg/interp/testdata/slurp.fqtest
vendored
@ -94,7 +94,7 @@ mp3> $f[]
|
||||
0x30| 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00| ...............| side_info{}:
|
||||
0x40|00 00 |.. |
|
||||
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|
|
||||
0x40| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| xing{}: (xing)
|
||||
0x40| 49 6e 66 6f 00 00 00 0f 00 00 00 02 00 00| Info..........| tags{}: (mp3_frame_tags)
|
||||
0x50|02 57 00 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6 a6|.W..............|
|
||||
* |until 0xdd.7 (156) | |
|
||||
0xd0| 00 00| ..| audio_data: raw bits
|
||||
|
84
pkg/interp/testdata/value_array.fqtest
vendored
84
pkg/interp/testdata/value_array.fqtest
vendored
@ -254,30 +254,22 @@ mp3> .headers[0] = 1
|
||||
"scfsi0": 0,
|
||||
"share": 0
|
||||
},
|
||||
"xing": {
|
||||
"tags": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"bytes": 599,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"frames": 2,
|
||||
"header": "Info",
|
||||
"lame_extension": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"preset": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"vbr_method": 0
|
||||
},
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"present_flags": {
|
||||
"bytes": true,
|
||||
"frames": true,
|
||||
@ -285,7 +277,12 @@ mp3> .headers[0] = 1
|
||||
"toc": true,
|
||||
"unused": 0
|
||||
},
|
||||
"preset": 0,
|
||||
"quality": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"toc": [
|
||||
0,
|
||||
166,
|
||||
@ -387,7 +384,8 @@ mp3> .headers[0] = 1
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
],
|
||||
"vbr_method": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -589,30 +587,22 @@ mp3> .headers[0] |= empty
|
||||
"scfsi0": 0,
|
||||
"share": 0
|
||||
},
|
||||
"xing": {
|
||||
"tags": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"bytes": 599,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"frames": 2,
|
||||
"header": "Info",
|
||||
"lame_extension": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"preset": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"vbr_method": 0
|
||||
},
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"present_flags": {
|
||||
"bytes": true,
|
||||
"frames": true,
|
||||
@ -620,7 +610,12 @@ mp3> .headers[0] |= empty
|
||||
"toc": true,
|
||||
"unused": 0
|
||||
},
|
||||
"preset": 0,
|
||||
"quality": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"toc": [
|
||||
0,
|
||||
166,
|
||||
@ -722,7 +717,8 @@ mp3> .headers[0] |= empty
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
],
|
||||
"vbr_method": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
84
pkg/interp/testdata/value_object.fqtest
vendored
84
pkg/interp/testdata/value_object.fqtest
vendored
@ -172,30 +172,22 @@ mp3> .headers[0].flags.a = 1
|
||||
"scfsi0": 0,
|
||||
"share": 0
|
||||
},
|
||||
"xing": {
|
||||
"tags": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"bytes": 599,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"frames": 2,
|
||||
"header": "Info",
|
||||
"lame_extension": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"preset": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"vbr_method": 0
|
||||
},
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"present_flags": {
|
||||
"bytes": true,
|
||||
"frames": true,
|
||||
@ -203,7 +195,12 @@ mp3> .headers[0].flags.a = 1
|
||||
"toc": true,
|
||||
"unused": 0
|
||||
},
|
||||
"preset": 0,
|
||||
"quality": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"toc": [
|
||||
0,
|
||||
166,
|
||||
@ -305,7 +302,8 @@ mp3> .headers[0].flags.a = 1
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
],
|
||||
"vbr_method": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -541,30 +539,22 @@ mp3> .headers[0].flags.a |= empty
|
||||
"scfsi0": 0,
|
||||
"share": 0
|
||||
},
|
||||
"xing": {
|
||||
"tags": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"bytes": 599,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"frames": 2,
|
||||
"header": "Info",
|
||||
"lame_extension": {
|
||||
"abr_vbr": 0,
|
||||
"audiophile_replay_gain": 0,
|
||||
"encoder": "Lavc58.91",
|
||||
"encoder_delay": 576,
|
||||
"encoder_padding": 1287,
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"preset": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"vbr_method": 0
|
||||
},
|
||||
"lame_ath_type": 0,
|
||||
"lame_flags": 0,
|
||||
"length": 599,
|
||||
"lowpass_filter": 0,
|
||||
"misc": 0,
|
||||
"mp3_gain": 0,
|
||||
"music_crc": 25328,
|
||||
"present_flags": {
|
||||
"bytes": true,
|
||||
"frames": true,
|
||||
@ -572,7 +562,12 @@ mp3> .headers[0].flags.a |= empty
|
||||
"toc": true,
|
||||
"unused": 0
|
||||
},
|
||||
"preset": 0,
|
||||
"quality": 0,
|
||||
"radio_replay_gain": 0,
|
||||
"replay_gain_peak": 0,
|
||||
"tag_crc": 23093,
|
||||
"tag_revision": 0,
|
||||
"toc": [
|
||||
0,
|
||||
166,
|
||||
@ -674,7 +669,8 @@ mp3> .headers[0].flags.a |= empty
|
||||
255,
|
||||
255,
|
||||
255
|
||||
]
|
||||
],
|
||||
"vbr_method": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user