Generar subtítulos para videos

Intermedio

Este es unContent Creation, Multimodal AIflujo de automatización del dominio deautomatización que contiene 13 nodos.Utiliza principalmente nodos como Gmail, Merge, Webhook, HttpRequest, ExecuteCommand. Usar OpenAI Whisper y LibreTranslate para generar y traducir subtítulos de video

Requisitos previos
  • Cuenta de Google y credenciales de API de Gmail
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Pueden requerirse credenciales de autenticación para la API de destino
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "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": "Descargar video",
      "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": "Extraer audio (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": "Ejecutar Whisper (Local)",
      "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": "Leer archivo SRT",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        -304,
        112
      ],
      "parameters": {
        "filePath": "/data/audio.srt"
      },
      "typeVersion": 1
    },
    {
      "id": "c982d95f-b63b-4dc0-abc5-0bfdb6fbced9",
      "name": "Traducir subtítulos (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": "Escribir SRT traducido",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        448,
        560
      ],
      "parameters": {
        "options": {},
        "fileName": "audio_translated.srt"
      },
      "typeVersion": 1
    },
    {
      "id": "fb95e5aa-dd78-4249-b0d1-775dc259a870",
      "name": "Unir rutas",
      "type": "n8n-nodes-base.merge",
      "position": [
        112,
        128
      ],
      "parameters": {
        "mode": "passThrough"
      },
      "typeVersion": 1
    },
    {
      "id": "dae85000-c87f-4607-b80c-5c9c70276ce1",
      "name": "Enviar mensaje",
      "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": "Nota adhesiva",
      "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": "Nota adhesiva1",
      "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": "Nota adhesiva2",
      "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": "Nota adhesiva3",
      "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
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio - Creación de contenido, IA Multimodal

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos13
Categoría2
Tipos de nodos8
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
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.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34