-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
local_t_est.py
47 lines (34 loc) · 910 Bytes
/
local_t_est.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
import threading
from time import sleep
from pyffmpeg import FFmpeg
ff = FFmpeg()
ff.loglevel = 'info'
test_folder = os.path.abspath('./tests')
def tt():
t_th = threading.Thread(target=ov)
t_th.daemon = True
t_th.start()
qq()
def qq():
sleep(3)
print(ff._ffmpeg_instances)
ff.quit('convert')
def ov():
input_file = os.path.join(test_folder, 'count down.mp4')
output_file = os.path.join(test_folder, './outs/fa.mp3')
#input_file = "https://raw.githubusercontent.com/deuteronomy-works/pyffmpeg/master/tests/countdown.mp4"
out = ff.convert(input_file, output_file)
# print(ff.error)
if ff.error:
if 'Output' in ff.error:
assert True
else:
pass
# print(ff.error)
else:
assert True
#fps = ff.get_fps("H:/CS/practice/python/pyffmpeg subproces/vid.mp4")
#print(fps)
ov()
# tt()