[chronojump] More fixes on webcam ffmpeg windows
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] More fixes on webcam ffmpeg windows
- Date: Thu, 20 Sep 2018 14:15:29 +0000 (UTC)
commit 24d6882c95ee78b01b6e42fc69235baaee810c21
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Sep 20 16:15:05 2018 +0200
More fixes on webcam ffmpeg windows
src/webcamFfmpeg.cs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/webcamFfmpeg.cs b/src/webcamFfmpeg.cs
index 36eaf521..ecf8748b 100644
--- a/src/webcamFfmpeg.cs
+++ b/src/webcamFfmpeg.cs
@@ -111,8 +111,12 @@ public class WebcamFfmpeg : Webcam
}
parameters.Insert (i ++, "-i");
- parameters.Insert (i ++, videoDevice);
- parameters.Insert (i ++, Util.GetVideoTempFileName());
+ if(os == UtilAll.OperatingSystems.LINUX)
+ parameters.Insert (i ++, "\"" + videoDevice + "\"");
+ else //windows
+ parameters.Insert (i ++, "video=\"" + videoDevice + "\"");
+
+ parameters.Insert (i ++, "\"" + Util.GetVideoTempFileName() + "\"");
return parameters;
}
@@ -134,13 +138,19 @@ public class WebcamFfmpeg : Webcam
parameters.Insert (i ++, "dshow");
parameters.Insert (i ++, "-i");
- parameters.Insert (i ++, videoDevice);
+ if(os == UtilAll.OperatingSystems.LINUX)
+ parameters.Insert (i ++, "\"" + videoDevice + "\"");
+ else //windows
+ parameters.Insert (i ++, "video=\"" + videoDevice + "\"");
+
parameters.Insert (i ++, "-map");
parameters.Insert (i ++, "0");
parameters.Insert (i ++, "-c:v");
parameters.Insert (i ++, "libx264");
parameters.Insert (i ++, "-f");
parameters.Insert (i ++, "tee");
+
+ //TODO: Think on the \" for windows and maybe also for other OSes
parameters.Insert (i ++, "'" + Util.GetVideoTempFileName() + "|[f=nut]pipe:'");
parameters.Insert (i ++, "|");
parameters.Insert (i ++, "ffplay");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]