Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i used this code for split videos into frame using c#.this error will come win32 exception handled A specified fill path is not & and access is denied..
Kindly rectify that.. And one more thing provide any code to convert videos into images i know its in google bt i cannot get the right thing understandable and usable code..

C#
string inputpath = "C:\\Users\\Public\\Videos\\Sample Videos\\Wildlife.wmv";
            string outputpath = "D:\\Anand";
            string fileargs = "-i" + " " + inputpath + " " + outputpath + "image.jpg";
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "D:\\Anand\\Image processing Project\\ImageProcessing-source-code\\ImageProcessing\\NewFolder1";
            p.StartInfo.Arguments = fileargs;
            p.StartInfo.UseShellExecute = false;
            p.StartInfo.CreateNoWindow = true;
            p.StartInfo.RedirectStandardOutput = true;
            p.Start();
Posted
Comments
Richard Deeming 16-Jul-15 12:11pm    
The p.StartInfo.FileName needs to point to the file or application you want to open. In the code you've posted, it seems to be pointing to a folder, which won't work.

1 solution

The best tool I ever saw is FFMpeg (or Libav). You can launch the application is a separate process and get frames, which is quite a trivial thing, or use the .NET wrapper for the open-source library. Please see my past answer: how to convert image to video in C#[^].

—SA
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900