E
E
Evgeny Ivanov2019-11-14 08:08:55
Video
Evgeny Ivanov, 2019-11-14 08:08:55

How to fix ffmpeg Permission denied error?

My task is to assemble a video from png files. Decided to use ffmpeg.
I work as an administrator under Windows 7. No program has problems with rights.
Except ffmpeg.
I do the following start-> run-> cmd

D:
cd Program Files\FFmpeg\bin

I successfully get into the bin folder. In this folder, in addition to the files of the FFmpeg program, there is my Output folder.
The Output folder contains png files 000001.png....000030.png. So I need to "glue" them into a video file.
I enter the command
D:\Program Files\FFmpeg\bin\ffmpeg -i  Output video.avi

In response, the inscription in red on the command line
Output: Permission denied
How to fix this error? What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
@
@nidalee, 2019-11-14
_

I enter the command
D:\Program Files\FFmpeg\bin\ffmpeg -i Output video.avi

Well, everything is simple here: you did not understand the syntax.
After -i , the source must be specified , that is, images, in your case, some "output" is specified and the program is looking for it, the "output" file without an extension, which is not in the folder at all.
After -i, you need to specify the filename mask. For a sequence of images like "frame_000.png, frame_001.png, ..." the mask "frame_%%03d.png" is used. If you don't want to learn how to correctly collect a mask for your files, just rename them to mine. For example, using Advanced Renamer.
After that, you also need to decide on the frame rate of the video. Let it be 24. Specified twice: with -r at the end and -framerate at the beginning.
Thus, to get an mp4 file from a sequence of images in the h264 codec with a frame rate of 24FPS, the following command is needed:
ffmpeg -framerate 24 -i frame_%%03d.png -c:v libx264 -pix_fmt yuv420p -crf 21 -r 24 video.mp4
And it will be called from the output folder with images. Nearby it is also desirable to put ffmpeg.exe itself.
You can also read this , for example.
There are no "problems" with permissions or code in ffmpeg, it's just that "output" is not a file and cannot be opened. ffmpeg only accepts files as a source. Not folders.

M
Moskus, 2019-11-14
@Moskus

https://www.scivision.dev/convert-png-to-avi-ffmpeg/

V
Vladimir Korotenko, 2019-11-14
@firedragon

Run cmd in advanced mode
Or create a tools folder in the root of the disk and move FFmpeg there

R
Radjah, 2019-11-14
@Radjah

> Output: Permission denied
You are trying to write to Program files. Writing to Program files for a non-admin is prohibited.
Add the path to ffmpeg to PATH and run from any folder or run with the full path to the executable file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question