Abstract
Video-to-music generation presents significant potential in video production, requiring the generated music to be both semantically and rhythmically aligned with the video. Achieving this alignment demands advanced music generation capabilities, sophisticated video understanding, and an efficient mechanism to learn the correspondence between the two modalities. In this paper, we propose VidMusician, a parameter-efficient video-to-music generation framework built upon text-to-music models. VidMusician leverages hierarchical visual features to ensure semantic and rhythmic alignment between video and music. Specifically, our approach utilizes global visual features as semantic conditions and local visual features as rhythmic cues. These features are integrated into the generative backbone via cross-attention and in-attention mechanisms, respectively. Through a two-stage training process, we incrementally incorporate semantic and rhythmic features, utilizing zero initialization and identity initialization to maintain the inherent music-generative capabilities of the backbone. Additionally, we construct a diverse video-music dataset, DVMSet, encompassing various scenarios, such as promo videos, commercials, and compilations. Experiments demonstrate that VidMusician outperforms state-of-the-art methods across multiple evaluation metrics and exhibits robust performance on AI-generated videos.
1. Introduction
While text-to-music generation has seen massive leaps recently, video-to-music remains a significant challenge. Background music isn't just about matching a genre; it needs to be semantically aligned (the mood must match the scene) and rhythmically aligned (musical beats should coincide with visual transitions or motion). Existing solutions often suffer from domain specificity, low audio fidelity (relying on symbolic MIDI), or poor synchronization where musical beats fail to "hit" visual cuts.
VidMusician is a parameter-efficient framework designed to generate high-quality background music precisely aligned with a video's "vibe" and "beat." By leveraging hierarchical visual features and a two-stage training process, it outperforms state-of-the-art models in both musicality and synchronization.
2. Methodology
VidMusician builds upon the pre-trained MUSICGEN architecture but introduces a novel dual-stream conditioning approach to handle the hierarchy of visual information.
2.1 Hierarchical Visual Features
The framework splits the visual understanding task into two distinct streams:
- Semantic Conditioning (The "What"): Global features are extracted from video frames at 1 fps using a CLIP-ViT encoder. These features are mapped into a T5 text embedding space and injected into the generative backbone via cross-attention to establish the overall mood.
- Rhythmic Conditioning (The "When"): To capture timing, the model uses local (patch-level) CLIP features at 25 fps. By calculating the inter-frame cosine similarity of these local patches, the model detects subtle visual changes and cuts. This rhythmic signal is injected via an in-attention mechanism, adding features directly to the self-attention input of the transformer blocks.
2.2 Parameter-Efficient Fine-Tuning
Instead of retraining the entire music model, VidMusician only trains approximately 24.79M parameters. It utilizes LoRA (Low-Rank Adaptation) for the T5 encoder and employs Zero/Identity initialization for new linear layers. This ensures that at the start of training, the model behaves exactly like the original high-quality music generator, preventing the "catastrophic forgetting" of complex musical structures.
3. Datasets: DVMSet
To address the lack of diverse, high-quality video-music data, the authors introduced DVMSet (Diverse Video-Music Dataset). This dataset consists of 3,839 high-quality video-music pairs (60-second clips) across diverse categories including commercials, cartoons, extreme sports, and city guides. The audio was processed using Demucs to remove vocal tracks, ensuring the model focuses on instrumental background music.
4. Experimental Results
VidMusician was compared against five state-of-the-art methods, including VidMuse and M2UGen, across objective and subjective metrics.
4.1 Quantitative Performance
As shown in the results table, VidMusician achieved the best Frechet Distance (FD) of 27.46, indicating significantly higher audio fidelity and realism than competitors. In terms of Rhythmic Alignment, VidMusician scored 0.2516, outperforming the previous best of 0.2381. Notably, it achieves these results with only ~25M trainable parameters, compared to the 1.8B parameters of models like VidMuse.
4.2 Subjective Evaluation
In a subjective study with 46 participants, VidMusician received an 81.44% overall preference rate, demonstrating a landslide victory in human-perceived quality and alignment.
5. Conclusion
VidMusician demonstrates that separating global semantic context from local rhythmic cues is essential for high-quality video-to-music generation. By using identity initialization and in-attention mechanisms, the model successfully "piggybacks" on the massive pre-existing knowledge of text-to-music models. Future work will focus on scaling the DVMSet and exploring more complex fluid motions, such as professional dance, to further refine melodic synchronization.
Summary updated