mirror of
https://github.com/panzi/mediaextract
synced 2025-02-19 22:26:54 +00:00
1 line
6.9 KiB
JSON
1 line
6.9 KiB
JSON
|
{"note":"Don't delete this file! It's used internally to help with page regeneration.","name":"Mediaextract","tagline":"Extracts media files (AVI, Ogg, Wave, PNG, ...) that are embedded within other files.","body":"Mediaextract\r\n============\r\n\r\nExtract media files that are embedded within other files.\r\n\r\nSetup\r\n-----\r\n\r\n\tmake builddir\r\n\tmake\r\n\tsudo make install PREFIX=/usr\r\n\r\nCross compile for Windows (uses `i686-pc-mingw32-gcc`):\r\n\r\n\tmake TARGET=win32 builddir\r\n\tmake TARGET=win32\r\n\r\nOr (uses `x86_64-w64-mingw32-gcc`):\r\n\r\n\tmake TARGET=win64 builddir\r\n\tmake TARGET=win64\r\n\r\n**Warning:** This program only works correctly on platforms that allow unaligned\r\nmemory access (e.g. x86 and ARM, although it might be quite slow on the latter).\r\n\r\n**Note:** 32bit binaries can only process 2 GB of a file at once. The rest of\r\nbigger files will be ignored. You need to run this program several times with\r\ndifferent `--offset` values to process such a file whole.\r\n\r\nThis also means that using a 32bit binary extracted files can never be larger\r\nthan 2 GB.\r\n\r\nThis is because `mediaextract` uses `mmap` to read files, wich maps files to\r\nmemory. On 32bit platforms the address space of the main memory is simply not\r\nbig enough. 64bit binaries can read up to 8 EB (8 Exabytes) at once.\r\n\r\nUsage\r\n-----\r\n\r\n\tmediaextract [option...] <filename> [<filename> ...]\r\n\r\n### Examples\r\n\r\nExtract .wav, .aif and .ogg (might actually be .ogg, .opus or .ogm) files from\r\nthe file `data.bin` and store them in the `~/Music` directory.\r\n\r\n\tmediaextract -f riff,aiff,ogg -o ~/Music data.bin\r\n\r\nThis will then write files like such into `~/Music`:\r\n\r\n\tdata.bin_00000000.ogg\r\n\tdata.bin_00FFB2E3.wav\r\n\tdata.bin_01F3CD45.aif\r\n\r\nThe hexadecimal number in the written file names give the offset where in the\r\ndata file the audio file was found.\r\n\r\nExtract .mp3, .mp2 and .mp1 files (with or without ID3v2 tags). The `mpg123`\r\noption yields a lot of false positives because there is no nice way to\r\nunambigiously detect MPEG files. These false positives are however usually very\r\nsmall, so using the `--min-size` option one can hopefully extract only real MPEG\r\nfiles.\r\n\r\n\tmediaextract -f id3v2,mpg123 --min-size=100k -o ~/Music data.bin\r\n\r\n### Options\r\n\r\n\t-h, --help Print this help message.\r\n\t-q, --quiet Do not print status messages.\r\n\t-s, --simulate Don't write any output files.\r\n\t-o, --output=DIR Directory where extracted files should be written. (default: \".\")\r\n\t-i, --offset=OFFSET Start processing at byte OFFSET. (default: 0)\r\n\t-n, --length=LENGTH Only process LENGTH bytes.\r\n\t (default and maximum: 8 EB)\r\n\t-m, --min-size=SIZE Minumum size of extracted files (skip smaller). (default: 0)\r\n\t-x, --max-size=SIZE Maximum size of extracted files (skip larger).\r\n\t (default and maximum: 16 EB)\r\n\r\n\t The last character of OFFSET, LENGTH and SIZE may be one of the\r\n\t following:\r\n\t B (or none) for Bytes\r\n\t k for Kilobytes (units of 1024 Bytes)\r\n\t M for Megabytes (units of 1024 Kilobytes)\r\n\t G for Gigabytes (units of 1024 Megabytes)\r\n\t T for Terabytes (units of 1024 Gigabytes)\r\n\t P for Petabytes (units of 1024 Terabytes)\r\n\t E for Exabytes (units of 1024 Petabytes)\r\n\r\n\t The special value \"max\" selects the maximum alowed value.\r\n\r\n\t-f, --formats=FORMATS Comma separated list of formats (file magics) to extract.\r\n\r\n\t Supported formats:\r\n\t all all supported formats\r\n\t default the default set of formats (AIFF, A
|