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
Currently, Remotion's <Audio/> component limits volume control to a range of 0-1, which only allows for volume reduction but not amplification. There are common scenarios where users need to increase the volume of audio clips beyond their original levels:
Working with audio clips that were recorded at low volumes
Balancing audio levels between different clips in a composition
Creating emphasis/dramatic effect by temporarily boosting certain audio segments
Compensating for volume differences between music tracks and voice-overs
Possible Solution
Modify the <Audio/> component to:
Allow the volume prop to accept values greater than 1.0 (maybe a max of 3.0)
Implement volume amplification using the Web Audio API under the hood
Add optional props for controlling amplification behavior:
<Audio src={audioFile} volume={2.5} // Allow values > 1.0 maxVolume={3.0} // Optional cap on maximum volume preventClipping={true} // Optional flag to prevent audio distortion />
Technical Implementation Details
Use Web Audio API's GainNode for volume manipulation
Add safeguards against extreme amplification that could cause distortion
Maintain backward compatibility with existing volume behavior
Add warning in dev mode when volume exceeds 1.0 to help prevent unintended loud audio
Benefits
Gives users more control over audio levels
Reduces need for external audio preprocessing
Simplifies workflow for balancing audio in complex compositions
Maintains Remotion's ease-of-use while adding powerful functionality
Considerations
Need to handle potential audio clipping/distortion, especially regarding decibel conversion
Browser compatibility with Web Audio API
Performance impact of audio processing
Clear documentation about responsible usage of amplification
The text was updated successfully, but these errors were encountered:
Feature Request: Allow Audio Volume Amplification Beyond 1.0 🔊
Use Case
Currently, Remotion's
<Audio/>
component limits volume control to a range of 0-1, which only allows for volume reduction but not amplification. There are common scenarios where users need to increase the volume of audio clips beyond their original levels:Possible Solution
Modify the
<Audio/>
component to:volume
prop to accept values greater than 1.0 (maybe a max of 3.0)<Audio src={audioFile} volume={2.5} // Allow values > 1.0 maxVolume={3.0} // Optional cap on maximum volume preventClipping={true} // Optional flag to prevent audio distortion />
Technical Implementation Details
Benefits
Considerations
The text was updated successfully, but these errors were encountered: