Q:

How to Change priority process

I have 
   List<String> commands = Arrays.asList(commandv);
   ProcessBuilder pb = new ProcessBuilder("[C:\ffmpeg\ffmpeg.exe, -i, "C:\file\video.mp4",-flags, +loop, -cmp, +chroma, -partitions, +parti4x4+partp8x8+partb8x8, -me_method, umh, -subq, 6, -me_range, 16, -g, 250, -keyint_min, 25, -sc_threshold, 40, -i_qfactor, 0.71, -b_strategy, 1, -threads, 4, -b:v, 200k, , -r, 25, -v, warning, -ac, 1, -ab, 96k, -y, -vf, "scale=640:360", "C:\newVideo\video.mp4"]");
   Process proc = pb.start();

How I can set the process priority from "hight" to "low" in java?

A:

There's no way to set priority of a process in Java.
Only thread priority.
But you can use system commands to run process with designated priority :
Linux: new ProcessBuilder("nice", "-n", "10", "somecommand", "arg1", "arg2"); 
Windows:    new ProcessBuilder("cmd", "/C start /B /belownormal /WAIT javaws -sdasd"); 

