From 832b1d3444e2f0e719ad5e4ae213ce3b9f8e0a87 Mon Sep 17 00:00:00 2001 From: Javanaut Date: Sat, 21 Oct 2023 12:26:27 +0200 Subject: [PATCH] ff --- bin/ffx.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/ffx.py b/bin/ffx.py index 79b94c7..8075c55 100755 --- a/bin/ffx.py +++ b/bin/ffx.py @@ -94,10 +94,14 @@ if not dtsBandwidth.endswith('k'): cropStart = '' cropLength = '' -cropTokens = [c for c in sys.argv if c.startswith('crop=')] +cropTokens = [c for c in sys.argv if c.startswith('crop')] if cropTokens: - cropString = cropTokens[0].split('=')[1] - cropStart, cropLength = cropString.split(',') + if '=' in cropTokens[0]: + cropString = cropTokens[0].split('=')[1] + cropStart, cropLength = cropString.split(',') + else: + cropStart = 60 + cropLength = 180 output = executeProcess(["ffprobe", "-show_streams", "-of", "json" ,inputFilename])