|
@@ -132,12 +132,12 @@ def read_video(source, duration=60):
|
|
|
|
|
|
with tempfile.TemporaryDirectory() as tmpd:
|
|
with tempfile.TemporaryDirectory() as tmpd:
|
|
run_check(
|
|
run_check(
|
|
- f"ffmpeg -hide_banner -loglevel error -y -i {tmpf.name} -vf mpdecimate -r 1/1 {tmpd.name}/%d.bmp"
|
|
|
|
|
|
+ f"ffmpeg -hide_banner -loglevel error -y -i {tmpf.name} -vf mpdecimate -r 1/1 {tmpd}/%d.bmp"
|
|
)
|
|
)
|
|
|
|
|
|
data = b""
|
|
data = b""
|
|
- for filename in os.listdir(tmpd.name):
|
|
|
|
- data += extract_image(os.path.join(tmpd.name, filename))
|
|
|
|
|
|
+ for filename in os.listdir(tmpd):
|
|
|
|
+ data += extract_image(os.path.join(tmpd, filename))
|
|
|
|
|
|
return data
|
|
return data
|
|
|
|
|