cli, core: add --no-audio option to skip audio VAE decode and write video-only MP4 - #58
Open
lorenzoperrone wants to merge 1 commit into
Open
cli, core: add --no-audio option to skip audio VAE decode and write video-only MP4#58lorenzoperrone wants to merge 1 commit into
lorenzoperrone wants to merge 1 commit into
Conversation
…ideo-only MP4 Add --no-audio CLI flag and interactive !audio on|off REPL command to allow skipping the audio VAE decode stage and generating silent/video-only MP4s. - Add disable_audio parameter to struct h3_params and default initialization - Add --no-audio command line option to main.c - Bypass audio VAE decoding in h3_generate() when disable_audio is set - Use video-only h3_ffmpeg_write_rgb24() writer when audio is disabled - Add !audio [on|off] command and status display in h3_cli.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
h3_generate()always decodes the audio VAE (7 blocks) and muxes a soundtrack, even when only visual output is needed. This is primarily a workflow and output-control feature rather than a major performance optimization: on tested Apple Silicon (M2 Pro) it saves roughly 1–4 seconds, while text encoding, DiT, and the video VAE still dominate generation time.Changes
disable_audiofield tostruct h3_paramsand its default initialization inH3_PARAMS_DEFAULT, validated as zero-or-one like other boolean parameters.--no-audioCLI flag inmain.cand document it inusage().audio VAEdecoding phase inh3_generate()whendisable_audiois enabled;waveformremains zeroed, ensuring cleanup and error paths remain safe.h3_ffmpeg_write_rgb24()at mux time instead ofh3_ffmpeg_write_av_rgb24_f32().!audio [on|off]command andAudio: on/offdisplay in interactive!status(h3_cli.c).Use cases
Verification
Tested on Apple M2 Pro (macOS):
make testpasses all checks cleanly (ok: 1768 checks, FFmpeg mux tests pass).--no-audio, the generation skips theaudio VAEphase entirely.ffprobeconfirms the output container has only a single H.264 video stream and no audio stream:!statusdisplaysAudio: on,!audio offtoggles it toAudio: off, and!audiotoggles state back and forth as expected.