{ "icon": "photo_size_select_small", "identifier": "compute_offset", "label": "Compute time shift between two videos", "parameters": [ { "id": "source_media_provider", "type": "string" }, { "id": "reference_media_filename_with_extension", "type": "string" }, { "id": "candidate_media_filename_with_extension", "type": "string" }, { "id": "reference_video_source_filename", "type": "string" }, { "id": "candidate_video_source_filename", "type": "string" } ], "schema_version": "1.9", "start_parameters": [ { "accept": ".mp4", "id": "reference_video_source_filename", "label": "Reference Video Source file", "type": "file" }, { "accept": ".mp4", "id": "candidate_video_source_filename", "label": "Candidate Video Source file", "type": "file" }, { "id": "source_media_provider", "label": "Media provider", "type": "string" }, { "id": "reference_media_filename_with_extension", "label": "Media filename with extension", "type": "string" }, { "id": "candidate_media_filename_with_extension", "label": "Media filename with extension", "type": "string" }, { "id": "oscar_id", "label": "ID sequence", "type": "string" } ], "steps": [ { "icon": "file_download", "id": 0, "label": "Download reference element", "name": "job_transfer", "mode": "one_for_one", "parameters": [ { "id": "source_paths", "type": "array_of_templates", "value": [ "{reference_video_source_filename}" ] }, { "id": "source_secret", "store": "BACKEND", "type": "string", "value": "S3_SECRET" } ] }, { "icon": "file_download", "id": 1, "label": "Download candidate element", "name": "job_transfer", "mode": "one_for_one", "parameters": [ { "id": "source_paths", "type": "array_of_templates", "value": [ "{candidate_video_source_filename}" ] }, { "id": "source_secret", "store": "BACKEND", "type": "string", "value": "S3_SECRET" } ] }, { "icon": "filter", "id": 2, "label": "FFmpeg cut video into scenes", "name": "job_cli_ffmpeg_cut_scenes", "skip_destination_path": true, "mode": "one_for_one", "parameters": [ { "id": "destination_path", "type": "template", "value": "{work_directory}/{workflow_id}/reference-ts.txt" }, { "id": "command_template", "type": "template", "value": "/app/script.sh {source_path} {destination_path}" } ], "parent_ids": [ 0 ], "required_to_start": [ 0 ] }, { "icon": "filter", "id": 3, "label": "FFmpeg cut video into scenes", "name": "job_cli_ffmpeg_cut_scenes", "mode": "one_for_one", "skip_destination_path": true, "parameters": [ { "id": "command_template", "type": "template", "value": "/app/script.sh {source_path} {destination_path}" }, { "id": "destination_path", "type": "template", "value": "{work_directory}/{workflow_id}/candidate-ts.txt" } ], "parent_ids": [ 1 ], "required_to_start": [ 1 ] }, { "icon": "gps_fixed", "id": 4, "label": "Get Offset", "name": "job_media_time_shift", "mode": "one_for_many", "parameters": [ { "id": "video_source_paths", "type": "array_of_templates", "value": [ "{reference_video_source_filename}", "{candidate_video_source_filename}" ] }, { "id": "candidate_shots", "type": "template", "value": "{work_directory}/{workflow_id}/candidate-ts.txt" }, { "id": "reference_shots", "type": "template", "value": "{work_directory}/{workflow_id}/reference-ts.txt" }, { "id": "destination_test", "type": "template", "value": "{work_directory}/{workflow_id}/" }, { "id": "destination_path", "type": "template", "value": "{work_directory}/{workflow_id}/offset.json" } ], "parent_ids": [ 2, 3 ], "required_to_start": [ 2, 3 ] }, { "icon": "file_upload", "id": 5, "label": "Upload generated elements to S3", "name": "job_transfer", "skip_destination_path": true, "parameters": [ { "id": "input_filter", "type": "filter", "value": { "ends_with": [ "offset.json" ] } }, { "id": "destination_secret", "store": "BACKEND", "type": "string", "value": "S3_DESTINATION_SECRET" }, { "id": "destination_path", "type": "template", "value": "{mcai/{date_time}_{workflow_id}_{reference_media_filename_with_extension}_{candidate_media_filename_with_extension}_{filename}" } ], "parent_ids": [ 0, 1, 2, 3, 4 ], "required_to_start": [ 0, 1, 2, 3, 4 ] }, { "icon": "delete_forever", "id": 6, "label": "Clean workspace", "mode": "one_for_many", "name": "job_file_system", "parameters": [ { "default": "remove", "id": "action", "type": "string", "value": "remove" }, { "id": "source_paths", "type": "array_of_templates", "value": [ "{work_directory}/{workflow_id}" ] } ], "parent_ids": [ 0, 1, 2, 3, 4, 5 ], "required_to_start": [ 0, 1, 2, 3, 4, 5 ] } ], "tags": [ "scene_cut_ffmpeg_offset" ], "version_major": 0, "version_minor": 10, "version_micro": 1 }