Kosinkadink / ComfyUI-VideoHelperSuite

Nodes related to video workflows
GNU General Public License v3.0
542 stars 95 forks source link

Error occurred when executing VHS_VideoCombine: An error occured in the ffmpeg subprocess #267

Open 0002kgHg opened 1 month ago

0002kgHg commented 1 month ago

Error occurred when executing VHS_VideoCombine:

An error occured in the ffmpeg subprocess: [Parsed_apad_0 @ 0x55637e7820a0] Option 'whole_dur' not found [AVFilterGraph @ 0x55637e77d2c0] Error initializing filter 'apad' with args 'whole_dur=6.875' Error reinitializing filters! Failed to inject frame into filter network: Option not found Error while processing the decoded data for stream #1:0

File "/comfyui/execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/comfyui/execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/comfyui/execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/comfyui/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 546, in combine_video raise Exception("An error occured in the ffmpeg subprocess:\n" \

workflow (2)

AustinMroz commented 1 month ago

Most likely related a result of an old system version of ffmpeg installed. Will likely be fixed by

The whole_dur option was added about 2 months ago as a workaround to a bug in ffmpeg 7.0. While this bug appears to be fixed in the newest versions of ffmpeg, I'm reluctant to remove this workaround as I expect people will have the bugged version of ffmpeg installed.

0002kgHg commented 1 month ago

![Uploading 企业微信截图_393d7f43-55a5-44c8-827d-f1bb4a11e20a.png…]()

My ffmpeg is already up to date, but I am still encountering errors. The workflow runs successfully, and the output video files do appear in the output folder. However, they cannot be previewed in the ComfyUI interface. Additionally, there are three output files: one PNG image and two MP4 files. One of the MP4 files, which contains audio, is empty, while the other MP4 file without audio is intact. I suspect that the error originates from the audio file output.

AustinMroz commented 1 month ago

Of the two images uploaded, I am only able to view the first which shows an ffmpeg version of 3.4. FFmepg 3.4 was released 7 years ago. The oldeest version of ffmpeg which is actively tested against is version 4.2.2, which was released 5 years ago.

0002kgHg commented 1 month ago

在上传的两张图片中,我只能查看第一张图片,它显示的是 ffmpeg 3.4 版本。FFmepg 3.4 是在 7 年前发布的。积极测试的 ffmpeg 的最旧版本是 4.2.2 版,该版本于 5 年前发布。

123124

Sorry, this image failed to upload, but I did update it but it still failed.

0002kgHg commented 1 month ago

I am now very sure that it is an audio problem, as an error message appears when I connect the audio.

0002kgHg commented 1 month ago

got prompt [rgthree] Using rgthree's optimized recursive execution.

675 [VHS_LoadVideo]: 0.08s

set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted set_mempolicy: Operation not permitted !!! Exception during processing!!! An error occured in the ffmpeg subprocess: [Parsed_apad_0 @ 0x5579bc2b05a0] Option 'whole_dur' not found [AVFilterGraph @ 0x5579bc296820] Error initializing filter 'apad' with args 'whole_dur=2.0' Error reinitializing filters! Failed to inject frame into filter network: Option not found Error while processing the decoded data for stream #1:0

Traceback (most recent call last): File "/comfyui/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 543, in combine_video res = subprocess.run(mux_args, input=audio_data, File "/root/anaconda3/envs/ComfyUI/lib/python3.10/subprocess.py", line 526, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/usr/bin/ffmpeg', '-v', 'error', '-n', '-i', '/comfyui/temp/AnimateDiff_00002.mp4', '-ar', '8000', '-ac', '2', '-f', 'f32le', '-i', '-', '-c:v', 'copy', '-c:a', 'aac', '-af', 'apad=whole_dur=2.0', '-shortest', '/comfyui/temp/AnimateDiff_00002-audio.mp4']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/comfyui/execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/comfyui/execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/comfyui/execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "/comfyui/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/nodes.py", line 546, in combine_video raise Exception("An error occured in the ffmpeg subprocess:\n" \ Exception: An error occured in the ffmpeg subprocess: [Parsed_apad_0 @ 0x5579bc2b05a0] Option 'whole_dur' not found [AVFilterGraph @ 0x5579bc296820] Error initializing filter 'apad' with args 'whole_dur=2.0' Error reinitializing filters! Failed to inject frame into filter network: Option not found Error while processing the decoded data for stream #1:0