Hi guys,
So, i'm working on a project to encode videos from Adobe Premiere Pro projets in H264 using x264.
I've done multiples versions of the programm, one in batch, one in python, but i'd like to do one in C# because it's a compilable langage (don't know if that's well said, I'm french sorry ^^).
So I try to encode, it starts, but at some point the program stops encoding. I had that problem with the program in python compiled with cx_Freeze to get an executable, but if i run the executable compiled with cx_freeze in Admin, well, it works, so I tried with this executable but, not workin'.
I've used this code to make the encoding :
I'm not gonna lie, i'm new to C#, so this code, i've found it on the internet by searching how to execute a program with C# (and I know this isn't the right way to learn !)Code:ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd", commandLine); processStartInfo.RedirectStandardOutput = true; processStartInfo.RedirectStandardError = true; processStartInfo.WindowStyle = ProcessWindowStyle.Normal; processStartInfo.UseShellExecute = false;
So I hope one or more of you will have an answer that could help, sorry for my english, I'm french and, have great day / night !
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
Last edited by Keller501; 21st Jul 2014 at 18:55. Reason: Corrections
-
Your English is fine. "Compilable language" is fine, but "...this isn't the right why to learn" should be "... this isn't the right way to learn". "... it starts, but at point the program stops encoding" is vague and requires some kind of modifier, like "... it starts, but at some point the program stops encoding". If I could help you with C# I would. We only have a small number of members here who have experience with it, but maybe one of them will read this and reply. Don't worry about your English. Your mistakes are few and very small. Native speakers can do worse and sometimes do.
-
Thanks for the corrections, actually, when I re-read myself, I see that I've been writing the wrongs words x).
-
I really don't know much about c# (c++ programmer), but the:
Code:ProcessStartInfo processStartInfo = new ProcessStartInfo("cmd", commandLine);
Code:Process process = new Process(); // create a new process // adjust the start info of that process process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.StartInfo.WindowStyle = ProcessWindowStyle.Normal; process.StartInfo.UseShellExecute = false; process.StartInfo.FileName = "Command to process"; string stdOutput = process.StandardOutput.ReadToEnd(); //grab output string errOutput = process.StandardError.ReadToEnd(); //grab output process.WaitForExit(); // wait for process to end
users currently on my ignore list: deadrats, Stears555