title
Products            Buy            Support Forum            Professional            About            Codec Central
 

How to read CoreConverter process Standar Output while it's performing a conversion ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pitoloko

    • Mar 2011
    • 38

    How to read CoreConverter process Standar Output while it's performing a conversion ?

    Hi

    I always used CoreConverter CLI version to manage my music collection, I was launching the process from Batch scripts where the standard output can be readed as normal.

    But years ago I've learned VB.NET and now I considered to make a "all in one" personal application where I want to launch all the processes I need to manage my collection, and one of that processes is CoreConverter.

    Well, the problem is that I've tried all what I know to read the standard error and also standard output of CoreConverter.exe in .NET, but no way! just I can't?

    I've tried to ask in english forums to expert programmers about interprocess communications but I did not get any help, so here I am trying to get help directly from the authors, developers, or expert moderators.

    What I need to have in mind to try to read the Error output and standard output of the CoreConverter.exe process while the process is runnig (while process is performing a music conversion)?

    The problem I have is just I can't read the standard output until process doesn't finishes to make the conversion, but this does not happens with other processes as FFMPEG.exe, etc...

    Also I've discovered that Coreconverter sends both outputs in Unicode encoding or at least that's what I think because I'm able to read the Standard output if I set the read mode encoding to Unicode, but the error output I can't read it even if I try to read it as Unicode or any other supported encoding of .NET.

    But the Error output is a minor problem, my major problem is I need to read the output of CoreConverter while it's performing an conversion, just I want to do this to pick the progressbar character amount of Coreconverter.exe to calculate the percentage and manage it in my own personal application, but I don't know why.

    When I launch a process, I do it normally, redirecting error and standard outputs, without using Windows ShellExecute and waiting for process exited signal.

    Also I've tried to don't wait for process exited, also I've tried to run the coreconverter.exe as an argument of cmd (I will mean launching CMD fom VB.NET) but I can't read the output, also I've tried to read the process buffer but I think I've done it wrong because reading the console buffer is new to me, and I don't know if it's what I need to do or not so I don't want more headaches with buffers at the moment.

    Just please, someone can help me to solve this? What steps I need to do to read the output while process still runing?

    Any code examples?, I don't manage C* but if is not a too much complex code maybe I can translate the C* syntax to VBNET.

    Here is one of the questions I've made about this problem in other webpage: http://stackoverflow.com/questions/1...-still-running

    PS: In that link you can see the code I've used to launch CoreConverter.exe

    Thanks for read.
  • Spoon
    Administrator
    • Apr 2002
    • 44583

    #2
    Re: How to read CoreConverter process Standar Output while it's performing a conversi

    Perhaps try the Com object to control core converter.
    Spoon
    www.dbpoweramp.com

    Comment

    • pitoloko

      • Mar 2011
      • 38

      #3
      Re: How to read CoreConverter process Standar Output while it's performing a conversi

      Thanks for answer Spoon, I know that your job is not to teach how to code each thing, but please understand I'm not an expert to introduce me into the COM World, I don't know how to start (all info I've seen is for C*) also seems really TOO hard to code the interface and all things to make com objects, I don't want to spent months of learnng how to make COM objects just only to pick a couple of characters from the CoreConverter.exe process, and like you've said... the COM solution you give me is a "perhaps".

      Maybe you can have other idea of how to try to communicate right with CoreConverter.exe from a .NET GUI application? (not CLI)

      I hope if exists a "easy" solution using named pipes or reading the console buffer or something like that... but anyway I didn't received help anywhere of how to do that things.

      Also the both coreconverter.exe outputs are sent in unicode encoding as I think?

      Thanks for read.
      Last edited by pitoloko; October 07, 2013, 12:25 AM.

      Comment

      • Spoon
        Administrator
        • Apr 2002
        • 44583

        #4
        Re: How to read CoreConverter process Standar Output while it's performing a conversi

        See:



        in .net it is very easy
        Spoon
        www.dbpoweramp.com

        Comment

        • pitoloko

          • Mar 2011
          • 38

          #5
          Re: How to read CoreConverter process Standar Output while it's performing a conversi

          @Spoon

          Thanks for the information but I'm in the same problem

          Does have DMCScriptingLib events or something to retrieve the progress of a conversion?

          In the C*/VB examples is not explained.

          I'm using this:

          Dim dMC As DMCSCRIPTINGLib.Converter = New DMCSCRIPTINGLib.Converter
          dMC.Convert("c:\Test.mp3", "c:\Output.mp3", "mp3 (Lame)", "-b=128", "C:\Logfile.log")

          Comment

          • Spoon
            Administrator
            • Apr 2002
            • 44583

            #6
            Re: How to read CoreConverter process Standar Output while it's performing a conversi

            Scripting has no eventing
            Spoon
            www.dbpoweramp.com

            Comment

            Working...

            ]]>