Skip to main content

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

PropertyTypeDescription
audioFilePathstringPath to background audio file
loopAudiobooleanAutomatically loop audio if shorter than video
outputVolumenumberFinal output volume (0-1)
keepSourceAudiobooleanKeep original audio from video layers
clipsAudioVolumenumberVolume 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

PropertyTypeRequiredDefaultDescription
pathstring-File path to audio track
mixVolumenumber1Relative volume for this track (0-1)
startnumber0How many seconds into video to start this audio track
cutFromnumber0Time value to cut source file from (seconds)
cutTonumber-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

PropertyTypeRequiredDefaultDescription
pathstring-Path to audio file
cutFromnumber0Time value to cut from (seconds)
cutTonumberclip.durationTime value to cut to (seconds)
mixVolumenumber1Relative volume when mixing (0-1)
Audio Layer Requirements

Audio layers require keepSourceAudio: true to be set in the video configuration to function properly.

Video Length Considerations

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.

Audio Speed Adjustment

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

PropertyTypeRequiredDefaultDescription
pathstring-Path to audio file
startnumber0Start time relative to clip start (seconds)
mixVolumenumber1Relative volume when mixing (0-1)
cutFromnumber0Start position in audio file (seconds)
cutTonumber-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

PropertyTypeDefaultDescription
enablebooleanfalseEnable audio normalization
gaussSizenumber5Gaussian filter size for smoothing (1-10)
maxGainnumber30Maximum gain adjustment in decibels

How Audio Ducking Works

Audio normalization automatically:

  1. Analyzes all audio tracks for volume levels using dynamic range compression
  2. Identifies when multiple tracks overlap in time
  3. Reduces background music volume when voiceover is present
  4. Smoothly transitions volume changes using gaussian filtering
  5. 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

CurveDescription
triTriangular curve (default)
expExponential curve
linearLinear 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:

FormatBest ForNotes
MP3Music, voiceoversGood compression, universal support
WAVSound effects, high qualityUncompressed, larger files
M4AVoice recordingsGood compression, quality
AACProfessional audioBalanced quality and size

Best Practices

Audio Quality Guidelines

  1. Sample Rate: Use 44.1kHz or 48kHz for best compatibility
  2. Bit Depth: 16-bit minimum, 24-bit for professional quality
  3. File Size: Compress appropriately for web delivery
  4. Levels: Avoid clipping, maintain consistent levels

Mixing Tips

  1. Voiceover Priority: Keep voice levels prominent (-12 to -6 dB)
  2. Music Balance: Background music at -18 to -12 dB
  3. Effects Placement: Use sound effects sparingly for impact
  4. Fade Transitions: Apply audio fades at clip boundaries

Performance Optimization

  1. Audio Length: Trim unused portions of audio files
  2. Track Count: Limit simultaneous audio tracks (recommended: max 5)
  3. Normalization: Use sparingly on longer videos
  4. 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 and outputVolume
  • Use audio normalization to balance levels
  • Check source audio for clipping

Synchronization problems:

  • Verify start times for detached audio
  • Check cutFrom and cutTo values
  • Ensure clip durations match audio timing

Next Steps