chompionsawelo commited on
Commit
eb6aaad
·
1 Parent(s): 39d50e3
Files changed (2) hide show
  1. set_up.py +4 -0
  2. video_tool.py +2 -4
set_up.py CHANGED
@@ -32,6 +32,10 @@ def prepare_input(input_file, start_time, end_time, lang, model_size, use_summar
32
  file_name.start_time_for_adjustment = start_time
33
  file_name.end_time_for_adjustment = end_time
34
 
 
 
 
 
35
  # Convert video to audio
36
  progress(0.2, desc=ui_lang["progress_preparing_video"])
37
  convert_video_to_audio(
 
32
  file_name.start_time_for_adjustment = start_time
33
  file_name.end_time_for_adjustment = end_time
34
 
35
+ print(f"SOURCE: {input_file}")
36
+ print(f"VIDEO FILE: {file_name.input_file}")
37
+ print(f"AUDIO FILE: {file_name.audio_file}")
38
+
39
  # Convert video to audio
40
  progress(0.2, desc=ui_lang["progress_preparing_video"])
41
  convert_video_to_audio(
video_tool.py CHANGED
@@ -4,14 +4,12 @@ import ffmpeg
4
  def convert_video_to_audio(input_file, output_file, start_time, end_time):
5
  print(input_file)
6
  print(output_file)
7
- _, err = (
8
  ffmpeg
9
  .input(input_file, ss=start_time, to=end_time)
10
  .output(output_file, format="wav", acodec='pcm_s16le')
11
- .run(overwrite_output=True, capture_stderr=True)
12
  )
13
- print(err)
14
-
15
 
16
  def add_subtitle_to_video(input_file, subtitle_file, output_file, start_time, end_time):
17
  (
 
4
  def convert_video_to_audio(input_file, output_file, start_time, end_time):
5
  print(input_file)
6
  print(output_file)
7
+ (
8
  ffmpeg
9
  .input(input_file, ss=start_time, to=end_time)
10
  .output(output_file, format="wav", acodec='pcm_s16le')
11
+ .run(overwrite_output=True)
12
  )
 
 
13
 
14
  def add_subtitle_to_video(input_file, subtitle_file, output_file, start_time, end_time):
15
  (