1

I have a wx python application which takes any video file as input and exports each audio track as separate wav files, whilst giving me realtime output info in the status bar. I have this working perfectly on OSX using pexpect, but can't get this working on Windows, I have unsuccessfully tried wexpect. I am using the below code, as an example on Windows, this currently gives me the output, but then pauses when it gets to the bit I am interested in, file export progress, I then get output again when the export finishes. Anyone have any suggestions please?

    command = 'ffmpeg\ffmpeg.exe -i "E:\source.mov" -map 0:1 -acodec pcm_s24le -y "E:\source_01.wav" -map 0:2 -acodec pcm_s24le -y "E:\source_02.wav" -map 0:3 -acodec pcm_s24le -y "E:\source_03.wav" -map 0:4 -acodec pcm_s24le -y "E:\source_04.wav" -map 0:5 -acodec pcm_s24le -y "E:\source_05.wav" -map 0:6 -acodec pcm_s24le -y "E:\source_06.wav" -map 0:7 -acodec pcm_s24le -y "E:\source_07.wav" -map 0:8 -acodec pcm_s24le -y "E:\source_08.wav"'

    startupinfo = subprocess.STARTUPINFO()
    startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
    p = Popen(command, startupinfo=startupinfo, shell=False, stdout=PIPE, stderr=PIPE, stdin=PIPE)

    while True:
        line = p.stderr.readline()
        if line == '':
            break
        print line
        self.SetStatusText(line)
speedyrazor
  • 3,127
  • 7
  • 33
  • 51
  • wonder if the progress is going to stderr? – rogerdpack Sep 24 '14 at 18:30
  • Sorry, that answer uses pexpect, which I already have working on Mac. My question relates only to Windows, so can't use pexpect. – speedyrazor Sep 24 '14 at 20:17
  • @speedyrazor There are other answers there which may work for you. If those still won't work, I recommend adding a bounty to the old question instead of repeating it. Note that you're free to edit the question to make it more general if need be. – Veedrac Sep 28 '14 at 05:44

0 Answers0