feat: add video generation commands (SeeDance2.0)#8
Merged
Conversation
…straints - Add --input-video-duration (required with --reference-video, range 2-15) - Change --generate-audio to --no-generate-audio (preserve server default: true) - Clarify URLs must be local files or platform asset URLs (not arbitrary external) - Add full parameter validation rules (duration 4-15, seed range, 1080p pro-only, frame/reference mode mutual exclusion, max counts) - Align default model to server default (doubao-seedance-2-fast) - Increase polling timeout to 1200s Part of marswaveai/listenhub-ralph#127
- reference-audio requires reference-image or reference-video (not just prompt) - reference-audio is part of reference mode, cannot mix with frame mode - video command uploads use category=episode (private upload) instead of banana - resolveFileOrUrl gets category override param; existing image cmd unchanged Part of marswaveai/listenhub-ralph#127
7-step plan covering SDK upgrade, upload extension, polling, video module (create/get/list/estimate), CLI registration, and README. Part of marswaveai/listenhub-ralph#127
- Video: mp4/mov only, 50MB max (no webm) - Audio for video cmd: mp3/wav only, 15MB max - Add --input-video-duration without --reference-video validation (both directions) - estimate: --input-video-duration and --has-video-input must pair - Step 7: add pnpm build + smoke check (video --help) - Fix README nested fence, add README.zh-CN.md to plan Part of marswaveai/listenhub-ralph#127
New `listenhub video` command group with create, get, list, and estimate subcommands. Upgrades SDK to 0.0.6 and extends upload utility to support video files (.mp4/.mov, max 50MB).
When --reference-video points to a local file and --input-video-duration is omitted, the CLI now reads the mvhd atom to extract the duration automatically. URLs still require explicit --input-video-duration.
When auto-detected duration exceeds the 2-15s API range, prompt the user to specify how much of the reference video to use instead of silently passing an invalid value.
These documents served their purpose during planning and are not needed in the final deliverable.
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.
Summary
listenhub videocommand group:create,get,list,estimate@marswave/listenhub-sdkto^0.0.6for video generation API supportupload.tsto support video files (.mp4/.mov, max 50MB) withcategoryoverridepollVideoTaskUntilDonewith 1200s default timeoutPart of marswaveai/listenhub-ralph#127
Test plan
listenhub video create --prompt "..." --no-waitsubmits successfullylistenhub video create --prompt "..." --first-frame ./image.pngworks with local uploadlistenhub video create --prompt "..." --reference-video ./clip.mp4 --input-video-duration 5workslistenhub video listshows task historylistenhub video get <id>displays task detailslistenhub video estimate --model doubao-seedance-2-pro --resolution 1080p --duration 10returns credits--no-generate-audiocorrectly disables audio trackpnpm checkpasses clean