[chronojump] ffplay Linux show pts time on play video
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ffplay Linux show pts time on play video
- Date: Sat, 15 Jun 2019 16:04:54 +0000 (UTC)
commit 1064ceccac7cb5b03c67f7e40ea02179dc5b1ac3
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Jun 15 18:04:23 2019 +0200
ffplay Linux show pts time on play video
src/webcamFfmpeg.cs | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/webcamFfmpeg.cs b/src/webcamFfmpeg.cs
index 872d2275..21ddd408 100644
--- a/src/webcamFfmpeg.cs
+++ b/src/webcamFfmpeg.cs
@@ -276,9 +276,19 @@ public class WebcamFfmpeg : Webcam
private List<string> createParametersPlayFile(string filename)
{
// ffplay -autoexit out.mp4
+ // experimental on Linux to show pts time (not length percentage)
+ // ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" -autoexit out.mp4
+
List<string> parameters = new List<string>();
- parameters.Insert (0, "-autoexit");
- parameters.Insert (1, filename);
+ int i=0;
+
+ if(os == UtilAll.OperatingSystems.LINUX) { //TODO: check if this works on Mac and Windows
+ parameters.Insert (i++, "-vf");
+ parameters.Insert (i++, "drawtext=text='%{pts\\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)");
+ }
+
+ parameters.Insert (i ++, "-autoexit");
+ parameters.Insert (i ++, filename);
return parameters;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]