﻿{
  "workflow": {
    "wf_id": "20240417-2348-3455-8371-72f712bd4907",
    "wf_name": "emcodem_concat_1.4.3_ffmpeg_cuts_no_transcode",
    "wf_folder": "",
    "description": "webui_stitch Beware, all source files must be the same format/codec/audio and Long GOP codecs will cause troubles. <br>To summarize, this is an I-Frame Source only workflow.",
    "updated": "2024-09-29T14:51:50.871+02:00",
    "updated_by": "Gam3r1@DESKTOP-3VMPAN6",
    "created": "2024-04-17T23:48:34.558+02:00",
    "general": {
      "sleep": 30,
      "priority": "2 (normal)",
      "timeout_level": 3,
      "cron": ""
    },
    "maintainance": {
      "keep_all_workdir": true,
      "keep_failed_workdir": false,
      "work_age": 5,
      "run_on_days": 1234567
    },
    "special": {
      "log_level": "1 (Basic)",
      "force_32bit": false,
      "protected": false,
      "password": ""
    },
    "nodes": [
      {
        "id": "20240219-2312-2887-9576-7555628bfa0e",
        "type": "op_foreach",
        "custom_proc_guid": "",
        "name": "For each",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 413.1,
        "pos_y": 356.75,
        "execute_on": "success",
        "outbounds": [
          {
            "type": "op_populate",
            "id": "20240220-0021-3405-87e3-f25b602c6186"
          }
        ],
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "astring": "%webui_o_source%",
          "value": "%s_temp%",
          "index": "%i_index%"
        },
        "description": "This branch will finish before above goes on\r\n\r\nAdds all selected files to the concat file"
      },
      {
        "id": "20240220-0020-3310-7815-52fe2c45aa9d",
        "type": "other_textfile",
        "custom_proc_guid": "",
        "name": "Generate text file",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 1089.3,
        "pos_y": 356.75,
        "execute_on": "success",
        "outbounds": [],
        "description": "Append to ffconcat file",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "text": "%s_ffconcat%\r\nduration 1.0\r\n",
          "encoding": "UTF-8",
          "out_file": "concat.txt",
          "out_folder": "%s_job_work%",
          "append": true,
          "set_to_source": false
        }
      },
      {
        "id": "20240220-0021-3405-87e3-f25b602c6186",
        "type": "op_populate",
        "custom_proc_guid": "",
        "name": "Populate variables",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 751.2,
        "pos_y": 356.75,
        "execute_on": "success",
        "outbounds": [
          {
            "type": "other_textfile",
            "id": "20240220-0020-3310-7815-52fe2c45aa9d"
          }
        ],
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "variables": [
            {
              "name": "s_ffconcat",
              "data": "$jsonget(\"%s_temp%\",\"ffconcat\")",
              "type": "string"
            }
          ]
        },
        "description": "get current files concat options from webui"
      },
      {
        "id": "20240221-0046-2691-4721-d3d6330a85f6",
        "type": "other_textfile",
        "custom_proc_guid": "",
        "name": "Generate text file",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": true,
        "pos_x": 75,
        "pos_y": 75,
        "execute_on": "success",
        "outbounds": [
          {
            "type": "op_foreach",
            "id": "20240219-2312-2887-9576-7555628bfa0e",
            "connection": "subhold"
          },
          {
            "type": "op_populate",
            "id": "20240221-2000-3472-8544-52e09e76cad1"
          }
        ],
        "description": "Write inital ffconcat file",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "text": "ffconcat version 1.0\r\n",
          "encoding": "UTF-8",
          "out_file": "concat.txt",
          "out_folder": "%s_job_work%",
          "append": false,
          "set_to_source": true
        }
      },
      {
        "id": "20240221-0150-5190-67db-b8a68af090e5",
        "type": "cmd_run",
        "custom_proc_guid": "",
        "name": "Command executor",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 1427.4,
        "pos_y": 75,
        "execute_on": "success",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "command": "cmd \/C \"%s_encode_config%\"",
          "out_source": "",
          "omit_exit_code": false,
          "console": false,
          "show_command": true,
          "unicode": false,
          "stdout_var_name": "None",
          "set_timeout": 120,
          "error_timeout": 1,
          "std_types": "stdout + stderr"
        },
        "outbounds": [
          {
            "type": "dest_folder",
            "id": "20240221-2008-3516-5d68-91d1741ff841"
          }
        ],
        "description": "execute the modified encode cmd"
      },
      {
        "id": "20240221-2000-3472-8544-52e09e76cad1",
        "type": "op_populate",
        "custom_proc_guid": "",
        "name": "Populate variables",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 413.1,
        "pos_y": 75,
        "execute_on": "success",
        "outbounds": [
          {
            "type": "enc_av_avcintra",
            "id": "20240929-1451-4128-3067-e25e128abeca"
          }
        ],
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "variables": [
            {
              "name": "None",
              "data": "%s_job_work%\\concat_final.txt",
              "type": "number"
            },
            {
              "name": "s_options",
              "data": "skip_encoding=true|save_enc_cmd=true",
              "type": "string"
            },
            {
              "name": "s_temp",
              "data": "$sort($read(\"%s_source%\"))",
              "type": "string"
            },
            {
              "name": "s_temp",
              "data": "$ffconcat(\"%s_temp%\")",
              "type": "string"
            }
          ]
        },
        "description": "option skip_encoding\r\nSort chunks\r\nGenerate ffconcat list from chunks list "
      },
      {
        "id": "20240221-2008-3516-5d68-91d1741ff841",
        "type": "dest_folder",
        "custom_proc_guid": "",
        "name": "Folder",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 1765.5,
        "pos_y": 75,
        "execute_on": "success",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "folder": "c:\\temp",
          "suffix": "",
          "prefix": "stitched",
          "overwrite": false,
          "unique": true,
          "case": "None",
          "drop_name": false,
          "drop_ext": false,
          "move": true,
          "padding": "None"
        },
        "description": "Deliver final file",
        "outbounds": []
      },
      {
        "id": "20240221-2016-5047-7f5b-3ad1324ed8d0",
        "type": "op_populate",
        "custom_proc_guid": "",
        "name": "Populate variables",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 1089.3,
        "pos_y": 75,
        "execute_on": "success",
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "variables": [
            {
              "name": "s_encode_config",
              "data": "$regreplace(\"%s_last_enc_cmd%\",\"-vf \", \"-vf setpts=N\/FRAME_RATE\/TB,\")",
              "type": "string"
            }
          ]
        },
        "outbounds": [
          {
            "type": "cmd_run",
            "id": "20240221-0150-5190-67db-b8a68af090e5"
          }
        ],
        "description": "modify encoding cmd, insert setpts filter to avoid a/v sync problems"
      },
      {
        "id": "20240929-1451-4128-3067-e25e128abeca",
        "type": "enc_av_avcintra",
        "custom_proc_guid": "",
        "name": "AVC-Intra",
        "slots": 1,
        "hosts_group": 0,
        "bypass": false,
        "start_proc": false,
        "pos_x": 751.2,
        "pos_y": 75,
        "execute_on": "success",
        "outbounds": [
          {
            "type": "op_populate",
            "id": "20240221-2016-5047-7f5b-3ad1324ed8d0"
          }
        ],
        "preset": {
          "name": "(custom)",
          "id": null
        },
        "properties": {
          "audio": {
            "bitdepth": 24,
            "samplerate": 48000,
            "db_adjust": -23,
            "loudness_table": "",
            "loudness_enable": false,
            "codec": "pcm_s24le",
            "bitrate": null,
            "layout": "default",
            "streams": [
              {
                "codec": "pcm_s24le",
                "samplerate": 48000,
                "bitrate": null,
                "bitdepth": 24,
                "mapping": [
                  1,
                  2,
                  3,
                  4,
                  5,
                  6,
                  7,
                  8
                ]
              }
            ]
          },
          "video": {
            "format": "1080i50",
            "resizing": "Stretch and lose aspect",
            "type": 100,
            "interlacing": "Autodetect",
            "transformation": "None",
            "processing": "None, transwrap",
            "videorange": "Set to Limited"
          },
          "avid": {
            "enable": false,
            "clipname": "%s_original_name%",
            "project": "%s_wf_name%",
            "tape": "%s_original_path~1%"
          },
          "wrapper": "MXF",
          "start_tc": "%s_start_tc%"
        }
      }
    ],
    "version": "1.4.0.92",
    "variable": {
      "wf_size": 225.4
    },
    "farming": {
      "hosts": [],
      "include": false
    }
  },
  "user_variables": {
    "variables": [
      {
        "name": "i_index",
        "type": "integer",
        "data": ""
      },
      {
        "name": "s_ffconcat",
        "type": "string",
        "data": ""
      },
      {
        "name": "s_temp",
        "type": "string",
        "data": ""
      },
      {
        "name": "s_encode_config",
        "type": "string",
        "data": ""
      }
    ]
  }
}