No such file or directory in FFmpeg

11

1

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

L84

Posted 2012-06-24T02:22:12.590

Reputation: 3 403

Do you actually have "file-name.mp4" in the command line? I don't mean with the quotes, but I mean that specific and exact file name? And... do you actually have a mp4 file called "file-name.mp4" in the directory C:\Files\ffmpeg ? – Bon Gart – 2012-06-24T02:41:23.607

@BonGart - Yes I do – L84 – 2012-06-24T02:55:25.810

Yes I do, to both? Meaning you are using that exact phrasing AND you have a mp4 file with the generic name of "file-name.mp4" in that specific directory? Because that's what the error is telling us... that there isn't any file by that name in that directory. – Bon Gart – 2012-06-24T02:57:02.923

@BonGart - I posted a couple screenshots showing the directory and the command prompt screen with error. – L84 – 2012-06-24T03:06:12.927

Ok. so then the answer was NO.. you were NOT using the exact phrase "file-name.mp4" in the command line, and you do NOT have a file actually called "file-name.mp4" in that directory. What you should do is remove "c:\Files\ffmpeg" from the command line and try again. Since the file you are converting is in the same directory as ffmpeg, you don't need the absolute path. – Bon Gart – 2012-06-24T03:07:54.793

@BonGart - I was typing the correct file name regardless of what the question said. I edited question to reflect the exact file name. I tried removing the absolute path and use video.mp4 and it still gives me the same error. – L84 – 2012-06-24T03:23:43.980

use "C:\Files\ffmpeg\video.mp4" instead of C:\Files\ffmpeg\video.mp4 – Searush – 2012-11-11T08:34:56.460

Answers

3

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

Posted 2012-06-24T02:22:12.590

Reputation: 12 574

Thanks for your help. I have taken a short video showing the exact process. No luck. Here is the link: http://screencast.com/t/f50qR5eWq2B

– L84 – 2012-06-24T06:32:29.547

@Lynda I edited my answer a bit, included some possibilities at the bottom, upgraded ffmpeg to the same version as you show... – Bon Gart – 2012-06-24T13:49:08.157

I will have to try different build I guess. I have tried renaming, re-ordering the file system etc and still same results. This is the only place I have it installed. And I tried ffmpeg on an old computer with the same results and stopped attempting it because the computer had issues. This is a different computer without the issues of the other and still and results. I will try another build I guess. – L84 – 2012-06-24T16:12:25.677

13

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

Posted 2012-06-24T02:22:12.590

Reputation: 131

3

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.

videoconverter

Posted 2012-06-24T02:22:12.590

Reputation: 31

This is the rightfully correct answer! – papajo – 2017-12-08T08:03:01.593

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"

user693544

Posted 2012-06-24T02:22:12.590

Reputation: 1

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 "

Modest Chemodanov

Posted 2012-06-24T02:22:12.590

Reputation: 1

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

Posted 2012-06-24T02:22:12.590

Reputation: 980

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

Posted 2012-06-24T02:22:12.590

Reputation: 746

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

Posted 2012-06-24T02:22:12.590

Reputation: 10 085

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

Posted 2012-06-24T02:22:12.590

Reputation: 1