mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-23 17:27:25 +00:00
ffmpeg file analysis returns duration as integer now
This commit is contained in:
parent
16d7547e03
commit
5ec74f8abe
1 changed files with 2 additions and 2 deletions
|
@ -354,7 +354,7 @@ class VideoFileAnalyzer:
|
||||||
def _build_spec(scan_data):
|
def _build_spec(scan_data):
|
||||||
assert scan_data
|
assert scan_data
|
||||||
|
|
||||||
duration = float(scan_data["format"]["duration"]) # existence verified when scan_data made
|
duration = int(scan_data["format"]["duration"]) # existence verified when scan_data made
|
||||||
width = -1
|
width = -1
|
||||||
height = -1
|
height = -1
|
||||||
for stream in scan_data["streams"]:
|
for stream in scan_data["streams"]:
|
||||||
|
@ -363,7 +363,7 @@ class VideoFileAnalyzer:
|
||||||
width = max(width, int(stream["width"]))
|
width = max(width, int(stream["width"]))
|
||||||
height = max(height, int(stream["height"]))
|
height = max(height, int(stream["height"]))
|
||||||
|
|
||||||
log.debug(" Detected duration: %f sec. with resolution: %d x %d", duration, width, height)
|
log.debug(" Detected duration: %d sec. with resolution: %d x %d", duration, width, height)
|
||||||
|
|
||||||
spec = {"duration": duration}
|
spec = {"duration": duration}
|
||||||
if height >= 0:
|
if height >= 0:
|
||||||
|
|
Loading…
Add table
Reference in a new issue