1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 00:57:15 +03:00
fq/format/riff/testdata/help_avi.fqtest
Mattias Wadman d703321a7a avi: Add extended chunks support and option
This is used for >1gb files. Disable decode will speed up
deocde a lot but will probably also produce some gaps as same
part of the movi chunks will not be reference by the indx index.
2023-10-20 15:55:19 +02:00

45 lines
1.6 KiB
Plaintext

$ fq -h avi
avi: Audio Video Interleaved decoder
Options
=======
decode_extended_chunks=true Decode extended chunks
decode_samples=true Decode samples
Decode examples
===============
# Decode file as avi
$ fq -d avi . file
# Decode value as avi
... | avi
# Decode file using avi options
$ fq -d avi -o decode_extended_chunks=true -o decode_samples=true . file
# Decode value as avi
... | avi({decode_extended_chunks:true,decode_samples:true})
Samples
=======
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.
Extract samples for stream 1
============================
$ fq '.streams[1].samples[] | tobytes' file.avi > stream01.mp3
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
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
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)