File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,10 @@ def motion_levels(
244
244
stream = container .streams .video [mobj .stream ]
245
245
stream .thread_type = "AUTO"
246
246
247
- inaccurate_dur = int (stream .duration * stream .time_base * stream .average_rate )
247
+ if stream .duration is None :
248
+ inaccurate_dur = 1
249
+ else :
250
+ inaccurate_dur = int (stream .duration * stream .time_base * stream .average_rate )
248
251
249
252
bar .start (inaccurate_dur , "Analyzing motion" )
250
253
@@ -325,7 +328,10 @@ def pixeldiff_levels(
325
328
stream = container .streams .video [pobj .stream ]
326
329
stream .thread_type = "AUTO"
327
330
328
- inaccurate_dur = int (stream .duration * stream .time_base * stream .average_rate )
331
+ if stream .duration is None :
332
+ inaccurate_dur = 1
333
+ else :
334
+ inaccurate_dur = int (stream .duration * stream .time_base * stream .average_rate )
329
335
330
336
bar .start (inaccurate_dur , "Analyzing pixel diffs" )
331
337
You can’t perform that action at this time.
0 commit comments