MathewSachin / Captura

Capture Screen, Audio, Cursor, Mouse Clicks and Keystrokes
https://mathewsachin.github.io/Captura/
MIT License
9.55k stars 1.79k forks source link

"Access is denied" when capturing screen with Ffmpeg (v9.0.0-beta3.1) #455

Closed ArtDmn closed 4 years ago

ArtDmn commented 4 years ago

Hello,

When trying to capture a screen (with either cli or ui app) with ffmpeg codec, I get "Access is denied" error. (Everything is working fine in 8.0.0 but cli doesn't capture Desktop Duplication, which I need)

Desktop (please complete the following information):

Full error message: System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Captura.FFmpegService.StartFFmpeg(String Arguments, String FileName) at Captura.Models.FFmpegWriter..ctor(FFmpegVideoWriterArgs Args) at Captura.FFmpeg.FFmpegVideoCodec.GetVideoFileWriter(VideoWriterArgs Args) at Captura.ViewModels.RecordingModel.GetVideoFileWriter(IImageProvider ImgProvider, IAudioProvider AudioProvider, RecordingModelParams RecordingParams, String FileName) at Captura.ViewModels.RecordingModel.GetVideoFileWriterWithPreview(IImageProvider ImgProvider, IAudioProvider AudioProvider, RecordingModelParams RecordingParams) at Captura.ViewModels.RecordingModel.SetupVideoRecorder(IAudioProvider AudioProvider, RecordingModelParams RecordingParams)

FFmpeg logs: ARGS:

-thread_queue_size 512 -framerate 10 -f rawvideo -pix_fmt rgb32 -video_size 1920x1080 -i \.\pipe\captura-b3c7b798-af95-4b1f-8a49-d1fca0d6884c -r 10 -vcodec libx264 -crf 15 -pix_fmt yuv420p -preset ultrafast "C:\Users\Name\Documents\Captura\2019-11-09-17-39-14.mp4"

OUTPUT:

ArtDmn commented 4 years ago

It seems that it camed from an mis-installed ffmpeg folder. What is weird is that the "list" command did show me that ffmpeg was ready. For reference, ffmpeg.exe was in the root folder. After using ffmpeg --install and a holy reboot, everything went ok.