There is an issue in ffprobe when extracting the duration in sexagesimal
format, example:
ffprobe test.mp4 -show_entries format=duration -v quiet -of csv="p=0"
-sexagesimal
Output is "0:02:07.896000" when it should be "00:02:07.896000".

- Ole Andre Birkedal
From 3934c5d937f97ebc61cc2b185e7a1a05a045b7f9 Mon Sep 17 00:00:00 2001
From: Ole Andre Birkedal <birke...@extab.net>
Date: Thu, 5 Mar 2015 15:52:33 +0100
Subject: [PATCH] Fixed the output format in sexagesimal to match the
 documentation (HH:MM:SS)

---
 ffprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffprobe.c b/ffprobe.c
index 1227f59..8d56fe5 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -251,7 +251,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
         secs  = secs - mins * 60;
         hours = mins / 60;
         mins %= 60;
-        snprintf(buf, buf_size, "%d:%02d:%09.6f", hours, mins, secs);
+        snprintf(buf, buf_size, "%02d:%02d:%09.6f", hours, mins, secs);
     } else {
         const char *prefix_string = "";
 
-- 
1.9.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to