1 Reply Latest reply: Aug 26, 2010 5:38 PM by 843790 RSS

    open video file in MPlayer on Ubuntu

    843790
      Good day !
      Can your please help me.
      I need to run a video file im MPlayer on Ubuntu via Java
      I make so (in main method):
      Runtime.getRuntime().exec("/usr/bin/mplayer -slave -quiet -idle home/andrew/downloads/play.avi");
      But nothing happens. I don't know why. Can your please help me in advice ?
        • 1. Re: open video file in MPlayer on Ubuntu
          843790
          As a start you need to read the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and implement ALL the recommendations. Take particular note of those traps involved in not handling stdout and stderr properly and make sure you wait for the process to complete before exiting the program.