RAWcooked - encode and decode audio-visual RAW data with Matroska,
FFV1 and FLAC
rawcooked [
option ...] (
folder |
file ...)
[
option ...]
- RAWcooked easily encodes RAW audio-visual sequences into a lossless
video stream, reducing the file size by between one and two thirds. FFmpeg
encodes the audio-visual data into a Matroska container (.mkv) using the
video codec FFV1, and audio codec FLAC. The metadata accompanying the RAW
data is fully preserved, along with additional sidecar files such as MD5
checksums, LUT or XML if desired. This allows for the management of these
audio-visual file formats in an effective and transparent way. The
lossless Matroska video stream can be played in VLC or MPV media players,
and writing and retrieving from storage devices such as LTO is
significantly quicker.
- If you need to use the RAW source in its original form, one line of code
will easily restore it bit-by-bit, faster than retrieving the same
file from LTO tape storage.
- folder
- Every image file within the sequence's folder is encoded into a
single FFV1 video stream, and each audio track within the same
folder is encoded to the FLAC codec. Both the FFV1 and FLAC
contents are then muxed into a single Matroska container (.mkv).
The image filenames must end in a complete number sequence, so that
RAWcooked can parse each image within the sequence in the correct
order.
- file
- contains RAW data (e.g. a .dpx or .wav file):
Every image within a sequence folder containing the file is encoded
into a single FFV1 video stream, and each audio track within the folder
containing the same file is encoded to the FLAC codec. Both the
FFV1 and FLAC contents are then muxed into a single Matroska container
(.mkv).
The image filenames must end in a complete number sequence. By entering
one file within this sequence RAWcooked will parse every
image in the correct order.
- file
- is a Matroska container (.mkv):
Decodes the Matroska file back to the original RAW image sequence,
including restoration of the original metadata and sidecar files. It is
important to stress that the encoded files can be fully decoded, and that
this process will create bit-by-bit identical files to the originals. Not
only is the image and audio content fully restored, but also all enclosed
metadata and all of the file's characteristics. Therefore, an encoded and
decoded RAW file cannot be differentiated from its original.
- --help | -h
- Displays the help guide.
- --help-edit
- Displays the help guide for edit options.
- --version
- Tells you which installed version you are using.
- --store-license value
- Set the license key to value and store on hard drive.
(License is stored in ~/.config/RAWcooked/Config.txt on Linux/Mac,
%APPDATA%/RAWcooked/Config.txt on Windows)
- --show-license
- Displays information about the installed license.
- --sublicense value
- Output a license for a sub-licensee with ID value.
- --sublicense-dur value
- Duration of the sublicense, in months. End date is the last day of the
month.
The default value is 1.
- --attachment-max-size value | -s value
- Set maximum size of attachments to value (in bytes).
The default value is 1048576.
- --display-command | -d
- When an external encoder/decoder is used, display the command to launch
instead of just launching it.
- --output-name value | -o value
- Set the name of the output file or folder to value.
The default output value is opposite to the input. Expect
${Input}.mkv if the input is a folder, or ${Input}.RAWcooked
if input is a file, such as a DPX.
- --compute-output-hash
- Compute the hash of the output file while checking it.
- --output-version value
- Set the version of the output.
The default output value is 1.
Other possible value is 2. This is a preview release, this value
should be used used only when you know why you do it.
- --bin-name value | -b value
- Indicate the name of the encoder to use to value.
The default value is ffmpeg-ma in the directory of the executable,
in its ffmpeg, ffmpeg/lib or ffmpeg/bin subdirectory or in PATH, else
ffmpeg in the same directories.
If value is the name of a libavcodec library (e.g.
libavcodec.62.dylib, libavcodec.so.62 or avcodec-62.dll), it is the
library used by the ffmpeg and vulkan decoders instead of
the searched one, so the option may be used twice (encoder and library).
- --rawcooked-file-name value | -r value
- Set during encoding, or retrieve by decoding, the name of the
RAWcooked reversibility data file to value.
The default name is ${Input}.rawcooked_reversibility_data.
Note: This file is deleted after encoding if the RAWcooked
reversibility data file is embedded in the output Matroska wrapper during
encoding.
Note: Not yet implemented for decoding.
- --decoder value
- Set the FFV1 decoder used for decoding and checking to value.
Possible values are internal (RAWcooked decoder), ffmpeg
(FFmpeg libavcodec decoder), vulkan (FFmpeg libavcodec decoder with
Vulkan hardware decoding on the default Vulkan device, vulkanN on
the Vulkan device N, e.g. vulkan1 on the second device), a
combination of them with + (internal+ffmpeg,
internal+vulkan, ffmpeg+vulkan,
internal+ffmpeg+vulkan, internal+vulkan0+vulkan1...:
decoders in parallel, each frame is decoded by the first available
decoder; a device twice e.g. internal+vulkan+vulkan: 2 vulkan
decoders on the same device, faster with big GPUs) and auto
(internal and vulkan on each discrete GPU, else on the first
GPU, if FFmpeg libraries and a Vulkan GPU are available, with a second
vulkan decoder on NVIDIA GPUs with at least 64 streaming multiprocessors,
else internal).
Values with vulkan use any Vulkan device, including a CPU
implementation (e.g. lavapipe), auto uses a CPU implementation only
if the video encoder is ffv1_vulkan. Values with ffmpeg or
vulkan need FFmpeg libavcodec and libavutil libraries, searched in
the directory of the executable, in its ffmpeg, ffmpeg/lib and ffmpeg/bin
subdirectories, then in PATH on Windows, or in the directory of the
executable, in its ffmpeg, ffmpeg/lib and ffmpeg/bin subdirectories, then
in the library paths of the system on Linux or in Homebrew and MacPorts
library directories on macOS, libraries of the ffmpeg-ma package first,
only if available in this build.
The default value is auto if the video encoder is ffv1_vulkan, else
internal.
- --io-threads value
- Force the number of IO threads to value.
Default value is found in the system hardware concurrency, if available,
otherwise it will default to 4.
- --quiet
- Do not show information related to RAWcooked.
External encoder or decoder may need an additional option.
- --show-stats
- Show the CPU and the GPU used, and the speed of the encoding and of the
decoding, with the share of each decoder if several decoders are used in
parallel (e.g. CPU and GPU).
- -y
- Automatic yes to prompts.
Assume yes in answer to all prompts, and run non-interactively.
- -n
- Automatic no to prompts.
Assume no as answer to all prompts, and run non-interactively.
- --all
- Same as --info --conch --decode --encode --hash --coherency
--check-padding --check --accept-gaps (see below)
- --none
- Same as --no-info --no-conch --no-decode --no-encode --no-hash
--no-coherency --quick-check-padding --quick-check (see below)
- --check
- Check that the encoded file can be correctly decoded.
If input is raw content, encode then check that output would be same as
the input content.
If input is compressed content, check that output would be same as the
original content.
Disables decoding.
- --quick-check
- Run quick coherency checks of the encoded file. Allows user to check that
the file seems healthy without the additional time taken to process the
full check command.
Is ignored in case of compressed content.
This is the default, but may change in the future.
- --no-check
- Don't run any checks (see above).
This is the default, but may change in the future.
- --info
- Provides extra information about the compressed file, for example the
presence of hashes for the raw data.
Disables encoding and decoding.
- --no-info
- Don't provide extra information (see above).
This is the default, but may change in the future.
- --check-padding
- Runs padding checks for DPX files that have no zero padding. Data found in
the padding is stored in the RAWcooked reversibility file. Be aware check
function can be demanding of time and processor usage.
It is a slower process but guarantees reversibility.
- --quick-check-padding
- Switch to --check-padding or --no-check-padding depending on what is found
in the first image.
The program will stop with an error code if --check is not used at the
same time and zero-padding bits are in the content, asking to choose what
to do.
This is the default, but may change in the future.
- --no-check-padding
- Do not run padding checks, as they are demanding of time and processor
usage.
This method is quicker, but be aware it may lead to partial reversibility
with files that do no conform.
- --coherency
- Checks that the package and contents are coherent. For example, is the
audio file duration the same as the image sequence duration, or are there
gaps in the sequence numbering.
This is currently partially implemented.
This is default, but may change in the future.
- --no-coherency
- Do not carry out coherency check (see above).
- --conch
- Conformance check of the format, effective only when format is supported.
This is currently partially implemented for DPX.
Disable encoding and decoding.
- --no-conch
- Do not carry out conformance check (see above).
This is default, but may change in the future.
- --decode
- Encode a compressed stream into audio-visual RAW data.
This is default.
- --no-decode
- Do not carry out decode (see above).
- --encode
- Encode audio-visual RAW data into a compressed stream.
This is default.
- --no-encode
- Do not carry out encode (see above).
- --edit key=value
- Edit audio-visual RAW data.
Valid keys are listed by using --help-edit option.
All other features are deactivated when using this option.
- --hash
- Computes the hash of audio-visual RAW data files.
During encoding it computes a hash for each file within a source folder
and stores this within the RAWcooked reversibility metadata for comparison
during --check or --check-padding.
During decoding of a matroska with hashes in the metadata the file is
decoded and new hashes generated for the which are then tested against the
source file hashes stored in the metadata. Any issues raised by this check
is considered a decoding error. This permits a reversibility check without
the original files.
- --no-hash
- Do not compute or test the hash of the file (see above).
This is default, but may change in the future.
- --framemd5
- Compute the framemd5 of input frames and store it to a sidecar file.
See FFmpeg framemd5 documentation for more information.
- --framemd5-an
- Disable audio streams in framemd5 output.
Imply --framemd5.
- --framemd5-name value
- Set the name of the framemd5 file to value.
Imply --framemd5.
Default value is ${Input}.framemd5.
- --no-framemd5
- Do not compute the framemd5 of input frames. (see above).
Is default.
- --accept-gaps
- Use if there are missing files within the sequence numbering. RAWcooked
creates a concatenated list of all files ensuring the sequence can be
encoded.
- --no-accept-gaps
- Do not accept-gaps within the sequence numbering. FFmpeg will fail any
encoding attempts where gaps are present.
- --file
- Unlock the compression of files, for example with .dpx or .wav.
- -framerate value
- Force the video frame rate value to value.
Default frame rate value is found in the image file metadata, if
available. Otherwise it will default to 24.
- -c:a value
- Use this command to force the audio encoding format to value:
copy (for example copy PCM to PCM, without modification),
FLAC
The default value is FLAC.
- -c:v value
- Force the video encoding format value: only ffv1 is
currently allowed, which is the default value.
- -coder value
- If video encoding format is ffv1, set the Coder to value:
0 (Golomb-Rice), 1 (Range Coder), 2 (Range Coder with
custom state transition table).
The default value is 1.
- -context value
- If the video encoding format is ffv1, set the Context to
value: 0 (small), 1 (large).
The default value is 0.
- -format value
- Set the container format to value: only matroska is
currently allowed, which is the default value.
- -g value
- If video encoding format is ffv1, set the GOP size to value
1 (generates a strict intra-frame bitstream), 0 (allows
adaptable context model across frames).
The default value is 1. Ensure you leave the setting at 1
for archival use.
- -level value
- The video encoding format ffv1 can have Version set to
value: 0, 1, 3.
The default value is the latest version 3.
- -slicecrc value
- If video encoding format is ffv1, you can set the CRC checksum to
value: 0 (CRC checksums off), 1 (CRC checksum on).
The default value is 1.
- -slices value
- If the video encoding format is ffv1, you can set the multithreaded
encoding slices to value: any integer over 1 (it is recommended to
use a figure divisible by your workstations CPU core processors such as 2,
4, 6, 9, 16, 24...).
The default value is variable between 16 and 512, depending
on the video frame size and depth.
If the video encoder is ffv1_vulkan, the default value is the FFmpeg
default value.
rawcooked --all /path_to_av_raw_data/ This command comprises several
commands into one '--all' (see above) that ensures safe image sequence
encoding steps are taken. Please see individual flag differences to
understand the differences between its use during encoding and decoding.
It can be used in conjunction with opposing commands. For example if you
want to use this command without --conch, you can add --no-conch after the
--all and the conch command will be skipped.
rawcooked --check --coherency --conch --hash --encode -framerate 24
/path_to_av_raw_data/ >> RAWcooked_encoding.log If you want to
retain the console output of the RAWcooked encoding or decoding processes,
you can set the stdout to a separate log file. This option is useful if
you're automating batch encodings and need to assess the log outputs to make
decisions within the logic of your code.
rawcooked --all <file.mkv> This command works the same as the
encoding of raw audio-visual data, but decodes the Matroska file back to
it's original raw state. Please see individual flag differences (above) to
understand the differences between its use during encoding and decoding.
It can be used in conjunction with opposing commands. For example if you
want to use this command without --conch, you can add --no-conch after the
--all and the conch command will be skipped.
Copyright (c) 2018-2026 MediaArea.net SARL & Reto Kromer
RAWcooked is released under a BSD License.
RAWcooked is provided "as is" without warranty or support
of any kind.