diff --git a/HINTS b/HINTS new file mode 100644 index 0000000000000000000000000000000000000000..37ffd1bdf0a3f9c8124cc245db564eeb76b688e1 --- /dev/null +++ b/HINTS @@ -0,0 +1,16 @@ +the policy format is not well documented, here some observations +(date: 2017-02-20) + +- within the policy-xml there are no XML-comments allowed +- tag <description /> is only allowed on top level, otherwise it will be +interpreted as a rule with value "true". This could affect the result if next +real rule fails. Example: + <policy type="or" name="foo"> + <description>foo</description> + <rule name="bar" value="baz" tracktype="General" occurrence="*" operator="=">1</rule> + </policy> +will always "true", also if <rule name="bar" .. /> fails. +- there is no way to express an "optional depends". This means you can't + express a rule like "Either Audio or not, but if Audio it must be a FLAC" + + diff --git a/SLUB_mediaconch_policy_retrodigitized_film16mm.xml b/SLUB_mediaconch_policy_retrodigitized_film16mm.xml new file mode 100644 index 0000000000000000000000000000000000000000..3137a216dc841653de88f99b2f2d120f04e2087c --- /dev/null +++ b/SLUB_mediaconch_policy_retrodigitized_film16mm.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- SLUB version 2017-01 --> +<policy type="or" name="Video file is MKV + FFV1v3 + 16bitRGB with CRC32" license="CC-BY-SA-4.0+"> + <description>SLUB related policy to test that the video file is suitable for archiving purposes. + - Container format is Matroska with error detection (CRC) + - Video format is FFV1 with error detection (CRC) and with Intra mode (each frame is independent) + - Audio format is PCM (unfortunately it can not contain error detection) or FLAC (it has CRC by design) + This policy is based on: + - Example MKV FFV1 digitization policy.xml + - Video file is MKV + FFV1-Intra + PCM or FLAC with CRC32 everywhere.xml + If there are some policy violations or suggestions, please send an email to langzeitarchiv@slub-dresden.de + </description> + <policy type="and" name="MKV, FFV1 Intra, PCM/FLAC, error detection"> + <policy type="and" name="Container"> + <rule name="General/FileExtension is mkv" value="FileExtension" tracktype="General" occurrence="*" operator="=">mkv</rule> + <rule name="Container is MKV" value="Format" tracktype="General" occurrence="*" operator="=">Matroska</rule> + <rule name="Unique ID is present?" value="UniqueID" tracktype="General" occurrence="*"/> + <rule name="Container uses error detection" value="extra/ErrorDetectionType" tracktype="General" occurrence="*" operator="=">Per level 1</rule> + <rule name="General/Format_Version is 4" value="Format_Version" tracktype="General" occurrence="*" operator="=">4</rule> + <rule name="General/FrameRate is 24.000" value="FrameRate" tracktype="General" occurrence="*" operator="=">24.000</rule> + </policy> + <policy type="and" name="Video"> + <rule name="Video is FFV1" value="Format" tracktype="Video" occurrence="*" operator="=">FFV1</rule> + <rule name="FFV1 is version 3.4 or later?" value="Format_Version" tracktype="Video" occurrence="*" operator=">=">3.4</rule> + <rule name="GOP size of 1" value="Format_Settings_GOP" tracktype="Video" occurrence="*" operator="=">N=1</rule> + <rule name="Video uses error detection" value="extra/ErrorDetectionType" tracktype="Video" occurrence="*" operator="=">Per slice</rule> + <rule name="Frame Rate is Constant?" value="FrameRate_Mode" tracktype="Video" occurrence="*" operator="=">CFR</rule> + <rule name="Video/ScanType is Progressive" value="ScanType" tracktype="Video" occurrence="*" operator="=">Progressive</rule> + <rule name="Video/Compression_Mode is Lossless" value="Compression_Mode" tracktype="Video" occurrence="*" operator="=">Lossless</rule> + + <policy type="or" name="Video is 4k/16bit RGB or less 2k/10bit YUV"> + <policy type="and" name="YUV"> + <rule name="ColorSpace is YUV?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">YUV</rule> + <rule name="Chroma Subsampling is 4:2:2?" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:2:2</rule> + <policy type="or" name="Bit Depth is 8 or 10?"> + <rule name="Bit Depth is 8?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">8</rule> + <rule name="Bit Depth is 10?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">10</rule> + </policy> + </policy> + <policy type="and" name="RGB"> + <rule name="ColorSpace is RGB?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">RGB</rule> + <rule name="Chroma Subsampling is 4:4:4?" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:4:4</rule> + <rule name="Bit Depth is 16?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">16</rule> + </policy> + </policy> + </policy> + <policy type="or" name="Audio exist or not"> + <policy type="and" name="Audio exist"> + <rule name="General/AudioCount is 1" value="AudioCount" tracktype="General" occurrence="*" operator="=">1</rule> + <policy type="or" name="Audio is PCM or FLAC"> + <rule name="Audio is PCM" value="Format" tracktype="Audio" occurrence="*" operator="=">PCM</rule> + <rule name="Audio is FLAC" value="Format" tracktype="Audio" occurrence="*" operator="=">FLAC</rule> + </policy> + <rule name="Audio is 48000 Hz?" value="SamplingRate" tracktype="Audio" occurrence="*" operator="=">48000</rule> + <policy type="or" name="Audio is Stereo or Mono?"> + <rule name="Audio is mono?" value="Channels" tracktype="Audio" occurrence="*" operator="=">1</rule> + <rule name="Audio is stereo?" value="Channels" tracktype="Audio" occurrence="*" operator="=">2</rule> + </policy> + <policy type="or" name="Audio Bit Depth is 16 or 24?"> + <rule name="Bit Depth is 16?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">16</rule> + <rule name="Bit Depth is 24?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">24</rule> + </policy> + </policy> + <policy type="or" name="Audio is not included"> + <rule name="General/AudioCount is 0" value="AudioCount" tracktype="General" occurrence="*" operator="=">0</rule> + </policy> + </policy> + </policy> +</policy> diff --git a/SLUB_mediaconch_policy_retrodigitized_film8mm.xml b/SLUB_mediaconch_policy_retrodigitized_film8mm.xml new file mode 100644 index 0000000000000000000000000000000000000000..a557a1ce3a2cd2cd5c628524eb060fabd766d53d --- /dev/null +++ b/SLUB_mediaconch_policy_retrodigitized_film8mm.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<policy type="or" name="SLUB Policy for MKV/FFV1v3, retrodigitized film ~8mm" license="CC-BY-SA-4.0+"> + <description>SLUB related policy to test that the video file is suitable for archiving purposes. + This checks if a MKV/FFV1v3 fullfill needs for 8mm retrodigitization (also Super8, Normal8, 9,5mm…): + - Container format is Matroska with error detection (CRC) + - Video format is FFV1 with error detection (CRC) and with Intra mode (each frame is independent) + - Audio format is PCM (unfortunately it can not contain error detection) or FLAC (it has CRC by design) + This policy is based on: + - Example MKV FFV1 digitization policy.xml + - Video file is MKV + FFV1-Intra + PCM or FLAC with CRC32 everywhere.xml + If there are some policy violations or suggestions, please send an email to langzeitarchiv@slub-dresden.de + </description> + <policy type="and" name="MKV, FFV1 Intra, PCM/FLAC, error detection"> + <policy type="and" name="Container"> + <rule name="General/FileExtension is mkv" value="FileExtension" tracktype="General" occurrence="*" operator="=">mkv</rule> + <rule name="Container is MKV" value="Format" tracktype="General" occurrence="*" operator="=">Matroska</rule> + <rule name="Unique ID is present?" value="UniqueID" tracktype="General" occurrence="*"/> + <rule name="Container uses error detection" value="extra/ErrorDetectionType" tracktype="General" occurrence="*" operator="=">Per level 1</rule> + <rule name="General/Format_Version is 4" value="Format_Version" tracktype="General" occurrence="*" operator="=">4</rule> + <rule name="General/FrameRate is 24.000" value="FrameRate" tracktype="General" occurrence="*" operator="=">24.000</rule> + </policy> + <policy type="and" name="Video"> + <rule name="Video is FFV1" value="Format" tracktype="Video" occurrence="*" operator="=">FFV1</rule> + <rule name="FFV1 is version 3.4 or later?" value="Format_Version" tracktype="Video" occurrence="*" operator=">=">3.4</rule> + <rule name="GOP size of 1" value="Format_Settings_GOP" tracktype="Video" occurrence="*" operator="=">N=1</rule> + <rule name="Video uses error detection" value="extra/ErrorDetectionType" tracktype="Video" occurrence="*" operator="=">Per slice</rule> + <rule name="Frame Rate is Constant?" value="FrameRate_Mode" tracktype="Video" occurrence="*" operator="=">CFR</rule> + <rule name="Video/ScanType is Progressive" value="ScanType" tracktype="Video" occurrence="*" operator="=">Progressive</rule> + <rule name="Video/Compression_Mode is Lossless" value="Compression_Mode" tracktype="Video" occurrence="*" operator="=">Lossless</rule> + + <policy type="and" name="Video is HD/10bit YUV/RGB"> + <policy type="or" name="typical Resolutions"> + <policy type="and" name="HD (1440x1080)"> + <rule name="Video/Width is >=1440" value="Width" tracktype="Video" occurrence="*" operator=">=">1440</rule> + <rule name="Video/Height is >=1080" value="Height" tracktype="Video" occurrence="*" operator=">=">1080</rule> + </policy> + </policy> + <policy type="or" name="YUV or RGB"> + <policy type="and" name="YUV"> + <rule name="ColorSpace is YUV?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">YUV</rule> + <rule name="Chroma Subsampling is 4:4:4?" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:4:4</rule> + </policy> + <policy type="and" name="RGB"> + <rule name="ColorSpace is RGB?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">RGB</rule> + </policy> + </policy> + <rule name="Bit Depth is 10?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">10</rule> + </policy> + </policy> + + <policy type="or" name="Audio"> + <rule name="General/AudioCount is 1" value="AudioCount" tracktype="General" occurrence="*" operator="=">1</rule> + <policy type="or" name="Audio is PCM or FLAC"> + <rule name="Audio is PCM" value="Format" tracktype="Audio" occurrence="*" operator="=">PCM</rule> + <rule name="Audio is FLAC" value="Format" tracktype="Audio" occurrence="*" operator="=">FLAC</rule> + </policy> + <rule name="Audio is 48000 Hz?" value="SamplingRate" tracktype="Audio" occurrence="*" operator="=">48000</rule> + <policy type="or" name="Audio is Stereo or Mono?"> + <rule name="Audio is mono?" value="Channels" tracktype="Audio" occurrence="*" operator="=">1</rule> + <rule name="Audio is stereo?" value="Channels" tracktype="Audio" occurrence="*" operator="=">2</rule> + </policy> + <policy type="or" name="Audio Bit Depth is 16 or 24?"> + <rule name="Bit Depth is 16?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">16</rule> + <rule name="Bit Depth is 24?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">24</rule> + </policy> + </policy> + </policy> +</policy> diff --git a/SLUB_mediaconch_policy_retrodigitized_video.xml b/SLUB_mediaconch_policy_retrodigitized_video.xml new file mode 100644 index 0000000000000000000000000000000000000000..3137a216dc841653de88f99b2f2d120f04e2087c --- /dev/null +++ b/SLUB_mediaconch_policy_retrodigitized_video.xml @@ -0,0 +1,69 @@ +<?xml version="1.0"?> +<!-- SLUB version 2017-01 --> +<policy type="or" name="Video file is MKV + FFV1v3 + 16bitRGB with CRC32" license="CC-BY-SA-4.0+"> + <description>SLUB related policy to test that the video file is suitable for archiving purposes. + - Container format is Matroska with error detection (CRC) + - Video format is FFV1 with error detection (CRC) and with Intra mode (each frame is independent) + - Audio format is PCM (unfortunately it can not contain error detection) or FLAC (it has CRC by design) + This policy is based on: + - Example MKV FFV1 digitization policy.xml + - Video file is MKV + FFV1-Intra + PCM or FLAC with CRC32 everywhere.xml + If there are some policy violations or suggestions, please send an email to langzeitarchiv@slub-dresden.de + </description> + <policy type="and" name="MKV, FFV1 Intra, PCM/FLAC, error detection"> + <policy type="and" name="Container"> + <rule name="General/FileExtension is mkv" value="FileExtension" tracktype="General" occurrence="*" operator="=">mkv</rule> + <rule name="Container is MKV" value="Format" tracktype="General" occurrence="*" operator="=">Matroska</rule> + <rule name="Unique ID is present?" value="UniqueID" tracktype="General" occurrence="*"/> + <rule name="Container uses error detection" value="extra/ErrorDetectionType" tracktype="General" occurrence="*" operator="=">Per level 1</rule> + <rule name="General/Format_Version is 4" value="Format_Version" tracktype="General" occurrence="*" operator="=">4</rule> + <rule name="General/FrameRate is 24.000" value="FrameRate" tracktype="General" occurrence="*" operator="=">24.000</rule> + </policy> + <policy type="and" name="Video"> + <rule name="Video is FFV1" value="Format" tracktype="Video" occurrence="*" operator="=">FFV1</rule> + <rule name="FFV1 is version 3.4 or later?" value="Format_Version" tracktype="Video" occurrence="*" operator=">=">3.4</rule> + <rule name="GOP size of 1" value="Format_Settings_GOP" tracktype="Video" occurrence="*" operator="=">N=1</rule> + <rule name="Video uses error detection" value="extra/ErrorDetectionType" tracktype="Video" occurrence="*" operator="=">Per slice</rule> + <rule name="Frame Rate is Constant?" value="FrameRate_Mode" tracktype="Video" occurrence="*" operator="=">CFR</rule> + <rule name="Video/ScanType is Progressive" value="ScanType" tracktype="Video" occurrence="*" operator="=">Progressive</rule> + <rule name="Video/Compression_Mode is Lossless" value="Compression_Mode" tracktype="Video" occurrence="*" operator="=">Lossless</rule> + + <policy type="or" name="Video is 4k/16bit RGB or less 2k/10bit YUV"> + <policy type="and" name="YUV"> + <rule name="ColorSpace is YUV?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">YUV</rule> + <rule name="Chroma Subsampling is 4:2:2?" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:2:2</rule> + <policy type="or" name="Bit Depth is 8 or 10?"> + <rule name="Bit Depth is 8?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">8</rule> + <rule name="Bit Depth is 10?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">10</rule> + </policy> + </policy> + <policy type="and" name="RGB"> + <rule name="ColorSpace is RGB?" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">RGB</rule> + <rule name="Chroma Subsampling is 4:4:4?" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:4:4</rule> + <rule name="Bit Depth is 16?" value="BitDepth" tracktype="Video" occurrence="*" operator="=">16</rule> + </policy> + </policy> + </policy> + <policy type="or" name="Audio exist or not"> + <policy type="and" name="Audio exist"> + <rule name="General/AudioCount is 1" value="AudioCount" tracktype="General" occurrence="*" operator="=">1</rule> + <policy type="or" name="Audio is PCM or FLAC"> + <rule name="Audio is PCM" value="Format" tracktype="Audio" occurrence="*" operator="=">PCM</rule> + <rule name="Audio is FLAC" value="Format" tracktype="Audio" occurrence="*" operator="=">FLAC</rule> + </policy> + <rule name="Audio is 48000 Hz?" value="SamplingRate" tracktype="Audio" occurrence="*" operator="=">48000</rule> + <policy type="or" name="Audio is Stereo or Mono?"> + <rule name="Audio is mono?" value="Channels" tracktype="Audio" occurrence="*" operator="=">1</rule> + <rule name="Audio is stereo?" value="Channels" tracktype="Audio" occurrence="*" operator="=">2</rule> + </policy> + <policy type="or" name="Audio Bit Depth is 16 or 24?"> + <rule name="Bit Depth is 16?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">16</rule> + <rule name="Bit Depth is 24?" value="BitDepth" tracktype="Audio" occurrence="*" operator="=">24</rule> + </policy> + </policy> + <policy type="or" name="Audio is not included"> + <rule name="General/AudioCount is 0" value="AudioCount" tracktype="General" occurrence="*" operator="=">0</rule> + </policy> + </policy> + </policy> +</policy>