2022-10-29 20:23:50 +03:00
|
|
|
$ fq -h avi
|
|
|
|
avi: Audio Video Interleaved decoder
|
|
|
|
|
|
|
|
Options
|
|
|
|
=======
|
|
|
|
|
2023-10-12 16:48:36 +03:00
|
|
|
decode_extended_chunks=true Decode extended chunks
|
|
|
|
decode_samples=true Decode samples
|
2022-10-29 20:23:50 +03:00
|
|
|
|
|
|
|
Decode examples
|
|
|
|
===============
|
|
|
|
|
|
|
|
# Decode file as avi
|
|
|
|
$ fq -d avi . file
|
|
|
|
# Decode value as avi
|
|
|
|
... | avi
|
|
|
|
# Decode file using avi options
|
2023-10-12 16:48:36 +03:00
|
|
|
$ fq -d avi -o decode_extended_chunks=true -o decode_samples=true . file
|
2022-10-29 20:23:50 +03:00
|
|
|
# Decode value as avi
|
2023-10-12 16:48:36 +03:00
|
|
|
... | avi({decode_extended_chunks:true,decode_samples:true})
|
2022-10-29 20:23:50 +03:00
|
|
|
|
|
|
|
Samples
|
|
|
|
=======
|
2022-11-29 20:59:28 +03:00
|
|
|
AVI has many redundant ways to index samples so currently .streams[].samples will only include samples the most "modern" way used in
|
|
|
|
the file. That is in order of stream super index, movi ix index then idx1 index.
|
2022-10-29 20:23:50 +03:00
|
|
|
|
|
|
|
Extract samples for stream 1
|
|
|
|
============================
|
|
|
|
$ fq '.streams[1].samples[] | tobytes' file.avi > stream01.mp3
|
2023-03-03 01:18:31 +03:00
|
|
|
|
2022-10-29 20:23:50 +03:00
|
|
|
Show stream summary
|
|
|
|
===================
|
|
|
|
$ fq -o decode_samples=false '[.chunks[0] | grep_by(.id=="LIST" and .type=="strl") | grep_by(.id=="strh") as {$type} | grep_by(.id=="strf") as {$format_tag, $compression} | {$type,$format_tag,$compression}]' *.avi
|
2023-03-03 01:18:31 +03:00
|
|
|
|
2023-10-12 16:48:36 +03:00
|
|
|
Speed up decoding by disabling sample and extended chunks decoding
|
|
|
|
==================================================================
|
|
|
|
If your not interested in sample details or extended chunks you can speed up decoding by using:
|
|
|
|
|
|
|
|
$ fq -o decode_samples=false -o decode_extended_chunks=false d file.avi
|
|
|
|
|
2022-10-29 20:23:50 +03:00
|
|
|
References
|
|
|
|
==========
|
|
|
|
- AVI RIFF File Reference (https://learn.microsoft.com/en-us/windows/win32/directshow/avi-riff-file-reference)
|
|
|
|
- OpenDML AVI File Format Extensions (http://www.jmcgowan.com/odmlff2.pdf)
|