I'm not sure if the problem is with PB's Process library or within FFMPEG itself. I am using the
latest FFMPEG build. And it behaves very strange even with these simple parameters from the code below. It returns only exit code 1 and no output, but if I change the parameters to "-h", it behaves normally and outputs all the help with exit code 0. ReadProgramString does not read any program output, nor does ReadProgramData. My goal is to keep track on the conversion process through the console output, but no success so far...
Code: Select all
asdf = RunProgram("ffmpeg.exe", "-i test.mp4", "", #PB_Program_Open|#PB_Program_Read|#PB_Program_Hide|#PB_Program_Error)
If IsProgram(asdf)
While ProgramRunning(asdf)
If AvailableProgramOutput(asdf)
Debug ReadProgramString(asdf)
EndIf
Wend
Debug ProgramExitCode(asdf)
CloseProgram(asdf)
EndIf