0

I run a shell command in a Java jar application, I use Runtime and process exec, but after some minutes the video and the java process freezes.

When I run the command alone in shell console it works fine.

In console it works:

ffplay -loglevel debug -autoexit -af volume=0.8  /home/fasepi/Vd_bn_cronometro_deportivo.mp4

the problem arises when I run this command in a java jar:

String playVideoCommand="ffplay -loglevel debug -autoexit -af volume=0.8  "+outputPath;

Process pr = rt.exec(playVideoCommand);
pr.waitFor();

I run this in Ubuntu 16.04 Java Openjdk 8

1 Answers1

0

You can try putting this before you execute your command to use graphics acceleration

System.setProperty("sun.java2d.opengl","True");