動画に字幕を生成する

中級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、13個のノードを含みます。主にGmail, Merge, Webhook, HttpRequest, ExecuteCommandなどのノードを使用。 ビデオ字幕の生成・翻訳にOpenAI WhisperとLibreTranslateを使用

前提条件
  • Googleアカウント + Gmail API認証情報
  • HTTP Webhookエンドポイント(n8nが自動生成)
  • ターゲットAPIの認証情報が必要な場合あり
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "w2qeYCgIcuMglLEB",
  "meta": {
    "instanceId": "058026fc00ddd0f398afec59419d60070007f9155d42ea1b5598fa1878c9da96",
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Subtitles for Videos",
  "tags": [],
  "nodes": [
    {
      "id": "7fa3143f-a837-4711-a72e-ee8b85e56757",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1504,
        112
      ],
      "webhookId": "a5f7f098-25f6-40ea-b139-c1fb1ef25b74",
      "parameters": {
        "path": "generate-subtitles",
        "options": {
          "responseData": {
            "responseBody": "Processing started"
          }
        },
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "23f12e94-e98c-4787-be58-763624e59537",
      "name": "動画をダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1200,
        112
      ],
      "parameters": {
        "url": "={{$json[\"body\"][\"video_url\"]}}",
        "options": {},
        "responseFormat": "file"
      },
      "typeVersion": 2
    },
    {
      "id": "d0f75494-fa2c-46f1-9ff2-2e17f8a88d0b",
      "name": "音声を抽出 (FFmpeg)",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -896,
        112
      ],
      "parameters": {
        "command": "ffmpeg -i /data/video.mp4 -q:a 0 -map a /data/audio.wav"
      },
      "typeVersion": 1
    },
    {
      "id": "8d462da7-7935-4c5d-9528-2f4a41d2b79b",
      "name": "Whisperを実行 (ローカル)",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -608,
        112
      ],
      "parameters": {
        "command": "whisper /data/audio.wav --model base --output_format srt --output_dir /data/"
      },
      "typeVersion": 1
    },
    {
      "id": "85ffc4ca-8f9d-485b-ab99-83b6774781b0",
      "name": "SRTファイルを読み取り",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        -304,
        112
      ],
      "parameters": {
        "filePath": "/data/audio.srt"
      },
      "typeVersion": 1
    },
    {
      "id": "c982d95f-b63b-4dc0-abc5-0bfdb6fbced9",
      "name": "字幕を翻訳 (LibreTranslate)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        560
      ],
      "parameters": {
        "url": "https://libretranslate.com/translate",
        "options": {},
        "authentication": "genericCredentialType",
        "jsonParameters": true
      },
      "typeVersion": 2
    },
    {
      "id": "aa3eee42-8559-4f05-891c-9169b32f58cf",
      "name": "翻訳済みSRTを書き込み",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        448,
        560
      ],
      "parameters": {
        "options": {},
        "fileName": "audio_translated.srt"
      },
      "typeVersion": 1
    },
    {
      "id": "fb95e5aa-dd78-4249-b0d1-775dc259a870",
      "name": "パスを統合",
      "type": "n8n-nodes-base.merge",
      "position": [
        112,
        128
      ],
      "parameters": {
        "mode": "passThrough"
      },
      "typeVersion": 1
    },
    {
      "id": "dae85000-c87f-4607-b80c-5c9c70276ce1",
      "name": "メッセージを送信",
      "type": "n8n-nodes-base.gmail",
      "position": [
        768,
        128
      ],
      "webhookId": "0dc39fa6-fac8-480d-a4cc-a1074edac0c2",
      "parameters": {
        "sendTo": "your-email@gmail.com",
        "message": "Attached are the subtitles (original and translated, if requested).",
        "options": {},
        "subject": "Video Subtitles Generated"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "f2AXAChfee6nsCv9",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "22d8ef5e-e319-4f76-8366-7b23bc600f43",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -176
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 480,
        "content": "## Input\n- Receives a video URL via webhook.\n- Acts as the workflow’s entry point.\n- Downloads the video from the provided URL.\n- Prepares it for audio extraction."
      },
      "typeVersion": 1
    },
    {
      "id": "5bf9004c-5e09-4cc2-af0f-63f9a2df15f7",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -176
      ],
      "parameters": {
        "color": 4,
        "width": 848,
        "height": 480,
        "content": "## Audio Extraction & Transcribing\n- Uses FFmpeg to separate audio from the video file.\n- Run Whisper (Local)\n- Uses OpenAI Whisper (running locally) to transcribe the extracted audio into text/subtitles.\n- Read SRT File\n- Reads the generated subtitle file (.srt)\n- Prepares the subtitle data for optional translation."
      },
      "typeVersion": 1
    },
    {
      "id": "2627a7bc-a0f7-4d03-b849-878abe63eb6a",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        336
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 400,
        "content": "## Translation\n- Combines transcription and translation paths.\n- Ensures that subtitles (original or translated) are passed downstream.\n- Translate Subtitles (LibreTranslate)\n- Sends the .srt file text to LibreTranslate for language translation.\n- Write Translated SRT\n- Outputs a new .srt file containing translated subtitles."
      },
      "typeVersion": 1
    },
    {
      "id": "fc33c12c-d054-4afe-bbf3-2f8a36c2f9df",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2432,
        -160
      ],
      "parameters": {
        "width": 608,
        "height": 912,
        "content": "# Subtitle Generator & Translator N8N Template Instructions\n\nThis workflow automatically processes a video URL received via a webhook, generates highly accurate subtitles using **OpenAI Whisper**, and optionally translates them before delivering the final `.srt` file.\n\n---\n\n## 🔴 Prerequisites\n\n- **Self-Hosted N8N**  \n  This workflow requires a self-hosted N8N instance, as it uses the **Execute Command** node.\n\n- **FFmpeg**  \n  The **Extract Audio (FFmpeg)** node requires the `ffmpeg` command-line tool to be installed and accessible via your N8N server's shell path.\n\n- **OpenAI Whisper**  \n  The **Run Whisper (Local)** node requires the `whisper` command-line tool (Python package) to be installed and accessible via your N8N server's shell path.\n\n- **Translation Service**  \n  You will need a credential for the **LibreTranslate** node "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "66d89da8-0755-4e8b-bf81-d1ae3fad5507",
  "connections": {
    "fb95e5aa-dd78-4249-b0d1-775dc259a870": {
      "main": [
        [
          {
            "node": "dae85000-c87f-4607-b80c-5c9c70276ce1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "85ffc4ca-8f9d-485b-ab99-83b6774781b0": {
      "main": [
        [
          {
            "node": "fb95e5aa-dd78-4249-b0d1-775dc259a870",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "23f12e94-e98c-4787-be58-763624e59537": {
      "main": [
        [
          {
            "node": "d0f75494-fa2c-46f1-9ff2-2e17f8a88d0b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7fa3143f-a837-4711-a72e-ee8b85e56757": {
      "main": [
        [
          {
            "node": "23f12e94-e98c-4787-be58-763624e59537",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8d462da7-7935-4c5d-9528-2f4a41d2b79b": {
      "main": [
        [
          {
            "node": "85ffc4ca-8f9d-485b-ab99-83b6774781b0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aa3eee42-8559-4f05-891c-9169b32f58cf": {
      "main": [
        [
          {
            "node": "fb95e5aa-dd78-4249-b0d1-775dc259a870",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "d0f75494-fa2c-46f1-9ff2-2e17f8a88d0b": {
      "main": [
        [
          {
            "node": "8d462da7-7935-4c5d-9528-2f4a41d2b79b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c982d95f-b63b-4dc0-abc5-0bfdb6fbced9": {
      "main": [
        [
          {
            "node": "aa3eee42-8559-4f05-891c-9169b32f58cf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - コンテンツ作成, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

AI駆動型動画制作&Instagram/TikTok/YouTubeへの自動アップロード
クラウドドライブからAI駆動の動画作成およびInstagram、TikTok、YouTubeへのアップロード
If
Set
Code
+
If
Set
Code
53 ノードDevCode Journey
コンテンツ作成
会議議事録とアクションアイテムトラッカー
AIベースの会議議事録:GPT-4の活用、タスク割り当て、マルチチャネル配信
If
Set
Code
+
If
Set
Code
38 ノードJitesh Dugar
コンテンツ作成
Instagramの趨勢電卓ブックからSEOコンテンツを生成して保存(SharePoint/Drive/Dropbox)
GPT-4o、FAL AI、複数ストレージによるトレンドの自動SEOコンテンツ生成
If
Set
Code
+
If
Set
Code
47 ノードplemeo
コンテンツ作成
インフルエンサー広告施策管理システムの自動化
Instagram / YouTube API を使ったインフルエンサー評価とイベント管理の自動化
If
Code
Gmail
+
If
Code
Gmail
24 ノードJitesh Dugar
コンテンツ作成
動画アップロードの自動化 → 自動のなサムネイル → Google Drive
FFmpeg と Google Drive を使って動画のアップロードとサムネイル生成を自動化
If
Webhook
Google Drive
+
If
Webhook
Google Drive
9 ノードWeblineIndia
コンテンツ作成
詐欺防止型リードキャプチャ・育成千リードシステム
AIによるスコアリング、テーブル追跡、マルチチャネルアラートを使って詐欺対策リードをキャプチャーし育成
If
Set
Code
+
If
Set
Code
28 ノードJitesh Dugar
コンテンツ作成
ワークフロー情報
難易度
中級
ノード数13
カテゴリー2
ノードタイプ8
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Paul Abraham

Paul Abraham

@hellopaul

Software Engineer & Automation Consultant with over 3+ years in experience helping teams streamline workflows with n8n, APIs, and AI-driven solutions.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34