handle duration: N/A from ffprobe
This commit is contained in:
parent
a09f28b34f
commit
e25bf292ca
1 changed files with 4 additions and 1 deletions
3
feed
3
feed
|
@ -380,7 +380,10 @@ def get_duration(url):
|
|||
raise DurationNotFound(url) from exc
|
||||
duration = next(l for l in lineout if l.startswith(b"duration="))
|
||||
value = duration.split(b"=")[1]
|
||||
try:
|
||||
return int(float(value))
|
||||
except ValueError as exc:
|
||||
raise DurationNotFound(url) from exc
|
||||
|
||||
|
||||
HELP = """
|
||||
|
|
Loading…
Reference in a new issue