Video Generation Audio & Sound
JsonCut provides comprehensive audio capabilities for your videos, including background music, voiceovers, sound effects, and advanced mixing controls. You can layer multiple audio sources and apply professional audio processing techniques.
Background Audio
Add background music that plays throughout your entire video with automatic looping support.
{
"type": "video",
"config": {
"audioFilePath": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/dc4010ef-d0db-43b6-927f-10ddf6761129.mp3",
"loopAudio": true,
"outputVolume": 0.8,
"clips": [
{
"duration": 10,
"layers": [
{
"type": "title-background",
"text": "Looping Background Music",
"textColor": "#ffffff"
}
]
}
]
}
}
Background Audio Properties
Property | Type | Description |
---|---|---|
audioFilePath | string | Path to background audio file |
loopAudio | boolean | Automatically loop audio if shorter than video |
outputVolume | number | Final output volume (0-1) |
keepSourceAudio | boolean | Keep original audio from video layers |
clipsAudioVolume | number | Volume for audio from clips relative to tracks |
Audio Tracks
Add multiple audio tracks that can start and stop at specific times, independent of clip structure
{
"type": "video",
"config": {
"width": 1920,
"height": 1080,
"audioTracks": [
{
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/f70c05ef-d0a1-4e07-8ea2-2a09d2028d24.wav",
"mixVolume": 1.0,
"start": 2,
"cutFrom": 1,
"cutTo": 10
},
{
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/dc4010ef-d0db-43b6-927f-10ddf6761129.mp3",
"mixVolume": 0.6,
"start": 7,
"cutFrom": 0,
"cutTo": 9
}
],
"clipsAudioVolume": 0.5,
"clips": [
{
"duration": 10,
"layers": [
{
"type": "image",
"path": "/image/2025-09-14/cmejszvz00000t5afm8qcr6bq/ebbb0d92-f4c6-4a07-9124-92b71cd24c50.jpg",
"resizeMode": "cover"
}
]
}
]
}
}
Audio Track Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
path | string | ✅ | - | File path to audio track |
mixVolume | number | ❌ | 1 | Relative volume for this track (0-1) |
start | number | ❌ | 0 | How many seconds into video to start this audio track |
cutFrom | number | ❌ | 0 | Time value to cut source file from (seconds) |
cutTo | number | ❌ | - | Time value to cut source file to (seconds) |
Clip Audio Layers
Add audio that's tied to specific clips using audio layers. Audio layers will be mixed together, and if cutFrom
/cutTo
is set, the resulting segment will be slowed/sped-up to fit clip.duration
(limited to 0.5x-100x speed).
{
"type": "video",
"config": {
"keepSourceAudio": true,
"clips": [
{
"duration": 4,
"layers": [
{
"type": "video",
"path": "/video/2025-09-14/cmejszvz00000t5afm8qcr6bq/8d8df335-6655-4160-8066-66510cf08f0d.mp4",
"cutFrom": 0,
"cutTo": 4,
"resizeMode": "cover"
},
{
"type": "audio",
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/3aee9363-cd80-4d93-8cb6-99d137e16863.mp3",
"cutFrom": 5,
"cutTo": 9,
"mixVolume": 0.8
}
]
},
{
"duration": 3,
"layers": [
{
"type": "fill-color",
"color": "#D1B43F"
},
{
"type": "audio",
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/f70c05ef-d0a1-4e07-8ea2-2a09d2028d24.wav",
"cutFrom": 3,
"cutTo": 6,
"mixVolume": 0.7
}
]
}
]
}
}
Audio Layer Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
path | string | ✅ | - | Path to audio file |
cutFrom | number | ❌ | 0 | Time value to cut from (seconds) |
cutTo | number | ❌ | clip.duration | Time value to cut to (seconds) |
mixVolume | number | ❌ | 1 | Relative volume when mixing (0-1) |
Audio layers require keepSourceAudio: true
to be set in the video configuration to function properly.
When using keepSourceAudio: true
with video layers, the video must be manually cut to match the clip duration if it's longer than the layer duration. Otherwise, compilation issues may occur with subsequent audio tracks. Use detached-audio
layers as an alternative if you don't want to manually cut the video.
When cutFrom
/cutTo
segments are specified, they are automatically sped/slowed to fit the clip duration. This operation is limited to values between 0.5x and 100x speed.
Detached Audio Layers
Audio layers that start relative to each clip's beginning, rather than the global video timeline. This makes it easier to synchronize audio with specific clips without calculating absolute start times across the entire video.
{
"type": "video",
"config": {
"clips": [
{
"duration": 4,
"layers": [
{
"type": "title-background",
"text": "Narrator starts in 1 sec",
"textColor": "#ffffff"
},
{
"type": "detached-audio",
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/f70c05ef-d0a1-4e07-8ea2-2a09d2028d24.wav",
"start": 1,
"mixVolume": 0.9,
"cutFrom": 0
}
]
},
{
"duration": 3,
"layers": [
{
"type": "title-background",
"text": "Music sting starts in 0.5 sec",
"textColor": "#ffffff"
},
{
"type": "detached-audio",
"path": "/audio/2025-09-14/cmejszvz00000t5afm8qcr6bq/dc4010ef-d0db-43b6-927f-10ddf6761129.mp3",
"start": 0.5,
"mixVolume": 0.6
}
]
}
]
}
}
Detached Audio Properties
Property | Type | Required | Default | Description |
---|---|---|---|---|
path | string | ✅ | - | Path to audio file |
start | number | ❌ | 0 | Start time relative to clip start (seconds) |
mixVolume | number | ❌ | 1 | Relative volume when mixing (0-1) |
cutFrom | number | ❌ | 0 | Start position in audio file (seconds) |
cutTo | number | ❌ | - | End position in audio file (seconds) |
Audio Normalization & Ducking
Apply professional audio normalization with ducking effects, perfect for automatically lowering background music when voiceover speaks.
{
"type": "video",
"config": {
"audioFilePath": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/e8af4403-6154-40b7-88a8-4437f677dc81.mp3",
"audioTracks": [
{
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/f53b379f-b711-4732-9266-437e11850171.wav",
"mixVolume": 1.0,
"start": 3
}
],
"audioNorm": {
"enable": true,
"gaussSize": 5,
"maxGain": 30
},
"clips": [
{
"duration": 10,
"layers": [
{
"type": "title-background",
"text": "Background Music + Voiceover",
"textColor": "#ffffff"
}
]
}
]
}
}
Audio Normalization Properties
Property | Type | Default | Description |
---|---|---|---|
enable | boolean | false | Enable audio normalization |
gaussSize | number | 5 | Gaussian filter size for smoothing (1-10) |
maxGain | number | 30 | Maximum gain adjustment in decibels |
How Audio Ducking Works
Audio normalization automatically:
- Analyzes all audio tracks for volume levels using dynamic range compression
- Identifies when multiple tracks overlap in time
- Reduces background music volume when voiceover is present
- Smoothly transitions volume changes using gaussian filtering
- Prevents audio clipping with maxGain limits
Audio Curves in Transitions
Control how audio fades during transitions using audio curves.
{
"type": "video",
"config": {
"keepSourceAudio": true,
"clips": [
{
"duration": 3,
"layers": [
{
"type": "title-background",
"text": "Default Audio Curves (tri)",
"textColor": "#ffffff"
},
{
"type": "audio",
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/e8af4403-6154-40b7-88a8-4437f677dc81.mp3"
}
],
"transition": {
"duration": 1,
"name": "fade",
"audioOutCurve": "tri",
"audioInCurve": "tri"
}
},
{
"duration": 3,
"layers": [
{
"type": "title-background",
"text": "Exponential Audio Curves (exp)",
"textColor": "#ffffff"
},
{
"type": "audio",
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/19043de3-3da1-4793-b2e1-b58ce4ca806a.mp3"
}
]
}
]
}
}
Available Audio Curves
Curve | Description |
---|---|
tri | Triangular curve (default) |
exp | Exponential curve |
linear | Linear curve |
Complete Audio Example
Here's a comprehensive example showcasing multiple audio features:
{
"type": "video",
"config": {
"width": 720,
"height": 480,
"fps": 30,
"audioFilePath": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/e8af4403-6154-40b7-88a8-4437f677dc81.mp3",
"loopAudio": true,
"outputVolume": 0.8,
"clipsAudioVolume": 0.7,
"keepSourceAudio": true,
"audioTracks": [
{
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/f53b379f-b711-4732-9266-437e11850171.wav",
"mixVolume": 0.9,
"start": 2,
"cutFrom": 0,
"cutTo": 5
}
],
"audioNorm": {
"enable": true,
"gaussSize": 5,
"maxGain": 25
},
"clips": [
{
"duration": 4,
"layers": [
{
"type": "title-background",
"text": "Background Music",
"textColor": "#ffffff"
}
],
"transition": {
"duration": 0.5,
"name": "fade"
}
},
{
"duration": 4,
"layers": [
{
"type": "title-background",
"text": "Voiceover + Audio Layer",
"textColor": "#ffffff"
},
{
"type": "audio",
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/19043de3-3da1-4793-b2e1-b58ce4ca806a.mp3",
"mixVolume": 0.8
}
],
"transition": {
"duration": 0.5,
"name": "fade"
}
},
{
"duration": 4,
"layers": [
{
"type": "title-background",
"text": "Detached Audio",
"textColor": "#ffffff"
},
{
"type": "detached-audio",
"path": "/audio/2025-09-15/cmejszvz00000t5afm8qcr6bq/00cd8f87-39bd-4918-8fce-f1f684fa546e.mp3",
"start": 1,
"mixVolume": 0.6
}
],
"transition": {
"duration": 0.5,
"name": "fade"
}
},
{
"duration": 4,
"layers": [
{
"type": "title-background",
"text": "Audio Normalization",
"textColor": "#ffffff"
}
]
}
]
}
}
Audio File Formats
JsonCut supports these audio formats:
Format | Best For | Notes |
---|---|---|
MP3 | Music, voiceovers | Good compression, universal support |
WAV | Sound effects, high quality | Uncompressed, larger files |
M4A | Voice recordings | Good compression, quality |
AAC | Professional audio | Balanced quality and size |
Best Practices
Audio Quality Guidelines
- Sample Rate: Use 44.1kHz or 48kHz for best compatibility
- Bit Depth: 16-bit minimum, 24-bit for professional quality
- File Size: Compress appropriately for web delivery
- Levels: Avoid clipping, maintain consistent levels
Mixing Tips
- Voiceover Priority: Keep voice levels prominent (-12 to -6 dB)
- Music Balance: Background music at -18 to -12 dB
- Effects Placement: Use sound effects sparingly for impact
- Fade Transitions: Apply audio fades at clip boundaries
Performance Optimization
- Audio Length: Trim unused portions of audio files
- Track Count: Limit simultaneous audio tracks (recommended: max 5)
- Normalization: Use sparingly on longer videos
- File Formats: Choose appropriate compression levels
Troubleshooting
Common Issues
Audio not playing:
- Verify file format is supported
- Check file path accuracy
- Ensure
keepSourceAudio: true
for audio layers - Check volume levels are above 0
Audio clipping:
- Reduce
mixVolume
andoutputVolume
- Use audio normalization to balance levels
- Check source audio for clipping
Synchronization problems:
- Verify
start
times for detached audio - Check
cutFrom
andcutTo
values - Ensure clip durations match audio timing
Next Steps
- Examples - See complete video examples with professional audio
- Layer Types - Learn about audio layer types in detail
- Clips & Transitions - Understand how audio works with transitions