Best way to extract audio from video and split into 15-min chunks in n8n

Describe the problem/error/question

I’m building a workflow in n8n to automatically extract audio from a video recording (e.g. online meeting), in order to generate a transcription and summary using OpenAI or similar AI nodes.

I already know how to handle transcription and summarization from an audio file.

My goal is to:

  1. Receive a video file (either from a form submission or a local folder)
  2. Extract the audio track (ideally as .mp3 or .wav)
  3. Split the audio into chunks of max 15 minutes (to fit AI input limitations)
  4. Send each audio chunk to an OpenAI node for transcription and summarization

The part I need help with is:

  • How to best extract audio from a video within n8n
  • How to split the audio into smaller chunks automatically

I’m open to using the Execute Command node with FFmpeg or other Docker-compatible solutions in a self-hosted environment.

What is the error message (if any)?

No error yet — I’m looking for advice on the best approach.

Please share your workflow

(I haven’t added the audio extraction nodes yet — just the AI-based transcription and summarization parts.)

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: 1.90.2
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): regular
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker (self-hosted)
  • Operating system: Linux (Docker container)

THank you for your help

Hey @JulienDelRio,

As you’re self-hosting, it sounds like using ffmpeg would be a sensible idea. I’m not an expert in using it but I think you should be able to use the Execute Command node as you suggested and call it twice to:

  1. extract the audio from the video
  2. split it into chunks

Extract video to single WAV

ffmpeg -i /path/to/input-video.mp4 -vn -acodec pcm_s16le -ar 44100 -ac 2 /path/to/output-audio.wav

Extract chunks for upload for transcription

ffmpeg -i /path/to/output-audio.wav -f segment -segment_time 900 -c copy /path/to/chunks/chunk_%03d.wav

You should then be able to use the “Read/Write files” node to iterate over those chunks and call the OpenAI transcription.

Remember that you’ll have to make sure you install ffmpeg if you’re running Docker.

We have an example workflow in our templates that might be helpful to use for reference (although it doesn’t split the audio as you need).

2 Likes

For those who are interested, just published a custom node to split audio files.

You can find it at:

n8n-nodes-splitaudio - npm

3 Likes

I will try the 2 solutions and get back. Thank you.

Do you have any advise to easily install FFMPEG on a running n8n on docker ?

Hopefully this helps:

I rebuilt the docker image with a small Dockerfile that looked like this:

FROM n8nio/n8n
USER root
RUN apk add --update ffmpeg
EXPOSE 5678
ENV SHELL=/bin/sh
USER node
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]

and then building the image with

docker build . --tag n8n-custom

and then changed the docker compose to use the new image.

Thanks.

I will try on a separate instance

Hi,

To tricky for me to make my own container.

I discovered FileFlows : https://fileflows.com/
I am looking for a FF workflow to do it and call the workflow from n8n.

I will be back when I succeed.

Best

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.