@Override
  protected void shutdown() {

    // pause interactor
    pause();

    // stop head movement
    if (headMovement != null) {
      System.out.print("Stopping head movement...");
      headMovement.finish();
      while (!headMovement.isFinished()) {
        try {
          Thread.sleep(500);
        } catch (Exception e) {
          e.printStackTrace();
        }
        System.out.print(".");
      }
      System.out.println("finished");
    }

    // unsubscribe
    synchronized (video) {
      video.unsubscribe(NAME);
    }

    System.exit(0);
  }