function startVideo(r)
{
    var url = r.videoURL;
    debug("launching video " + url);

    try {
      var playerpath = prefService().getCharPref("zeipis.videoplayer.path");
      var playerargsStr = prefService().getCharPref("zeipis.videoplayer.args");
      var playerargs = playerargsStr.split(" ");
    } catch (e) { errorCritical("Please set the video player path and args prefs"); }

    playerargs.push(url);

    try {
      var execfile = Components.classes["@mozilla.org/file/local;1"]
                           .createInstance(Components.interfaces.nsILocalFile);
      execfile.initWithPath(playerpath);
      var process = Components.classes["@mozilla.org/process/util;1"]
                              .createInstance(Components.interfaces.nsIProcess);
      process.init(execfile);
      debug("launching " + playerpath + " " + playerargs.join(" "));
      process.run(false, playerargs, playerargs.length)
    } catch (e) { errorCritical(e); }
}
