Help needed to use ffmpeg

Hi All!
I want to extract an audio file from a video received via Telegram or Webhook.

I installed FFmpeg locally. Installation directory: C:\ProgramData\chocolatey\bin

This is the Execute command I use to extract audio from a video:

ffmpeg -y -i “{{ $json.result.file_path }}” -vn -acodec pcm_s16le -ar 44100 -ac 2 “{{ $json.result.file_path.replace(/.[^.]+$/, ‘’) }}.wav”

However, it gives me the following error:

Please share your workflow

Share the output returned by the last node

Item Index
0
Node type
n8n-nodes-base.executeCommand
Node version
1 (Latest)
n8n version
1.106.3 (Self Hosted)
Time
07.09.2025 16:37:28
Stack trace
NodeOperationError: Command failed: ffmpeg -y -i “videos/file_35.mp4” -vn -acodec pcm_s16le -ar 44100 -ac 2 “videos/file_35.wav” /bin/sh: ffmpeg: not found at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts:102:12) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_0c275070fd0434c00ffd62213b2bcae4/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1212:9) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_0c275070fd0434c00ffd62213b2bcae4/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1582:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_0c275070fd0434c00ffd62213b2bcae4/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2158:11

Information on your n8n setup

n8n version:1.109.2

Database (default: SQLite): none

n8n EXECUTIONS_PROCESS setting (default: own, main): own

Running n8n via (Docker, npm, n8n cloud, desktop app): npm

Operating system: Windows 10

Thanx for all the help!

Hey @Branko_Petruci hope all is good. Welcome to the community.

It appears you are using ffmpeg in your execute command and you mentioned you installed it locally. Can you try to specify a full path to your binary:

C:\ProgramData\chocolatey\bin\ffmpeg.exe

Also I see the error mentioned the path to the shell being /bin/sh, which makes me believe that the execution is happening either in WSL or in Docker container.

Thanx for the quick answer. I tried and it gave this error: Problem in node ‘Execute Command‘

Command failed: C:\ProgramData\chocolatey\bin\ffmpeg.exe -version /bin/sh: C:ProgramDatachocolateybinffmpeg.exe: not found

I guess you’re right about n8n trying to execute the command on a docker server. But mine is installed locally on Windows.

What if you tried to double each backslash?

C:\\ProgramData\\chocolatey\\bin\\ffmpeg.exe

I doubt this really is going to work. Try to execute the following in the execute node:

dir

or

pwd

to see where you are currently (current working directory)

Unfortunately not working! How can I make the Execution Command work on my local setup?

And how can I be sure if my n8n is installed on Docker server as well?

Did you try to run either dir or pwd to learn the current working directory?

It gives the following error for dir:

And gives this return for pwd:

OK I found out that I’m using a nother version which is not my local version bcause the n8n browser path is: https://jtlnyrul.rsrv.host/
So is this a docker installation?

Here is a detailde debug info:

Debug info

core

  • n8nVersion: 1.106.3
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.17.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: bf2c90f5-a038-4353-989c-88915cefe7e7

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/139.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-09-07T15:04:56.688Z

n8n version:1.109.2

Database (default: SQLite): none

n8n EXECUTIONS_PROCESS setting (default: own, main): own

Running n8n via (Docker, npm, n8n cloud, desktop app): npm

Operating system: Windows 10

Ok in the same message you say that

  • platform: docker (self-hosted)

and

  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm

you should choose one, it is either docker or npm.

I assume you are running it in docker and this is why your path in the execute command node is a linux path with shell being /bin/sh

Yes I figured it out, somehow I managed to use a Docker version and stayed unaware of it. :smile:

Thanx for all the help

1 Like

You are very welcome :slight_smile:

If that helped you to find the issue, I’ll appreciate if you mark my answer which pointed you towards resolving the issue as Solution. Thanks.

Cheers.

2 Likes

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