TheChesireCat
commited on
Commit
·
1c5da7d
1
Parent(s):
2ee559e
yes
Browse files
app.py
CHANGED
@@ -49,7 +49,7 @@ def streamlit_video_detect(uploaded_file, centerface, threshold, replacewith, ma
|
|
49 |
|
50 |
|
51 |
# Create a video writer object
|
52 |
-
out = cv2.VideoWriter(processed_video_temp_path, cv2.VideoWriter_fourcc(*'
|
53 |
|
54 |
# Progress Bar setup
|
55 |
progress_text = "Processing video. Please wait."
|
@@ -74,7 +74,7 @@ def streamlit_video_detect(uploaded_file, centerface, threshold, replacewith, ma
|
|
74 |
|
75 |
# Empty the progress bar after completion
|
76 |
my_bar.empty()
|
77 |
-
os.system(f"ffmpeg -y -i {processed_video_temp_path} -
|
78 |
# If keep_audio is checked, use FFmpeg to overlay the original audio on the processed video
|
79 |
if keep_audio:
|
80 |
st.write("Overlaying audio. Please wait...")
|
|
|
49 |
|
50 |
|
51 |
# Create a video writer object
|
52 |
+
out = cv2.VideoWriter(processed_video_temp_path, cv2.VideoWriter_fourcc(*'mp4v'), fps, (width, height))
|
53 |
|
54 |
# Progress Bar setup
|
55 |
progress_text = "Processing video. Please wait."
|
|
|
74 |
|
75 |
# Empty the progress bar after completion
|
76 |
my_bar.empty()
|
77 |
+
os.system(f"ffmpeg -y -i {processed_video_temp_path} -c:v libx264 {processed_video_temp_path}")
|
78 |
# If keep_audio is checked, use FFmpeg to overlay the original audio on the processed video
|
79 |
if keep_audio:
|
80 |
st.write("Overlaying audio. Please wait...")
|