Smriti77 commited on
Commit
68e2774
·
verified ·
1 Parent(s): a167990

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -234,17 +234,17 @@ def merge_videos(video_list, output_path="temp/output.mp4"):
234
  list_path = "temp/video_list.txt"
235
  with open(list_path, "w") as f:
236
  for path in verified_paths:
237
- # Use absolute paths to avoid any directory confusion
238
  abs_path = os.path.abspath(path)
239
  f.write(f"file '{abs_path}'\n")
240
 
241
- # Run ffmpeg with absolute paths
242
  abs_output = os.path.abspath(output_path)
243
  abs_list = os.path.abspath(list_path)
244
 
245
  command = f"ffmpeg -f concat -safe 0 -i '{abs_list}' -c copy '{abs_output}' -y"
246
 
247
- # Print the command for debugging
248
  print(f"Running command: {command}")
249
 
250
  process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
234
  list_path = "temp/video_list.txt"
235
  with open(list_path, "w") as f:
236
  for path in verified_paths:
237
+
238
  abs_path = os.path.abspath(path)
239
  f.write(f"file '{abs_path}'\n")
240
 
241
+
242
  abs_output = os.path.abspath(output_path)
243
  abs_list = os.path.abspath(list_path)
244
 
245
  command = f"ffmpeg -f concat -safe 0 -i '{abs_list}' -c copy '{abs_output}' -y"
246
 
247
+
248
  print(f"Running command: {command}")
249
 
250
  process = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)