{
  "nodes": [
    {
      "id": "6d16b5be-8f7b-49f2-8523-9b84c62f2759",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1960,
        660
      ],
      "parameters": {
        "model": "gpt-4o-2024-08-06",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a6084f09-9a4f-478a-ac1a-ab1413628c1f",
      "name": "Capture Frames",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        460
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "language": "python",
        "pythonCode": "import cv2\nimport numpy as np\nimport base64\n\ndef extract_evenly_distributed_frames_from_base64(base64_string, max_frames=90):\n    # Decode the Base64 string into bytes\n    video_bytes = base64.b64decode(base64_string)\n    \n    # Write the bytes to a temporary file\n    video_path = '/tmp/temp_video.mp4'\n    with open(video_path, 'wb') as video_file:\n        video_file.write(video_bytes)\n    \n    # Open the video file using OpenCV\n    video_capture = cv2.VideoCapture(video_path)\n    \n    # Get the total number of frames in the video\n    total_frames = int(video_capture.get(cv2.CAP_PROP_FRAME_COUNT))\n    \n    # Calculate the step size to take 'max_frames' evenly distributed frames\n    step_size = max(1, total_frames // (max_frames - 1))\n    \n    # List to store selected frames as base64\n    selected_frames_base64 = []\n    \n    for i in range(0, total_frames, step_size):\n        # Set the current frame position\n        video_capture.set(cv2.CAP_PROP_POS_FRAMES, i)\n        \n        # Read the frame\n        ret, frame = video_capture.read()\n        if ret:\n            # Convert frame (NumPy array) to a Base64 string\n            frame_base64 = convert_frame_to_base64(frame)\n            selected_frames_base64.append(frame_base64)\n        if len(selected_frames_base64) >= max_frames:\n            break\n    \n    # Release the video capture object\n    video_capture.release()\n\n    return selected_frames_base64\n\ndef convert_frame_to_base64(frame):\n    # Convert the frame (NumPy array) to JPEG format\n    ret, buffer = cv2.imencode('.jpg', frame)\n    if not ret:\n        return None\n\n    # Encode JPEG image to Base64\n    frame_base64 = base64.b64encode(buffer).decode('utf-8')\n    return frame_base64\n\nbase64_video = _input.item.binary.data.data\nframes_base64 = extract_evenly_distributed_frames_from_base64(base64_video, max_frames=90)\n\nreturn { \"output\": frames_base64 }"
      },
      "typeVersion": 2
    },
    {
      "id": "b45e82a4-f304-4733-a9cf-07cae6df13ea",
      "name": "Split Out Frames",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        920,
        460
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output"
      },
      "typeVersion": 1
    },
    {
      "id": "83d29c51-a415-476d-b380-1ca5f0d4f521",
      "name": "Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        329,
        346
      ],
      "parameters": {
        "url": "=https://cdn.pixabay.com/video/2016/05/12/3175-166339863_small.mp4",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "0304ebb5-945d-4b0b-9597-f83ae8c1fe31",
      "name": "Convert to Binary",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1480,
        500
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "output"
      },
      "typeVersion": 1.1
    },
    {
      "id": "32a21e1d-1d8b-411e-8281-8d0e68a06889",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        149,
        346
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0ad2ea6a-e1f4-4b26-a4de-9103ecbb3831",
      "name": "Combine Script",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2640,
        360
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "2d9bb91a-3369-4268-882f-f97e73897bb8",
      "name": "Upload to GDrive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        3040,
        360
      ],
      "parameters": {
        "name": "=narrating-video-using-vision-ai-{{ $now.format('yyyyMMddHHmmss') }}.mp3",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "1dBJZL_SCh6F2U7N7kIMsnSiI4QFxn2xD"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "137185f6-ba32-4c68-844f-f50c7a5a261d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        0
      ],
      "parameters": {
        "width": 476.34074202271484,
        "height": 586.0597334122469,
        "content": "## \uc9c1\uc811 \uc2dc\ub3c4\ud574\ubcf4\uc138\uc694!\n\n### \uc774 n8n \ud15c\ud50c\ub9bf\uc740 \ube44\ub514\uc624\ub97c \uac00\uc838\uc640 \ud504\ub808\uc784\uc744 \ucd94\ucd9c\ud55c \ud6c4, \uc774\ub97c \ub2e4\uc911 \ubaa8\ub2ec LLM\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uadf8\ub7f0 \ub2e4\uc74c \uc774 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \ub3d9\uc77c\ud55c \ub2e4\uc911 \ubaa8\ub2ec LLM\uc5d0 \uc804\ub2ec\ud558\uc5ec \ubcf4\uc774\uc2a4\uc624\ubc84 \ud074\ub9bd\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\n\uc774 \ud15c\ud50c\ub9bf\uc740 [GPT\uc758 \uc2dc\uac01 \uae30\ub2a5\uacfc TTS API\ub97c \uc0ac\uc6a9\ud55c \ube44\ub514\uc624 \ucc98\ub9ac \ubc0f \ub0b4\ub808\uc774\uc158](https://cookbook.openai.com/examples/gpt_with_vision_for_video_understanding)\uc5d0\uc11c \uc601\uac10\uc744 \uc5bb\uc5c8\uc2b5\ub2c8\ub2e4.\n\n* \ube44\ub514\uc624\ub294 HTTP \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub2e4\uc6b4\ub85c\ub4dc\ub429\ub2c8\ub2e4.\n* Python \ucf54\ub4dc \ub178\ub4dc\uac00 OpenCV\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud504\ub808\uc784\uc744 \ucd94\ucd9c\ud569\ub2c8\ub2e4.\n* Loop \ub178\ub4dc\uac00 LLM\uc774 \ubd80\ubd84 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc0dd\uc131\ud558\ub3c4\ub85d \ud504\ub808\uc784\uc744 \ubc30\uce58\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.\n* \ubaa8\ub4e0 \ubd80\ubd84 \uc2a4\ud06c\ub9bd\ud2b8\uac00 \uacb0\ud569\ub418\uc5b4 \uc804\uccb4 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \ud615\uc131\ud55c \ud6c4, \uc774\ub97c OpenAI\uc5d0 \ubcf4\ub0b4\uc11c \uc624\ub514\uc624\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n* \uc644\uc131\ub41c \ubcf4\uc774\uc2a4\uc624\ubc84 \ud074\ub9bd\uc774 Google Drive\uc5d0 \uc5c5\ub85c\ub4dc\ub429\ub2c8\ub2e4.\n\n\uc644\uc131\ub41c \uc81c\ud488\uc744 \uc5ec\uae30\uc11c \uc0d8\ud50c\ub9c1\ud558\uc138\uc694: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing\n\n### \ub3c4\uc6c0\uc774 \ud544\uc694\ud558\uc138\uc694?\n[Discord](https://discord.com/invite/XPKeKXeB7d)\uc5d0 \uac00\uc785\ud558\uac70\ub098 [Forum](https://community.n8n.io/)\uc5d0\uc11c \ubb3c\uc5b4\ubcf4\uc138\uc694!"
      },
      "typeVersion": 1
    },
    {
      "id": "23700b04-2549-4121-b442-4b92adf7f6d6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        120
      ],
      "parameters": {
        "color": 7,
        "width": 459.41860465116287,
        "height": 463.313953488372,
        "content": "## 1. \ube44\ub514\uc624 \ub2e4\uc6b4\ub85c\ub4dc\n\n[HTTP Request \ub178\ub4dc\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/)\n\n\uc774 \ub370\ubaa8\uc5d0\uc11c, HTTP Request \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec Pixabay\uc5d0\uc11c \uc2a4\ud1a1 \ube44\ub514\uc624\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ub2e4\ub978 \uc18c\uc2a4\ub97c \uc0ac\uc6a9\ud574\ub3c4 \uc88b\uc9c0\ub9cc, OpenCV\uc5d0\uc11c \uc9c0\uc6d0\ub418\ub294 \ud615\uc2dd\uc778\uc9c0 \ud655\uc778\ud558\uc138\uc694 ([\ubb38\uc11c \ubcf4\uae30](https://docs.opencv.org/3.4/dd/d43/tutorial_py_video_display.html))"
      },
      "typeVersion": 1
    },
    {
      "id": "0a42aeb0-96cd-401c-abeb-c50e0f04f7ad",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        120
      ],
      "parameters": {
        "color": 7,
        "width": 605.2674418604653,
        "height": 522.6860465116279,
        "content": "## 2. \ube44\ub514\uc624\ub97c \ud504\ub808\uc784\uc73c\ub85c \ubd84\ud560  \n[\ucf54\ub4dc \ub178\ub4dc\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uae30](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/)  \n\n\ube44\ub514\uc624\ub97c \uc2dc\uac01 \ud2b8\ub799\uacfc \uc624\ub514\uc624 \ud2b8\ub799\uc758 \ud569\uc73c\ub85c \uc0dd\uac01\ud574\uc57c \ud569\ub2c8\ub2e4. \uc2dc\uac01 \ud2b8\ub799\uc740 \uae30\uc220\uc801\uc73c\ub85c \uc5f0\uc18d\ud574\uc11c \ud45c\uc2dc\ub418\ub294 \uc774\ubbf8\uc9c0 \ubaa8\uc74c\uc77c \ubfd0\uc774\uba70, \uc77c\ubc18\uc801\uc73c\ub85c \ud504\ub808\uc784\uc774\ub77c\uace0 \ubd88\ub9bd\ub2c8\ub2e4. LLM\uc774 \ube44\ub514\uc624\ub97c \uc774\ud574\ud558\uac8c \ud558\ub824\uba74, \ubcf4\ud1b5 \uc2dc\ub9ac\uc988\uc758 \ud504\ub808\uc784\uc744 \uc774\ubbf8\uc9c0\ub85c \uc81c\uacf5\ud558\uc5ec \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.  \n\n\uc5ec\uae30\uc11c, \uc6b0\ub9ac\ub294 OpenCV\ub77c\ub294 \ucef4\ud4e8\ud130 \ube44\uc804 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube44\ub514\uc624\uc5d0\uc11c \ud504\ub808\uc784\uc744 \ucd94\ucd9c\ud558\uae30 \uc704\ud574 Python Code \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \uc131\ub2a5\uc0c1\uc758 \uc774\uc720\ub85c, \ube44\ub514\uc624\uc5d0\uc11c \ucd5c\ub300 90\uac1c\uc758 \ud504\ub808\uc784\ub9cc \ucea1\ucc98\ud558\ub418, \ube44\ub514\uc624 \uc804\uccb4\uc5d0 \uace0\ub974\uac8c \ubd84\ud3ec\ub418\ub3c4\ub85d \ud569\ub2c8\ub2e4. \uc774 \ub2e8\uacc4\ub294 3MB \ube44\ub514\uc624\uc5d0\uc11c \uc644\ub8cc\ud558\ub294 \ub370 \uc57d 1-2\ubd84\uc774 \uac78\ub9bd\ub2c8\ub2e4."
      },
      "typeVersion": 1
    },
    {
      "id": "b518461c-13f1-45ae-a156-20ae6051fc19",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        660
      ],
      "parameters": {
        "color": 3,
        "width": 418.11627906976724,
        "height": 132.89534883720933,
        "content": "### \ud83d\udea8 \uc131\ub2a5 \uacbd\uace0!\n\ud070 \ube44\ub514\uc624\ub97c \uc0ac\uc6a9\ud558\uac70\ub098 \ub9ce\uc740 \uc218\uc758 \ud504\ub808\uc784\uc744 \ucea1\ucc98\ud558\ub294 \uac83\uc740 \ub9e4\uc6b0 \uba54\ubaa8\ub9ac\ub97c \ub9ce\uc774 \uc18c\ube44\ud558\uba70, n8n \uc778\uc2a4\ud134\uc2a4\ub97c \ucda9\ub3cc\uc2dc\ud0ac \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ucda9\ubd84\ud55c \uba54\ubaa8\ub9ac\ub97c \ud655\ubcf4\ud558\uace0 \ube44\ub514\uc624\ub97c \ubbf8\ub9ac \ucd5c\uc801\ud654\ud558\uc138\uc694!"
      },
      "typeVersion": 1
    },
    {
      "id": "585f7a7f-1676-4bc3-a6fb-eace443aa5da",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        118.69767441860472
      ],
      "parameters": {
        "color": 7,
        "width": 1264.8139534883715,
        "height": 774.3720930232558,
        "content": "## 3. Vision AI\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud504\ub808\uc784 \ubc30\uce58\uc5d0 \ub300\ud574 \uc124\uba85\ud558\uae30\n\n[Basic LLM \ub178\ub4dc\uc5d0 \ub300\ud574 \ub354 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm/)\n\n\uc6b0\ub9ac\uc758 LLM \ud1a0\ud070 \ud55c\uacc4\ub97c \uc720\uc9c0\ud558\uae30 \uc704\ud574, \uc6d0\ubcf8 \ube44\ub514\uc624\uc758 \uccad\ud06c\ub97c \ub098\ud0c0\ub0b4\uae30 \uc704\ud574 \ud504\ub808\uc784\uc744 \uc21c\ucc28\uc801\uc778 \ubc30\uce58\ub85c \ubcf4\ub0b4\uc57c \ud569\ub2c8\ub2e4. \ub8e8\ud504 \ub178\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec 15\uac1c\uc758 \ud504\ub808\uc784 \ubc30\uce58\ub97c \uc0dd\uc131\ud560 \uac83\uc785\ub2c8\ub2e4 - \uc774\ub294 \ucd5c\ub300 90\uac1c\uc758 \ud504\ub808\uc784 \ub54c\ubb38\uc5d0, \ucd1d 6\uac1c\uc758 \ub8e8\ud504\uc5d0 \uc644\ubcbd\ud558\uac8c \ub9de\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c\uc73c\ub85c, \uac01 \ud504\ub808\uc784\uc744 \uc774\uc9c4 \uc774\ubbf8\uc9c0\ub85c \ubcc0\ud658\ud558\uc5ec Basic LLM \ub178\ub4dc\uc5d0 \ud06c\uae30\ub97c \uc870\uc815\ud558\uace0 \ucca8\ubd80\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc9c0\uc801\ud560 \ud55c \uac00\uc9c0 \ud301\uc740 Basic LLM \ub178\ub4dc \ub0b4\uc5d0\uc11c \uc774\uc804 \uc0dd\uc131 \ubc18\ubcf5\uc774 cohesive script\ub97c \ud615\uc131\ud558\uae30 \uc704\ud574 \ub9e8 \uc55e\uc5d0 \ucd94\uac00\ub41c\ub2e4\ub294 \uac83\uc785\ub2c8\ub2e4. \uadf8\ub807\uc9c0 \uc54a\uc73c\uba74, LLM\uc740 \uac01 \ud504\ub808\uc784 \ubc30\uce58\uc5d0 \ub300\ud574 \uc0c8\ub85c \uc2dc\uc791\ud574\uc57c \ud55c\ub2e4\uace0 \uac00\uc815\ud560 \uac83\uc785\ub2c8\ub2e4.\n\n\uc6e8\uc774\ud2b8 \ub178\ub4dc\uac00 \uc11c\ube44\uc2a4 \uc18d\ub3c4 \uc81c\ud55c \ub0b4\uc5d0 \uba38\ubb3c\uae30 \uc704\ud574 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc774\ub294 \uc5ec\uc804\ud788 \ub0ae\uc740 \ud2f0\uc5b4\uc5d0 \uc788\ub294 \uc0c8\ub85c\uc6b4 \uc0ac\uc6a9\uc790\uc5d0\uac8c \uc720\uc6a9\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uc81c\ud55c\uc774 \uc5c6\ub2e4\uba74, \uc774 \uc6e8\uc774\ud2b8 \ub178\ub4dc\ub97c \uc81c\uac70\ud558\uc138\uc694!"
      },
      "typeVersion": 1
    },
    {
      "id": "42c002a3-37f6-4dd7-af14-20391b19cb5a",
      "name": "Stay Within Service Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        2280,
        640
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5beb17fa-8a57-4c72-9c3b-b7fdf41b545a",
      "name": "For Every 15 Frames",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1320,
        380
      ],
      "parameters": {
        "options": {},
        "batchSize": 15
      },
      "typeVersion": 3
    },
    {
      "id": "9a57256a-076a-4823-8cad-3b64a17ff705",
      "name": "Resize Frame",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1640,
        500
      ],
      "parameters": {
        "width": 768,
        "height": 768,
        "options": {
          "format": "jpeg"
        },
        "operation": "resize"
      },
      "typeVersion": 1
    },
    {
      "id": "3e776939-1a25-4ea0-8106-c3072d108106",
      "name": "Aggregate Frames",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1800,
        500
      ],
      "parameters": {
        "options": {
          "includeBinaries": true
        },
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "3a973a9c-2c7a-43c5-9c45-a14d49b56622",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2500,
        120.6860465116277
      ],
      "parameters": {
        "color": 7,
        "width": 769.1860465116274,
        "height": 487.83720930232533,
        "content": "## 4. TTS\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc74c\uc131 \uc624\ubc84 \ud074\ub9bd \uc0dd\uc131\n\n[OpenAI \ub178\ub4dc\uc5d0 \ub300\ud574 \ub354 \uc77d\uae30](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-langchain.openai)\n\n\ub9c8\uce68\ub0b4 \uc6b0\ub9ac \uc0dd\uc131\ub41c \uc2a4\ud06c\ub9bd\ud2b8 \ubd80\ubd84\ub4e4\uc744 \ud558\ub098\ub85c \uacb0\ud569\ud558\uc5ec OpenAI\uc758 \uc624\ub514\uc624 \uc0dd\uc131 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc804\uccb4 \uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c \uc74c\uc131 \uc624\ubc84\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ucd9c\ub825 mp3\ub97c \uc5bb\uc740 \ud6c4, Google Drive\uc640 \uac19\uc740 \uacf3\uc5d0 \uc5c5\ub85c\ub4dc\ud558\uc5ec \ub098\uc911\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n\uc5ec\uae30 \uc644\uc131\ub41c \uc81c\ud488\uc744 \ub4e4\uc5b4\ubcf4\uc138\uc694: https://drive.google.com/file/d/1-XCoii0leGB2MffBMPpCZoxboVyeyeIX/view?usp=sharing"
      },
      "typeVersion": 1
    },
    {
      "id": "92e07c18-4058-4098-a448-13451bd8a17a",
      "name": "Use Text-to-Speech",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2840,
        360
      ],
      "parameters": {
        "input": "={{ $json.data.map(item => item.text).join('\\n') }}",
        "options": {
          "response_format": "mp3"
        },
        "resource": "audio"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.5
    },
    {
      "id": "0696c336-1814-4ad4-aa5e-b86489a4231e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        61,
        598
      ],
      "parameters": {
        "color": 7,
        "width": 458.1279069767452,
        "height": 296.8139534883723,
        "content": "\uc774 \ub370\ubaa8\uc5d0\uc11c \uc0ac\uc6a9\ub41c \ube44\ub514\uc624\ub294  \n&copy; [Coverr-Free-Footage](https://pixabay.com/users/coverr-free-footage-1281706/) \ud1b5\ud574 [Pixabay](https://pixabay.com/videos/india-street-busy-rickshaw-people-3175/)  \n![](https://res.cloudinary.com/daglih2g8/image/upload/f_auto,q_auto/v1/n8n-workflows/jhx2tma2gxaabkeiqlgp#full-width)"
      },
      "typeVersion": 1
    },
    {
      "id": "81185ac4-c7fd-4921-937f-109662d5dfa5",
      "name": "Generate Narration Script",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1960,
        500
      ],
      "parameters": {
        "text": "=These are frames of a video. Create a short voiceover script in the style of David Attenborough. Only include the narration.\n{{\n$('Generate Narration Script').isExecuted\n ? `Continue from this script:\\n${$('Generate Narration Script').all().map(item => item.json.text.replace(/\\n/g,'')).join('\\n')}`\n : ''\n}}",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_1"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_2"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_3"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_4"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_5"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_6"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_7"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_8"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_9"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_10"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_11"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_12"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_13"
            },
            {
              "type": "HumanMessagePromptTemplate",
              "messageType": "imageBinary",
              "binaryImageDataKey": "data_14"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.4
    }
  ],
  "connections": {
    "Resize Frame": {
      "main": [
        [
          {
            "node": "Aggregate Frames",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Frames": {
      "main": [
        [
          {
            "node": "Split Out Frames",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Script": {
      "main": [
        [
          {
            "node": "Use Text-to-Speech",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video": {
      "main": [
        [
          {
            "node": "Capture Frames",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Frames": {
      "main": [
        [
          {
            "node": "Generate Narration Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Frames": {
      "main": [
        [
          {
            "node": "For Every 15 Frames",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Binary": {
      "main": [
        [
          {
            "node": "Resize Frame",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Narration Script",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Use Text-to-Speech": {
      "main": [
        [
          {
            "node": "Upload to GDrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Every 15 Frames": {
      "main": [
        [
          {
            "node": "Combine Script",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Convert to Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Narration Script": {
      "main": [
        [
          {
            "node": "Stay Within Service Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stay Within Service Limits": {
      "main": [
        [
          {
            "node": "For Every 15 Frames",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}