# Split audio file

**URL:** <https://community.n8n.io/t/split-audio-file/65792>\
**Category:** Questions\
**Created:** [December 17, 2024, 10:15am UTC](https://community.n8n.io/t/split-audio-file/65792 "2024-12-17T10:15:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![romain\_saillant](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/romain_saillant/32/33716_2.png) [@romain\_saillant](https://community.n8n.io/u/romain_saillant)\
**Post date:** [December 17, 2024, 10:15am UTC](https://community.n8n.io/t/split-audio-file/65792/1 "2024-12-17T10:15:34Z")

</div>

## Describe the problem/error/question

Hi there, in a workflow I need to send audio files to OpenAI Whisper to transcribe them. But sometimes, the files I receive are larger than the 25 mB limit. Do you know what would be the simplest way to split an audio file in smaller files in n8n?

## Information on your n8n setup

- **n8n version:** 1.67.1
- **Database (default: SQLite):** Postgres

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [December 17, 2024, 10:15am UTC](https://community.n8n.io/t/split-audio-file/65792/2 "2024-12-17T10:15:35Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![mredodos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mredodos/32/49280_2.png) [@mredodos](https://community.n8n.io/u/mredodos)\
**Post date:** [December 17, 2024, 10:50am UTC](https://community.n8n.io/t/split-audio-file/65792/3 "2024-12-17T10:50:03Z")

</div>

In what format is your audio file to be split?

---

<div class="post-metadata">

**Author:** ![romain\_saillant](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/romain_saillant/32/33716_2.png) [@romain\_saillant](https://community.n8n.io/u/romain_saillant)\
**Post date:** [December 17, 2024, 11:05am UTC](https://community.n8n.io/t/split-audio-file/65792/4 "2024-12-17T11:05:39Z")

</div>

Hi @mredodos, the file extension is mpga and the Mime type is “audio/mpeg”

---

<div class="post-metadata">

**Author:** ![mredodos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mredodos/32/49280_2.png) [@mredodos](https://community.n8n.io/u/mredodos)\
**Post date:** [December 17, 2024, 12:26pm UTC](https://community.n8n.io/t/split-audio-file/65792/5 "2024-12-17T12:26:17Z")

</div>

So i think you have 2 way 1 is with ffmpeg library, but you need to install it on the server/container and activate and use via execute command or you can try with cloud convert api

---

<div class="post-metadata">

**Author:** ![romain\_saillant](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/romain_saillant/32/33716_2.png) [@romain\_saillant](https://community.n8n.io/u/romain_saillant)\
**Post date:** [December 17, 2024, 2:03pm UTC](https://community.n8n.io/t/split-audio-file/65792/6 "2024-12-17T14:03:08Z")

</div>

Thanks I will look at those two solutions. Ideally, I’d like to have no additional cost so I will go first with the library solution.

---

<div class="post-metadata">

**Author:** ![romain\_saillant](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/romain_saillant/32/33716_2.png) [@romain\_saillant](https://community.n8n.io/u/romain_saillant)\
**Post date:** [December 19, 2024, 9:20am UTC](https://community.n8n.io/t/split-audio-file/65792/7 "2024-12-19T09:20:12Z")

</div>

OK so I found a solution with ffmpeg library thanks to you @mredodos!

If someone finds this topic here’s how I did it:

- Add ffmpeg to n8n: I deploy it using Docker, so in the Dockerfile I added “RUN apk add --update ffmpeg”
- In my workflow I write the binary file on the disk using the “Read/Write Files from Disk” node
- Then I add an “Execute Command” node and execute the following command: `ffmpeg -i my_input_file.mp3 -f segment -segment_time 2400 -c copy split_audio_file_%03d.mp3` (Here I cut the file in 40 minutes segments and name the outputs “split\_audio\_file\_000.mp3”, “split\_audio\_file\_001.mp3”, etc.)
- Then I can get the binary files by reading the disk and looking for files named “split\_audio\_file\_???.mp3”

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [December 26, 2024, 9:20am UTC](https://community.n8n.io/t/split-audio-file/65792/8 "2024-12-26T09:20:32Z")

</div>

Closed on December 26, 2024, 9:20am UTC

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