public void start() {
		synchronized (syncSS) {
			if (ps != null) {
				ps.destroy();
				ps = null;
			}

			needExit = false;

			Thread t = new Thread(new Runnable() {
				String[] cmd = new String[] { "/usr/local/bin/ffserver", "-f", cfgPath };

				@Override
				public void run() {
					try {
						while (needExit == false) {
							ps = Runtime.getRuntime().exec(cmd);
							if(ps == null)
								continue;
							BufferedReader br = new BufferedReader(
									new InputStreamReader(ps.getErrorStream()));
							String line;
							while ((line = br.readLine()) != null) {
								System.out.println(line);
							}

							ps.waitFor();
							System.out.println("Restarting ffserver ... ...");
							Thread.sleep(1000);
						}

						ps = null;

					} catch (Exception e) {
						e.printStackTrace();
					} finally {
						needExit = true;

						if (ps != null) {
							ps.destroy();
							ps = null;
						}
					}
				}
			});
			t.start();

			while (needExit == false && ps == null) {
				try {
					Thread.sleep(1000);
				} catch (InterruptedException ex) {
					ex.printStackTrace();
				}
			}
			startAllFFmpeg();
		}
	}