Error with newer versions of ffprobe

Issue #124 resolved
MarkJ created an issue

When the system version of ffprobe is newer, and no longer has the -show_format_entry option, an error is shown, and the transport stream file sticks around.

This fixes it:

diff --git a/common.py b/common.py
index cd4c266..fbe83d5 100644
--- a/common.py
+++ b/common.py
@@ -178,7 +178,7 @@ def get_duration(filename):
     cmd = [
         ffprobe,
         filename,
-        "-show_format_entry", "duration",
+        "-show_entries", "format=duration",
         "-v", "quiet",
     ]
     output = subprocess.check_output(cmd).decode("utf-8")

But you may need more to handle both the old and new versions.

Comments (4)

  1. delx repo owner

    Sorry for the slow reply, life has been busy lately. Thanks for this fix, I’ve committed it :-)

  2. Log in to comment