packaging-bento4-mp4decrypt

{
    "tags": [
        "itest",
        "packaging",
        "bento4_mp4decrypt"
    ],
    "region": "aws:eu-west-1",
    "tasks": [
        {
            "tool": "utils:env",
            "parameters": {
                "encrypted_mp4": "h264_fragmented_encrypted/fragmented_encrypted.mp4",
                "key_id": "b2e17ba2-3a1b-4c2e-8540-696da16ba61f",
                "key_hex": "acb421454a9f9fe1dc86c47bd059194b",
                "seed_hex": "34f9549d74a4f796f78201d35169abb4ba403c6e4524a909be6e7c2c11be",
                "output_folder_1": "output_1",
                "output_folder_2": "output_2",
                "output_folder_3": "output_3",
                "output_folder_4": "output_4"
            }
        },
        {
            "tool": "storage:get",
            "parameters": {
                "location": "s3://{com-castlabs-vtk-test-access-keys}@com.castlabs.vtk.test/IN/3min",
                "files": [
                    "{encrypted_mp4}"
                ]
            }
        },
        {
            "tool": "bento:mp4decrypt",
            "parameters": {
                "output_dir": "{output_folder_1}",
                "keys": [
                    {
                        "key_id_hex": "{key_id}",
                        "key_hex": "{key_hex}"
                    }
                ],
                "inputs": [
                    {
                        "input_file": "{encrypted_mp4}",
                        "output_file": "decrypted.mp4"
                    }
                ]
            }
        },
        {
            "tool": "bento:mp4decrypt",
            "parameters": {
                "output_dir": "{output_folder_2}",
                "keys": [
                    {
                        "key_id_hex": "{key_id}",
                        "seed_hex": "{seed_hex}"
                    }
                ],
                "inputs": [
                    {
                        "input_file": "{encrypted_mp4}",
                        "output_file": "decrypted.mp4"
                    }
                ]
            }
        },
        {
            "tool": "bento:mp4decrypt",
            "parameters": {
                "output_dir": "{output_folder_3}",
                "keys": [
                    {
                        "track_id": "1",
                        "key_hex": "{key_hex}"
                    }
                ],
                "inputs": [
                    {
                        "input_file": "{encrypted_mp4}",
                        "output_file": "decrypted.mp4"
                    }
                ]
            }
        },
        {
            "tool": "bento:mp4decrypt",
            "parameters": {
                "output_dir": "{output_folder_4}",
                "input_patterns": [
                    "h264_fragmented_encrypted/*.mp4"
                ],
                "keys": [
                    {
                        "track_id": "1",
                        "key_hex": "{key_hex}"
                    }
                ],
                "inputs": [
                    {
                        "input_file": "none",
                        "output_file": "decrypted.mp4"
                    }
                ]
            }
        },
        {
            "tool": "storage:put",
            "parameters": {
                "location": "s3://{com-castlabs-vtk-test-access-keys}@com.castlabs.vtk.test/OUT/packaging-bento4-mp4decrypt_{job_id}",
                "files": [
                    "{output_folder_1}/*",
                    "{output_folder_2}/*",
                    "{output_folder_3}/*",
                    "{output_folder_4}/*"
                ]
            }
        }
    ]
}