protected Integer doInBackground(String... paths) {
      Log.i(Prefs.TAG, "doInBackground started...");

      // delete previous log
      GeneralUtils.deleteFileUtil(workFolder + "/vk.log");

      PowerManager powerManager = (PowerManager) _act.getSystemService(Activity.POWER_SERVICE);
      WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "VK_LOCK");
      Log.d(Prefs.TAG, "Acquire wake lock");
      wakeLock.acquire();

      EditText commandText = (EditText) findViewById(R.id.CommandText);
      String commandStr = commandText.getText().toString();

      ///////////// Set Command using code (overriding the UI EditText) /////
      // String commandStr = "ffmpeg -y -i /sdcard/DCIM/Camera/in.mp4 -strict experimental -s
      // 320x240 -r 30 -aspect 3:4 -ab 48000 -ac 2 -ar 22050 -vcodec mpeg4 -b 2097152
      // /sdcard/DCIM/Camera/out.mp4";
      // String[] complexCommand = {"ffmpeg", "-y" ,"-i",
      // "/sdcard/DCIM/Camera/in.mp4","-strict","experimental","-s", "160x120","-r","25", "-vcodec",
      // "mpeg4", "-b", "150k", "-ab","48000", "-ac", "2", "-ar", "22050",
      // "/sdcard/DCIM/Camera/out.mp4"};
      ///////////////////////////////////////////////////////////////////////

      LoadJNI vk = new LoadJNI();
      try {

        // complex command
        // vk.run(complexCommand, workFolder, getApplicationContext());

        vk.run(GeneralUtils.utilConvertToComplex(commandStr), workFolder, getApplicationContext());

        // running without command validation
        // vk.run(complexCommand, workFolder, getApplicationContext(), false);

        // copying vk.log (internal native log) to the DCIM/Camera folder
        GeneralUtils.copyFileToFolder(vkLogPath, demoVideoFolder);

        //			} catch (CommandValidationException e) {
        //					Log.e(Prefs.TAG, "vk run exeption.", e);
        //					commandValidationFailedFlag = true;

      } catch (Throwable e) {
        Log.e(Prefs.TAG, "vk run exeption.", e);
      } finally {
        if (wakeLock.isHeld()) wakeLock.release();
        else {
          Log.i(Prefs.TAG, "Wake lock is already released, doing nothing");
        }
      }
      Log.i(Prefs.TAG, "doInBackground finished");
      return Integer.valueOf(0);
    }