Monitoring process of ffmpeg in processing

So upon second look at Hamoids’ example I saw that he was getting the stdInput and stdError using the code below.
I’ve tried it and i get nothing at all once it prints the “# command output”, not even empty lines.
I’m pretty sure this is what i need, it just doesn’t work.

Any ideas?
@hamoid, are you kicking about?

Thanks,
Toast

BufferedReader stdInput = new BufferedReader(new 
      InputStreamReader(proc.getInputStream()));

    BufferedReader stdError = new BufferedReader(new 
      InputStreamReader(proc.getErrorStream()));

    println("# Command output");
    String s = null;
    while ((s = stdInput.readLine()) != null) {
      println(s);
    }

    println("# Command errors");
    while ((s = stdError.readLine()) != null) {
      println(s);
    }
  } 
1 Like