You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--range`|`-r`|| Frame range to render (start:end) |
34
+
|`--audio`|`-a`|| Audio file to include (mp3, wav, etc.) |
35
+
|`--help`||| Show help message |
36
+
|`--version`||| Show version number |
36
37
37
38
## Examples
38
39
@@ -134,6 +135,41 @@ The range format is `start:end` where:
134
135
Partial rendering keeps `durationInFrames` unchanged so your animations calculate correctly. Only the specified frames are actually rendered and encoded.
135
136
:::
136
137
138
+
### Audio
139
+
140
+
Add background music or sound effects to your video with the `--audio` flag:
141
+
142
+
```bash
143
+
# Add background music
144
+
npx pellicule Video -a background.mp3
145
+
146
+
# With other options
147
+
npx pellicule Video -o intro.mp4 --audio music.wav
148
+
```
149
+
150
+
Supported formats include MP3, WAV, AAC, and any format FFmpeg supports. The audio is re-encoded to AAC for universal MP4 compatibility.
151
+
152
+
#### Audio Behavior
153
+
154
+
-**Video duration is the source of truth** — audio does not affect video length
155
+
- If audio is **shorter** than video: audio ends, video continues (silent for remainder)
156
+
- If audio is **longer** than video: audio is truncated to match video duration
157
+
158
+
#### Audio in defineVideoConfig
159
+
160
+
You can also specify audio directly in your component:
161
+
162
+
```vue
163
+
<script setup>
164
+
defineVideoConfig({
165
+
durationInSeconds: 10,
166
+
audio: './background.mp3'
167
+
})
168
+
</script>
169
+
```
170
+
171
+
The path is resolved relative to the component file. CLI flags override component config.
0 commit comments