Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
AnswerRe: ? : Operator Pin
dan!sh 21-Jul-10 9:24
professional dan!sh 21-Jul-10 9:24 
AnswerRe: ? : Operator Pin
yu-jian21-Jul-10 9:37
yu-jian21-Jul-10 9:37 
AnswerRe: ? : Operator Pin
brunoseixas22-Jul-10 5:24
brunoseixas22-Jul-10 5:24 
QuestionStopping Process Pin
anveshvm21-Jul-10 6:06
anveshvm21-Jul-10 6:06 
AnswerRe: Stopping Process Pin
PIEBALDconsult21-Jul-10 7:54
mvePIEBALDconsult21-Jul-10 7:54 
GeneralRe: Stopping Process Pin
anveshvm22-Jul-10 2:36
anveshvm22-Jul-10 2:36 
GeneralRe: Stopping Process Pin
PIEBALDconsult22-Jul-10 3:21
mvePIEBALDconsult22-Jul-10 3:21 
GeneralRe: Stopping Process Pin
anveshvm22-Jul-10 4:16
anveshvm22-Jul-10 4:16 
ffmpeg produces libraries and programs for handling multimedia. We can convert media files into different formats using ffmpeg. It can also record live streams from a camera in different formats.

I am attaching the ffmpeg.exe here.
https://www.transferbigfiles.com/a3209f95-ffcc-4c82-b722-041a24c26ec1?rid=KsWHbP3Lo/rxGH4YHVVVtA%3d%3d[^]

Here in my code i just copy the audio and video codecs of a file (input.avi) into another file(output.avi). Different parameters can be added in this command, but I just consider the basic operation here.
            Process myProcess = new Process();
            myProcess.StartInfo.FileName = @"ffmpeg.exe";
            myProcess.StartInfo.UseShellExecute = false;
            myProcess.StartInfo.RedirectStandardInput = true;

            myProcess.StartInfo.Arguments = "-i input.avi -vcodec flv -acodec copy output.flv";
            myProcess.Start();

            StreamWriter myStreamWriter = myProcess.StandardInput;

            myStreamWriter.Write("113"); //using ascii of q
            myStreamWriter.Flush();

            myStreamWriter.Write('q');
            myStreamWriter.Flush();

            myStreamWriter.Close();


            myProcess.WaitForExit();
            myProcess.Close()
;



If i run the pgm ( ffmpeg.exe should be placed in same foldr) it starts the conversion from avi to flv.
When I press [q] the pgm gets closed gracefully.

But I I am not being able to close it by sending 'q' character or its corresponding ascii. Confused | :confused:
GeneralRe: Stopping Process Pin
PIEBALDconsult22-Jul-10 3:35
mvePIEBALDconsult22-Jul-10 3:35 
AnswerRe: Stopping Process Pin
PIEBALDconsult21-Jul-10 17:36
mvePIEBALDconsult21-Jul-10 17:36 
Questionsave data structure in resource dll Pin
Jassim Rahma21-Jul-10 5:36
Jassim Rahma21-Jul-10 5:36 
AnswerRe: save data structure in resource dll Pin
Ennis Ray Lynch, Jr.21-Jul-10 5:40
Ennis Ray Lynch, Jr.21-Jul-10 5:40 
GeneralRe: save data structure in resource dll Pin
Jassim Rahma21-Jul-10 5:44
Jassim Rahma21-Jul-10 5:44 
Questionproblem writing in doc file Pin
Dhyanga21-Jul-10 5:29
Dhyanga21-Jul-10 5:29 
AnswerRe: problem writing in doc file Pin
Ennis Ray Lynch, Jr.21-Jul-10 5:38
Ennis Ray Lynch, Jr.21-Jul-10 5:38 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:48
Dhyanga21-Jul-10 5:48 
AnswerRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 5:39
mveOriginalGriff21-Jul-10 5:39 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:42
Dhyanga21-Jul-10 5:42 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 5:51
mveOriginalGriff21-Jul-10 5:51 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 5:54
Dhyanga21-Jul-10 5:54 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 6:03
mveOriginalGriff21-Jul-10 6:03 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 6:09
Dhyanga21-Jul-10 6:09 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 8:54
mveOriginalGriff21-Jul-10 8:54 
GeneralRe: problem writing in doc file Pin
Dhyanga21-Jul-10 9:44
Dhyanga21-Jul-10 9:44 
GeneralRe: problem writing in doc file Pin
OriginalGriff21-Jul-10 9:51
mveOriginalGriff21-Jul-10 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.