File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
geckodriver.log
6
6
server.log
7
7
tmp /*
8
+ downloaded /*
9
+ output /*
Original file line number Diff line number Diff line change 6
6
import os
7
7
from TikTokApi import TikTokApi
8
8
9
+
10
+ # Creates new folders
9
11
if not os .path .isdir ('output' ):
10
12
os .mkdir ('output' )
11
13
12
14
if not os .path .isdir ('downloaded' ):
13
15
os .mkdir ('downloaded' )
14
16
15
17
18
+ # Functions to use later
16
19
def getLength (pathtofile ):
17
20
secsval = os .popen ('''ffprobe -i ''' + pathtofile +
18
21
''' -show_entries format=duration -v quiet -of csv="p=0"''' ).read ()
19
22
secsval .replace ("\n " , "" )
20
23
secs = float (secsval )
21
24
return secs
22
25
23
-
24
26
def getSize (pathtofile ):
25
27
size = os .popen (
26
28
"ffprobe -v error -select_streams v:0 -show_entries stream=width,height -v quiet -of csv=s=x:p=0 " + pathtofile ).read ()
@@ -58,6 +60,10 @@ def clearTMP(delpath):
58
60
clearTMP ("downloaded/*" )
59
61
clearTMP ('output/output.mp4' )
60
62
63
+
64
+ #
65
+ # Start interface
66
+ #
61
67
print ("Pick a video length (1-3)" )
62
68
print ("1. 2-3 minutes" )
63
69
print ("2. 5-7 minutes" )
You can’t perform that action at this time.
0 commit comments