0

So I merged an audio and video file together earlier using ffmpeg. I Did a full search on my hardrive for outPutFile.mp4 and it was nonexistant.

Now I'm running another, slightly altered command using ffmpeg, in the hope that it will work, the command is:

ffmpeg -i "C:\Program Files\PATH_Programs\AudioT.mp4" -i "C:\Program Files\PATH_Programs\VideoT.mp4" -shortest outPutFile.mp4

Should this command work correctly? If so, where should my output file end up?

I have my path already set to: C:\Program Files\PATH_Programs in system variables, and ffmpeg is downloaded and installed to C:\Program Files\PATH_Programs\

I am using Windows 10 Home Edition, don't know if that helps or not...

3
  • 1
    Where/how are you running the command? May 8, 2023 at 4:52
  • I am just using the windows command prompt. Update: outPutFile.mp4 is now appearing in file explorer, but the video is not appearing in the media player when I opened the file, only the audio is working...
    – cadenpolen
    May 8, 2023 at 5:05
  • The answer is simple - wherever you want. If you don't know where it goes (normally the current working directory of e.g. cmd, if ran there), just provide a full path as the last argument.
    – Destroy666
    May 8, 2023 at 5:09

1 Answer 1

0

When files are specified without a full path, they will be created or opened in the "current directory" (aka "working directory") of the program.

If you're running ffmpeg from within Cmd or from PowerShell, the shell's prompt directly shows you its working directory (and therefore the working directory of everything you run from that shell).

For example, if you have:

C:\Users\CadenPolen>  ffmpeg -i old.mp4 new.mp4

then both files will be in C:\Users\CadenPolen, as that's the "current directory" of Cmd and therefore of FFmpeg, and a dir would show both items in the file list.

(To change the current directory, you would normally use cd in PowerShell or cd /d in Cmd before running the program.)

If you ran ffmpeg from some other tool, that tool (like every other running process) has its own "current directory" set to something. (If it has an "Open file" button somewhere, the file selection dialog will open in the same directory. Otherwise, tools like Sysinternals ProcExp would be able to tell you the working directory of any process.)


For Windows specifically, in some cases, programs might actually do a %PATH% search in addition to looking in the current directory, so you might want to use where.exe outputFile.mp4 (it's "output", not "out-put") to possibly find it in one of the %PATH% locations. But as far as I know, this isn't done by ffmpeg, and isn't done when creating new files either (it only ever happens when opening an existing file).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .