Describe the Bug
In the Reframe video editor, the keepAudio property is meant to act as a toggle to either keep or mute the original video's audio track. However, the logic that checks for the presence of a background music track strictly requires keepAudio to be true.
Because of this, if a user uploads a custom background music track but decides to mute the noisy original audio of their video, the editor completely discards the background music they just uploaded. The resulting exported video is 100% silent.
Steps to Reproduce
- Upload any video file that has sound.
- Go to the Audio & Speed section and upload a custom background music file.
- Observe that the background music plays in the preview.
- Toggle the video player's mute button or set
keepAudio to false (e.g., via the volume slider or mute toggle in the UI) to silence the original video noise.
- Click Export.
- Play the exported video—both the original audio and the uploaded background music are completely silent.
Expected Behavior
Muting the video player (keepAudio = false) should strictly apply to the original video's audio track. Any custom background music uploaded by the user should still be included in the final export, acting as the sole audio track for the video.
Proposed Fix
In src/lib/ffmpeg.ts (inside the exportVideo function), the hasMusicTrack variable is currently tied to recipe.keepAudio. It should be decoupled so that background music is independent of the video's mute state.
Current Code:
const hasMusicTrack = !!(musicOptions?.file && recipe.keepAudio);
Describe the Bug
In the Reframe video editor, the
keepAudioproperty is meant to act as a toggle to either keep or mute the original video's audio track. However, the logic that checks for the presence of a background music track strictly requireskeepAudioto betrue.Because of this, if a user uploads a custom background music track but decides to mute the noisy original audio of their video, the editor completely discards the background music they just uploaded. The resulting exported video is 100% silent.
Steps to Reproduce
keepAudiotofalse(e.g., via the volume slider or mute toggle in the UI) to silence the original video noise.Expected Behavior
Muting the video player (
keepAudio = false) should strictly apply to the original video's audio track. Any custom background music uploaded by the user should still be included in the final export, acting as the sole audio track for the video.Proposed Fix
In
src/lib/ffmpeg.ts(inside theexportVideofunction), thehasMusicTrackvariable is currently tied torecipe.keepAudio. It should be decoupled so that background music is independent of the video's mute state.Current Code: