RAWcooked(1)

NAME
RAWcooked - encode and decode audio-visual RAW data with Matroska, FFV1 and FLAC

SYNOPSIS
rawcooked [option ...] (folder | file ...) [option ...]

DESCRIPTION

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.

OPTIONS

  GENERAL OPTIONS

--help | -h
    Displays the help guide.

--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 (using the default PATH).

--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.

--quiet
    Do not show information related to RAWcooked.
    External encoder or decoder may need an additional option.

-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.

  ACTIONS

--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).

--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.

  INPUT RELATED OPTIONS

--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.

  ENCODING RELATED OPTIONS

-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.

EXAMPLE: Encoding using the --all action
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.

EXAMPLE: Custom encoding with export of console messages to log file
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.

EXAMPLE: Decoding using --all action
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
Copyright (c) 2018-2026 MediaArea.net SARL & Reto Kromer

LICENSE
RAWcooked is released under a BSD License.

DISCLAIMER
RAWcooked is provided "as is" without warranty or support of any kind.