0

I'm making a program in c# in which I'm using ffmpeg to cut video into frames. I'm doing it this way in my program :

ffmpegPath = "C:\\Program Files (x86)\\ffmpeg\\ffmpeg32.bat";
string videoPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "video.avi");

Process process = new Process();
            process.StartInfo.FileName = ffmpegPath;
            process.StartInfo.Arguments = @"-i " + videoPath + " -qscale:v 2 image%03d.jpg";
            //process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
            process.Start();   // On cut la vid avec ffmpeg 

This code works perfectly fine in debugging mod and display all my images Now I want to make a setup to install the program, so I'm using InnoSetup to make a setup but when I install the program and try to run the same code it display the command prompt with ffmpeg error : "cannot display image2.jpg : av_interleaved_write_frame(): I/O error occurred ffmpeg error

if someone can help me on why I'm getting this error in release and not in debug mode? Why ffmpeg can't execute the request correctly after the setup since I'm changing nothing?

I already tried to double the % on ffmpeg request but it didn't work, all the paths are correct and the input file is not damaged or anything. The ffmpeg request works fine when I execute it directly from the prompt.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Loic Bch
  • 13
  • 7
  • Possible duplicate of [Extracting frames of a .avi file](http://stackoverflow.com/questions/17825677/extracting-frames-of-a-avi-file) – Samvel Petrosov May 14 '17 at 16:00
  • Check that the output directory exists and ensure it has proper permissions to write to it. Please do not make partial images of text: always copy and paste the complete console output text. – llogan May 14 '17 at 18:05
  • Well in debug mode the output folder is visual studio/project/xxxx/bin/debug. So i guess the output folder after setup is the same that when i execute ffmpeg request in prompt wich is the ffmpeg folder in program files. But it work when i do it in prompt do it should be ok with permission in program too. Is there a way to set a precise output folder? – Loic Bch May 14 '17 at 18:34

0 Answers0