mirror of
https://github.com/Wan-Video/Wan2.1.git
synced 2025-12-15 19:53:22 +00:00
added debug code for ffmpeg
This commit is contained in:
parent
a989d9d2c0
commit
7b6c6e11b5
@ -497,7 +497,8 @@ def combine_and_concatenate_video_with_audio_tracks(
|
||||
new_audio_from_start=False,
|
||||
source_audio_metadata=None,
|
||||
audio_bitrate='128k',
|
||||
audio_codec='aac'
|
||||
audio_codec='aac',
|
||||
verbose = False
|
||||
):
|
||||
inputs, filters, maps, idx = ['-i', video_path], [], ['-map', '0:v'], 1
|
||||
metadata_args = []
|
||||
@ -566,6 +567,8 @@ def combine_and_concatenate_video_with_audio_tracks(
|
||||
'-ac', '1',
|
||||
'-shortest', save_path_tmp]
|
||||
|
||||
if verbose :
|
||||
print(f"ffmpeg command: {cmd}")
|
||||
try:
|
||||
subprocess.run(cmd, check=True, capture_output=True, text=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
||||
6
wgp.py
6
wgp.py
@ -4208,7 +4208,7 @@ def generate_video(
|
||||
model_def = get_model_def(model_type)
|
||||
is_image = image_mode == 1
|
||||
if is_image:
|
||||
video_length = min_frames_if_references if "I" in video_prompt_type else 1
|
||||
video_length = min_frames_if_references if "I" in video_prompt_type or "V" in video_prompt_type else 1
|
||||
else:
|
||||
batch_size = 1
|
||||
temp_filenames_list = []
|
||||
@ -4981,7 +4981,7 @@ def generate_video(
|
||||
else:
|
||||
new_audio_tracks = control_audio_tracks
|
||||
|
||||
combine_and_concatenate_video_with_audio_tracks(video_path, save_path_tmp, source_audio_tracks, new_audio_tracks, source_audio_duration, audio_sampling_rate, new_audio_from_start = new_audio_from_start, source_audio_metadata= source_audio_metadata )
|
||||
combine_and_concatenate_video_with_audio_tracks(video_path, save_path_tmp, source_audio_tracks, new_audio_tracks, source_audio_duration, audio_sampling_rate, new_audio_from_start = new_audio_from_start, source_audio_metadata= source_audio_metadata, verbose = verbose_level>=2 )
|
||||
os.remove(save_path_tmp)
|
||||
if output_new_audio_temp_filepath is not None: os.remove(output_new_audio_temp_filepath)
|
||||
|
||||
@ -7585,7 +7585,7 @@ def generate_video_tab(update_form = False, state_dict = None, ui_defaults = Non
|
||||
value=ui_defaults.get("min_frames_if_references",5),
|
||||
visible=True,
|
||||
scale = 1,
|
||||
label="Generate more frames to preserve Reference Image Identity"
|
||||
label="Generate more frames to preserve Reference Image Identity or Control Image Information"
|
||||
)
|
||||
|
||||
with gr.Tab("Sliding Window", visible= sliding_window_enabled and not image_outputs) as sliding_window_tab:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user