CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2013
    Posts
    3

    [RESOLVED] Process.Start() => speed-- vs. Console

    Hi,

    I want to make the process of ffmpeg visible to a progressbar. While caring for it, I mentioned that running ffmpeg via

    Code:
     strCmdText = "-y -i \"" + path + "\"";
     strCmdText += " -async 1 -vf yadif -c:v libx264 -b:v 1024k -r 30 -bf 1 -an nul.avi";
     Process.Start(new ProcessStartInfo("lib\\ffmpeg.exe", strCmdText));
    is about 2/3 slower than running it in console (app: 130 progress fps, console: 400 progress fps).

    I already tried to run the Process.Start in an extra thread.

    The CPU usage is 75% while running in console, but 100% while running in the app.
    RAM usage is the same.

    Is there a way to fix this?

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Process.Start() => speed-- vs. Console

    What do you mean, "visible to a progressbar"? Are you interacting with this process somehow to track its progress and display it in a progress bar? If so, then if its performance is less when doing this, it's most likely whatever you are doing to track its progress. Is this what you are doing?

  3. #3
    Join Date
    May 2013
    Posts
    3

    Re: Process.Start() => speed-- vs. Console

    I already wrote a program to parse the output to a form and this form I wanted to extend with a progress bar. As I mentioned the performance problem I thought as well the problem is the parsing-time. But I outsourced the call of ffmpeg like above. Actually for testing the form consists of a button and the code snippet in post 1 and the problem is the same for all that it's parsing nothing from ffmpeg.

  4. #4
    Join Date
    May 2013
    Posts
    3

    Re: Process.Start() => speed-- vs. Console

    Sorry, for wasting your time.

    On the call in C# I just missed the Option for the first pass

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured