Diff-BGM: A Diffusion Model for Video Background Music Generation

Sizhe Li, Yiming Qin, Minghang Zheng, Xin Jin, Yang Liu
2/9/2026

No official code found. Best implementation: sizhelee/Diff-BGM (71 stars, last commit 2024-10-12).

Abstract

When editing a video, a piece of attractive background music is indispensable. However, video background music generation tasks face several challenges, for example, the lack of suitable training datasets, and the difficulties in flexibly controlling the music generation process and sequentially aligning the video and music. In this work, we first propose a high-quality music-video dataset BGM909 with detailed annotation and shot detection to provide multimodal information about the video and music. We then present evaluation metrics to assess music quality, including music diversity and alignment between music and video with retrieval precision metrics. Finally, we propose the Diff-BGM framework to automatically generate the background music for a given video, which uses different signals to control different aspects of the music during the generation process, i.e., uses dynamic video features to control music rhythm and semantic features to control the melody and atmosphere. We propose to align the video and music sequentially by introducing a segment-aware crossattention layer. Experiments verify the effectiveness of our proposed method. The code and models are available at https://github.com/sizhelee/Diff-BGM.

View on arXivView PDF

Code Implementations(1)

sizhelee/Diff-BGMCommunity100%

official code for CVPR'24 paper Diff-BGM

714Shell, PythonMar 25, 20242 years ago

Similar Papers

Cite this paper

@article{li2026diffbgm,
  title  = {Diff-BGM: A Diffusion Model for Video Background Music Generation},
  author = {Sizhe Li and Yiming Qin and Minghang Zheng and Xin Jin and Yang Liu},
  year   = {2026},
  eprint = {2405.11913},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2405.11913},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.11913.svg)](https://codeofpaper.com/paper/2405.11913)

Discussion