Spaces:
Running
Running
Commit
•
f4c0758
1
Parent(s):
ecd2790
Update app.py
Browse files
app.py
CHANGED
@@ -57,6 +57,7 @@ for cu_video in myList:
|
|
57 |
print(VideosNames)
|
58 |
|
59 |
def texttoSign(text):
|
|
|
60 |
listofwords=parse_string(text,VideosNames)
|
61 |
listofwords=remove_empty_values(listofwords)
|
62 |
index=0
|
@@ -68,8 +69,13 @@ def texttoSign(text):
|
|
68 |
clips=[]
|
69 |
for i in range(len(listofwords)):
|
70 |
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
result_clip=concatenate_videoclips(clips, method='compose')
|
75 |
result_clip.write_videofile("combined.mp4", fps=30)
|
|
|
57 |
print(VideosNames)
|
58 |
|
59 |
def texttoSign(text):
|
60 |
+
framescount=0
|
61 |
listofwords=parse_string(text,VideosNames)
|
62 |
listofwords=remove_empty_values(listofwords)
|
63 |
index=0
|
|
|
69 |
clips=[]
|
70 |
for i in range(len(listofwords)):
|
71 |
|
72 |
+
path="Dataset/"+(listofwords[i])+".mp4"
|
73 |
+
data=cv2.VideoCapture(path)
|
74 |
+
framescount = data.get(cv2.CAP_PROP_FRAME_COUNT)
|
75 |
+
fps = data.get(cv2.CAP_PROP_FPS)
|
76 |
+
seconds = round(framescount / fps)
|
77 |
+
clips.append(VideoFileClip(path))
|
78 |
+
clips[i]=clips[i].subclip(1, seconds/2)
|
79 |
|
80 |
result_clip=concatenate_videoclips(clips, method='compose')
|
81 |
result_clip.write_videofile("combined.mp4", fps=30)
|