1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
fq/format/mp4/testdata/path.fqtest
Mattias Wadman c93301fc70 raw,bits,bytes: Replace raw format with bits and bytes format that decode to a binary
raw format was a hack to skip decoding to be able to get a binary using tobyte etc.
Now you can do fq -d bytes ... instead of fq -d raw 'tobytes | ...'
2022-11-20 19:51:12 +01:00

21 lines
977 B
Plaintext

$ fq -d mp4 'mp4_path(".moov.trak[1]")' fragmented.mp4
|00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f|0123456789abcdef|.boxes[1].boxes[2]{}: box
0x280| 00 00 01 bf | .... | size: 447
0x280| 74 72 61 6b | trak | type: "trak" (Container for an individual track or stream)
0x280| 00 00 00 5c| ...\| boxes[0:2]:
0x290|74 6b 68 64 00 00 00 03 00 00 00 00 00 00 00 00|tkhd............|
* |until 0x442.7 (439) | |
$ fq -d mp4 'mp4_path(".moov.trak[1]") | mp4_path' fragmented.mp4
".moov.trak[1]"
$ fq -d mp4 'mp4_path(mp4_path(".moov.trak[1]"))' fragmented.mp4
".moov.trak[1]"
# TODO: use some test format
$ fq -n '"a" | mp3_frame | mp4_path(".moov")'
exitcode: 5
stderr:
error: not mp4 format
$ fq -n '1 | mp4_path(".moov")'
exitcode: 5
stderr:
error: expected decode value but got: number (1)