2012-12-28 01:00:35 +00:00
|
|
|
Audioextract
|
|
|
|
============
|
|
|
|
|
|
|
|
Extract audio files that are embedded within other files.
|
|
|
|
|
2012-12-28 17:23:27 +00:00
|
|
|
Setup
|
|
|
|
-----
|
|
|
|
|
|
|
|
make
|
|
|
|
make install PREFIX=/usr
|
|
|
|
|
2013-01-03 06:18:44 +00:00
|
|
|
Cross compile for Windows:
|
|
|
|
|
2013-01-03 06:24:12 +00:00
|
|
|
make TARGET=win32
|
2013-01-03 06:18:44 +00:00
|
|
|
|
|
|
|
Or:
|
|
|
|
|
2013-01-03 06:24:12 +00:00
|
|
|
make TARGET=win64
|
2013-01-03 06:18:44 +00:00
|
|
|
|
|
|
|
Note that 32bit binaries can only read files up to about 4 GB
|
|
|
|
because of memory limitations of the 32bit address space. 64bit
|
|
|
|
binaries can read up to about 16 EB (16 Exabyte).
|
|
|
|
|
2012-12-28 01:00:35 +00:00
|
|
|
Usage
|
|
|
|
-----
|
|
|
|
|
2012-12-28 03:43:07 +00:00
|
|
|
audioextract [option...] <filename> [<filename> ...]
|
2012-12-28 01:00:35 +00:00
|
|
|
|
2012-12-28 03:47:37 +00:00
|
|
|
### Examples
|
|
|
|
|
2012-12-28 03:56:02 +00:00
|
|
|
Extract .wav, .aif and .ogg (might actually be .flac, .opus or .ogm) files from
|
|
|
|
the file `data.bin` and store them in the `~/Music` directory.
|
2012-12-28 03:47:37 +00:00
|
|
|
|
|
|
|
audioextract -f wave,ogg -o ~/Music data.bin
|
|
|
|
|
2012-12-31 20:02:57 +00:00
|
|
|
This will then write files like such into `~/Music`:
|
|
|
|
|
|
|
|
data.bin_00000000.ogg
|
|
|
|
data.bin_00FFB2E3.wav
|
|
|
|
data.bin_01F3CD45.aif
|
|
|
|
|
|
|
|
The hexadecimal number in the written file names give the offset where in the
|
|
|
|
data file the audio file was found.
|
|
|
|
|
2012-12-29 16:50:22 +00:00
|
|
|
Extract .mp3, .mp2 and .mp1 files (with or without ID3v2 tags). The `mpg123`
|
|
|
|
option yields a lot of false positives because there is no nice way to
|
|
|
|
unambigiously detect MPEG files. These false positives are however usually very
|
|
|
|
small, so using the `--min-size` one can hopefully extract only real MPEG files.
|
2012-12-28 03:56:02 +00:00
|
|
|
|
2012-12-29 16:50:22 +00:00
|
|
|
audioextract -f id3v2,mpg123 --min-size 100k -o ~/Music data.bin
|
2012-12-28 03:56:02 +00:00
|
|
|
|
2012-12-28 01:00:35 +00:00
|
|
|
### Options
|
|
|
|
|
|
|
|
-h, --help Print this help message.
|
2012-12-28 03:43:07 +00:00
|
|
|
-q, --quiet Do not print status messages.
|
2012-12-28 01:00:35 +00:00
|
|
|
-f, --formats=FORMATS Comma separated list of formats (file magics) to extract.
|
2012-12-31 20:02:57 +00:00
|
|
|
|
2012-12-28 01:00:35 +00:00
|
|
|
Supported formats:
|
2012-12-28 03:43:07 +00:00
|
|
|
all all supported formats
|
2013-01-01 05:41:01 +00:00
|
|
|
default the default set of formats (AIFF, ASF, BINK, ID3v2, IT,
|
2013-01-02 03:31:45 +00:00
|
|
|
MIDI, MP4, Ogg, RIFF, S3M, XM)
|
2012-12-28 03:43:07 +00:00
|
|
|
aiff big-endian (Apple) wave files
|
2012-12-31 20:02:57 +00:00
|
|
|
asf Advanced Systems Format files (also WMA and WMV)
|
2013-01-01 05:41:01 +00:00
|
|
|
bink BINK files
|
2013-01-01 02:27:33 +00:00
|
|
|
id3v2 MPEG layer 1/2/3 files with ID3v2 tags
|
2012-12-29 05:31:30 +00:00
|
|
|
it ImpulseTracker files
|
2012-12-28 17:23:27 +00:00
|
|
|
midi MIDI files
|
2012-12-29 05:31:30 +00:00
|
|
|
mod FastTracker files
|
2013-01-01 02:27:33 +00:00
|
|
|
mpg123 MPEG layer 1/2/3 files (MP1, MP2, MP3)
|
2012-12-31 20:02:57 +00:00
|
|
|
mp4 MP4 files (M4A, M4V, 3GPP etc.)
|
2013-01-03 06:18:44 +00:00
|
|
|
ogg Ogg files (Vorbis, Opus, Theora, etc.)
|
2013-01-01 02:27:33 +00:00
|
|
|
riff Resource Interchange File Format files (ANI, AVI, MMM,
|
|
|
|
PAL, RDI, RMI, WAV)
|
2012-12-29 06:53:46 +00:00
|
|
|
s3m ScreamTracker III files
|
2013-01-02 03:31:45 +00:00
|
|
|
xm Extended Module files
|
|
|
|
tracker all tracker files (MOD, S3M, IT, XM)
|
2012-12-28 01:00:35 +00:00
|
|
|
|
2012-12-29 16:50:22 +00:00
|
|
|
WARNING: Because MP1/2/3 files do not have a nice file magic, using
|
|
|
|
the 'mpg123' format may cause *a lot* of false positives. Nowadays
|
2012-12-28 01:00:35 +00:00
|
|
|
MP3 files usually have an ID3v2 tag at the start, so using the
|
|
|
|
'id3v2' format is the better option anyway.
|
|
|
|
|
2012-12-29 06:53:46 +00:00
|
|
|
The detection accuracy of MOD files is not much better and thus
|
2013-01-01 02:27:33 +00:00
|
|
|
they are also per default disabled.
|
2012-12-29 06:53:46 +00:00
|
|
|
|
2012-12-29 16:50:22 +00:00
|
|
|
NOTE: When using only the 'mpg123' format but not 'id3v2' any ID3v2
|
2012-12-28 01:00:35 +00:00
|
|
|
tag will be stripped. ID3v1 tags will still be kept.
|
|
|
|
|
|
|
|
If '-' is written before a format name the format will be
|
|
|
|
removed from the set of formats to extract. E.g. extract
|
2013-01-01 02:27:33 +00:00
|
|
|
everything except tracker files:
|
2012-12-28 01:00:35 +00:00
|
|
|
|
2013-01-01 02:27:33 +00:00
|
|
|
audioextract --formats=all,-tracker data.bin
|
2012-12-28 01:00:35 +00:00
|
|
|
|
|
|
|
-o, --output=DIR Directory where extracted files should be written. (default: ".")
|
2012-12-28 04:46:44 +00:00
|
|
|
-m, --min-size=SIZE Minumum size of extracted files (skip smaller). (default: 0)
|
|
|
|
-x, --max-size=SIZE Maximum size of extracted files (skip larger).
|
2012-12-28 03:43:07 +00:00
|
|
|
(default: max. possible size_t value)
|
|
|
|
|
|
|
|
The last character of SIZE may be one of the following:
|
|
|
|
B (or none) for bytes
|
|
|
|
k for Kilobytes (units of 1024 bytes)
|
|
|
|
M for Megabytes (units of 1024 Kilobytes)
|
|
|
|
G for Gigabytes (units of 1024 Megabytes)
|
|
|
|
T for Terabytes (units of 1024 Gigabytes)
|