Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. When I execute ffmpeg command through java code then It is not executing properly
  2. Example-:
  3.  
  4. BufferedReader stdInput = new BufferedReader(new
  5. InputStreamReader(p4.getInputStream()));
  6.  
  7. BufferedReader stdError = new BufferedReader(new
  8. InputStreamReader(p4.getErrorStream()));
  9.  
  10. // read the output from the command
  11. System.out.println("Here is the standard output of the command:n");
  12. while ((s = stdInput.readLine()) != null) {
  13. System.out.println(s);
  14. }
  15.  
  16. // read any errors from the attempted command
  17. System.out.println("Here is the standard error of the command (if any):n");
  18. while ((s = stdError.readLine()) != null) {
  19. System.out.println(s);
  20. }
  21.  
  22.  
  23. }
  24. catch (IOException e) {
  25. System.out.println("exception happened - here's what I know: ");
  26. e.printStackTrace();
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement