facefusion/facefusion · warning
restoring_audio_skipped
Error message
restoring_audio_skipped
What it means
This warning is logged by FaceFusion's video workflow when the standard audio-restoration branch fails: ffmpeg.restore_audio() (which copies audio from the target video into the temp processed video within trim_frame_start..trim_frame_end) returned False. As with the replace-audio branch it is non-fatal — the video pool is cleared and move_temp_file promotes the temp file to output_path — so the workflow completes but the output video is missing the original audio. It usually stems from FFmpeg being unable to extract/remux the audio for the requested frame range, an unsupported audio codec, or missing temp/output paths.
Source
Thrown at facefusion/workflows/to_video.py:207
if source_audio_path:
if ffmpeg.replace_audio(state_manager.get_item('target_path'), source_audio_path, state_manager.get_item('output_path')):
video_manager.clear_video_pool()
logger.debug(translator.get('replacing_audio_succeeded'), __name__)
else:
video_manager.clear_video_pool()
if is_process_stopping():
return 4
logger.warn(translator.get('replacing_audio_skipped'), __name__)
move_temp_file(state_manager.get_item('target_path'), state_manager.get_item('output_path'))
else:
if ffmpeg.restore_audio(state_manager.get_item('target_path'), state_manager.get_item('output_path'), trim_frame_start, trim_frame_end):
video_manager.clear_video_pool()
logger.debug(translator.get('restoring_audio_succeeded'), __name__)
else:
video_manager.clear_video_pool()
if is_process_stopping():
return 4
logger.warn(translator.get('restoring_audio_skipped'), __name__)
move_temp_file(state_manager.get_item('target_path'), state_manager.get_item('output_path'))
return 0
def finalize_video(start_time : float) -> ErrorCode:
if is_video(state_manager.get_item('output_path')):
logger.info(translator.get('processing_video_succeeded').format(seconds = calculate_end_time(start_time)), __name__)
else:
logger.error(translator.get('processing_video_failed'), __name__)
return 1
return 0
View on GitHub (pinned to 4b1dedb853)
Solutions
- Verify FFmpeg presence/version (ffmpeg -version) and that the target's audio codec is supported (ffprobe target.mp4).
- Check that trim_frame_start/trim_frame_end are within the video's frame range and that the range contains audio.
- Ensure output_path directory exists and is writable, with enough disk space for the remux.
- Avoid interrupting the job during finalization so the is_process_stopping() branch isn't taken.
- If audio is still dropped, mux it back manually: ffmpeg -i out.mp4 -itsoffset <offset> -i target.mp4 -map 0:v -map 1:a -c copy final.mp4.
Example fix
# before python facefusion.py run -s src.png -t clip.mp4 -o out.mp4 --trim-frame-start 0 --trim-frame-end 99999 # after (valid range within video; verified audio codec) ffprobe -v error -show_entries stream=nb_frames,codec_name clip.mp4 python facefusion.py run -s src.png -t clip.mp4 -o out.mp4 --trim-frame-start 0 --trim-frame-end 250
Defensive patterns
Strategy: fallback
Validate before calling
import subprocess, json, shutil
def audio_restorable(path: str, frame_start: int, frame_end: int) -> bool:
if not shutil.which('ffprobe'):
return False
probe = subprocess.run(['ffprobe', '-v', 'error', '-show_entries', 'stream=nb_frames,codec_type,codec_name', '-of', 'json', path], capture_output=True, text=True)
if probe.returncode != 0:
return False
streams = json.loads(probe.stdout).get('streams', [])
has_audio = any(s.get('codec_type') == 'audio' for s in streams)
nb_frames = max(int(s.get('nb_frames', 0) or 0) for s in streams if s.get('codec_type') == 'video') or None
in_range = nb_frames is None or (0 <= frame_start < nb_frames and frame_end >= frame_start)
return has_audio and in_range When it happens
Trigger: Running a video job without the conditional-audio option where ffmpeg.restore_audio(target_path, output_path, trim_frame_start, trim_frame_end) returns False because: (1) trim_frame_start/trim_frame_end define a range with no matching audio, (2) the target's audio codec is unsupported by the installed FFmpeg, (3) the temp processed video was removed (video pool cleared) or output_path is unwritable, (4) the process is stopping (the adjacent is_process_stopping() check returns exit code 4 before the warn in that case), or (5) FFmpeg is absent/outdated.
Common situations: Using --trim-frame-start/--trim-frame-end values that clip outside the audio timeline; processing videos with exotic audio (e.g. AC-3, Opus in odd containers) on a slim FFmpeg build; CI containers without FFmpeg encoders; cancelled jobs; outputs ending up silent and users filing 'no audio in result' issues.
Related errors
AI-assisted analysis of facefusion/facefusion@4b1dedb853 (2026-08-28).
Data as JSON: /api/errors/efce38405ddf6e2f.
Report an issue: GitHub.