15

I am attempting to use FFmpeg to extract audio from a mp4 and I keep running into this error:

CFileffmpegvideo.mp4: No such file or directory exist. 

I am in command prompt (in Windows 7) and have the path as C:\Files\ffmpeg (Where ffmpeg is).

I run this command line

ffmpeg -i C:\Files\ffmpeg\video.mp4 -f mp3 -ab 320000 -vn music.mp3

The file is in the same folder as ffmpeg. I know I am missing something simple here but what is it?

Here is a short video showing the exact process.

Screenshot Showing Error

fixer1234
  • 28,064
L84
  • 3,911

10 Answers10

17

You may have double extension of file, your "video.mp4" is in fact "video.mp4.mp4" (look at screenshoot of your Windows folder, README.txt has extension hidden)

Jivul
  • 171
5

I recreated your situation (as best I could) on this computer after I watched your video. I downloaded the same version of ffmpeg (don't know about build, since I am limited to using the 32 bit version), copied the executable from the bin folder into the main one, put an mp4 file called "video.mp4" in there, and used your exact command line parameters, minus the absolute path...

ffmpeg -i video.mp4 -f mp3 -ab 320000 -vn music.mp3

enter image description here

..and it worked perfectly for me. Now, I didn't do it from the same directory structure as you had set up (c:\files\ffmpeg). Do you have ffmpeg installed anywhere else on the computer? Have you considered trying a previous build/version? What about 32 bit vs. 64 bit... or vice versa? Is this the first time you've used this version of ffmpeg? Or... has it worked perfectly up until now? Have you tried renaming the input file (silly, I know)?

Bon Gart
  • 13,100
4

figured out the issue.

if you type in dir in the ff prompt window, check what FOLDER it is referencing.

For me it was actually referencing the bin folder, not the folder the ffmpeg batch file is in.

I put the video file in the "bin" folder and it found it with no issues.

0

I know this is an old post but just in case someone else stumbles upon it and needs help; you can add the full path to all the files involved and you can run this from any where!

Edit this command with the appropriate values and copy/paste it to a command prompt:

C:\ReplaceThisWithFFMpegInstallFolder\ffmpeg.exe -i "C:\ReplaceThisWithSourceFolder\ReplaceThisWithVideoFileName.mp4" -f mp3 -ab 320000 -vn "C:\ReplaceThisWithDestinationFolder\ReplaceThisWithAudioFileName.mp3"

0

Make sure the filename doesn't have a trailing space. In my case there was a space after the .mp4 extension, making the correct syntax: "input.mp4 "

0

I was having a problem like this with a Win64 build through Cygwin. I think the automatic path conversion we the error, and I wish it worked in more scenarios like with the *NIX-style paths.

This would also occur when I manually called cygpath when piping path data from my clipboard.

I thought Windows-style paths were the problem at first, but that is because when I shift+right-click to copy their paths in file explorer, it adds quotes around them.

I was trying to use this method: ffmpeg -v error -i file.avi -f null - https://superuser.com/a/100290/175686

So the result that works is non-quoted, Windows-style paths.

Another nifty link: https://unix.stackexchange.com/questions/77016/ffmpeg-pattern-type-glob-not-loading-files-in-correct-order

Pysis
  • 1,100
0

I had this error because my filename had a whitespace in it. To solve it, 1) set the working directory with Pushd 2) put your filename inside quote ""

See here for a working example

MagTun
  • 1,598
0

I'm using ffmpeg in Linux and I need it to soft-sub videos with shell script I created , the original code looks like this

ffmpeg -y -i 'file:movie.mkv' -i 'file:sub.ass' -map 0 -c copy -map '-0:s' -map '1:0' '-metadata:s:s:0' 'language=eng' 'file:movie.mkv'

after replacing movi.mkv with $1 and sub.ass with $2 the code didn't work, I got same error message, and because it's hard to combine variable with qutes in shell script , I create extra variable to cleanup the mess

F1=\'file:$1\'
F2=\'file:$2\'

The code didn't works either so I remove the single quote and it solve the issue

Here is how my script looks like now :-

#!/bin/sh
F1=file:$1
F2=file:$2
/usr/bin/ffmpeg -y -hide_banner -i $F1 -i $F2 -map 0 -c copy -map '-0:s' -map '1:0' '-metadata:s:s:0' 'language=eng' 'file:movie.mkv'
Salem F
  • 596
0

It looks like ffmpeg is having trouble with your absolute filename. I guess, since it's more concentrated on Unix-like environments, it's using \ as escape character. Try using forward-slashes instead.

evilsoup
  • 14,056
0

Do a DIR search of the directory to see if the file name has not been changed to "File.mp4.mp4" or similar. That was my problem using Windows Vista and 7.

Smoot
  • 1