Editor’s introduction
The study focuses on a video-guided text-to-music model trained on the Open Screen Soundtrack Library (OSSL), a dataset of 36.5 hours of public domain movie clips paired with soundtracks and mood annotations. However, on public domain clips, distributional fidelity does not improve, and some metrics even decline, indicating limited transferability to older or less representative film styles.
Introduction
Music plays a crucial role in films, shaping its artistic quality and influencing its commercial success. A well-composed soundtrack enhances the emotional depth of a scene, guiding audience perception and engagement. Despite recent advancements in music generation systems, significant challenges remain in adapting these technologies for film production, as these systems are not designed to align with the real-world practices of film music composition, where multiple elements—such as visual content, dialogue, and emotional tone—are considered altogether.
A major obstacle is the lack of comprehensive datasets containing movie clips paired with their corresponding soundtracks. While some existing film datasets are derived from commercial movies, many are no longer available for download, and some provide only video embeddings rather than raw movie clips, making it challenging to distinguish segments containing music from those that do not. The remaining datasets do not include isolated soundtrack stems. While we acknowledge the possibility of constructing a dataset using source-separated music, as done in previous approaches, we find the quality of source-separated music to be suboptimal, as it occasionally includes incorrect audio such as voice or sound effects, making it unsuitable for our use case.
Another missing element that plays a pivotal role in making film music is mood information, as dialogues and scenes alone are often insufficient to fully convey emotions, which explains why scripts typically include not only dialogues but also separate mood descriptions. However, we find that this aspect remains largely unaddressed in existing resources, with no publicly available film datasets annotated with mood information.
Related Work
Audio-Domain Music Generation. Contemporary music generation architectures in the audio domain predominantly follow two distinct paradigms. The first employs neural codecs to transform digital audio signals into discrete tokens, enabling transformer-based models to generate music by learning token distributions from prompts such as text or video. The second paradigm leverages diffusion-based frameworks, where diffusion models are trained to generate audio signals, conditioned on prompts such as textual descriptions or video frames. Our models are built upon MusicGen, a text-to-music generation framework based on the former approach.
Multimodal Music Generation. Most existing audio-domain music generation models support purely unimodal conditions, such as text, or have limited multimodal support for text along with audio or abstract musical signals. In constrast, work on conditioning on visual signals is more limited. One example is a transformer-based model conditioned on text, speech, images, and videos, which generates discrete music tokens that are later converted into raw waveforms from embeddings obtained from pre-trained speech, image, and video encoders. An alternative approach involves converting visual inputs into detailed textual descriptions, and feeding them into a model. This enables the use of diverse modalities, including text, videos, and images as inputs. Another recent study trained a video-to-music generation model on a diverse set of video features, while integrating textual conditioning to enable high-level control through textual embeddings derived from a pre-trained text encoder. On the other hand, our approach focuses on integrating a video adapter into a pre-trained text-to-music generation model in order to build a music generation model conditioned on multimodal inputs.
Video-Conditioned Music Generation. One of the earliest contributions to video-to-music generation utilized human pose features extracted by pre-trained models, in order to generate plausible music for video clips containing individuals playing musical instruments. In contrast, another early study employed self-defined handcrafted features to capture relevant video attributes. More recently, the field has shifted toward leveraging embeddings derived from pre-trained video encoders, both in the audio and symbolic domain. This approach has been integrated into our models, enabling them to perform cross-attention on embeddings derived from a pre-trained video encoder designed to capture both spatial and temporal video information.
Open Screen Soundtrack Library (OSSL)
Musical Segment Identification. To identify the timestamps of segments with soundtracks within the films, we employ a pre-trained source separation model trained to decompose movie audio into three components: music, effect, and dialogue. After source separation, we apply a silence detection algorithm to music parts using pyAudioAnalysis, with a frame length and step size of 20ms and a threshold scaling factor of 0.2. We define a segment as a clip if it is longer than 10 seconds and contains no silence longer than 1 second.
Following this, we verify the presence of musical content using an event detection algorithm, as the extracted soundtrack may contain non-musical elements owing to the limitations of current source separation models. Specifically, we apply the event detection algorithm to each clip and retain only those where the average probability of containing a musical event exceeds 0.3. (This threshold value is determined empirically by testing different values across multiple samples.)
Mood Annotation. The final stage of our dataset construction involves annotating mood information for each movie clip. We classify mood into four categories based on a previously suggested taxonomy—Russell’s 4Q, where the four classes are one of the HVHA (high valence, high arousal), HVLA (high valence, low arousal, LVHA (low valence, high arousal), and LVLA (low valence, low arousal).
OSSL Evaluation Set (OES)
We evaluate our models on two distinct datasets: OSSL Evaluation Set-Public (OES-Pub), comprising of movie clips from public domain films that are not included in OSSL, and OSSL Evaluation Set-Commercial (OES-Com), consisting of commercial films. The evaluation on OES-Pub serves to confirm that our models have effectively learned to generalize from this data distribution. On the other hand, the evaluation on OES-Com shows whether these models can generalize to contemporary commercial films. Notably, OES-Com incorporates a large proportion (89%) of clips from films released within the past year. Finally, we annotate each movie clip with mood information in the same way as we did for constructing OSSL ([MOOD]).
Comparison Models
We fine-tune MusicGen-Small and MusicGen-Medium with video adapters,55 5 Due to computational constraints, we did not conduct experiments on MusicGen-Large. as described in the previous section. Here, S-Multi and M-Multi denote these models, where “S” and “M” stand for “Small” and “Medium,” respectively.
To assess the effectiveness of video adapters, we also compare them against models fine-tuned on our dataset using only textual prompts (i.e., without video adapters). These models are denoted as S-Text and M-Text. Unlike S-Multi and M-Multi, where existing parameters are frozen and new parameters are trained, S-Text and M-Text do not incorporate new parameters. Instead, we apply Low-Rank Adaptation when fine-tuning these models.
Text Prompts Design
Prompts have been suggested to be a significant factor influencing the outcomes of generative models. In our experiments, text prompts serve not only as primary information for fine-tuning text-based models (S-Text and M-Text) but also as a basis for inference in baseline models (S-Base and M-Base). To ensure a fair comparison, therefore, we carefully design them to fully leverage the capabilities of text-to-music generation models,.
We experiment with three types of textual information: (1) mood annotations from our dataset, (2) movie genre labels (e.g., thriller, romance), and (3) LLM-generated music descriptions obtained using an open-source music captioning model. We observe that while both mood annotations and LLM-generated music captions subjectively improve generation quality, adding genre information often has a negative impact. For instance, when using the prompt, “A film soundtrack for a peaceful scene in a thriller movie,” our baseline models, S-Base and M-Base, overemphasizes the keyword “thriller,” producing music unsuitable for peaceful scenes. As a result, our final structured template includes only mood information and LLM-generated music captions: “A film soundtrack for a [MOOD] scene. [CAPTION].” Here, [MOOD] is a natural language description of our Russell’s Q4-based mood annotation, which is one of happy (high valence, high arousal), sad (low valence, low arousal), nervous (low valence, high arousal), or peaceful (high valence, low arousal). To generate music captions ([CAPTION]), we extract the first 30 seconds of each soundtrack in our dataset, divide it into three 10-second segments, and generate a caption for each using a music captioning model, as we recognize that film music evolves over time. We then use a commercial LLM, specifically Claude 3.5 Sonnet, to summarize these captions with the prompt: “Summarize the description of each song in one sentence from 0 to 30 seconds.” Consequently, the resulting captions concisely describe how the music changes over time, providing a brief musical summary (e.g., ‘The piece transitions from cembalo to marimba, concluding with a Tibetan singing bowl and animal sounds’).
When designing text prompts for OES-Pub and OES-Com, we use source-separated music to generate [CAPTION], unlike OSSL, which features original soundtrack stems. This results in the music captioning model frequently describing the audio as having poor recording quality. To mitigate this, we explicitly instruct Claude 3.5 Sonnet to exclude any mention of audio quality when summarizing the captions for OES-Pub and OES-Com.
Objective Evaluation Metrics
Distributional Fidelity. As common in most audio-domain TTM research, we assess the quality of our outputs at the distributional level by comparing generations from our model against a high-quality reference set, here comprised of 5K commercial soundtracks. To do so, we first extract embedding from our generated audio for each method and the reference set using CLAP. With these embeddings, we then compute Frechet Audio Distance (FAD) and Precision for this purpose. FAD compares distributional distance by fitting a high dimensional Gaussian to each dataset and measuring the Frechét distance between them, while Precision uses a k-NN estimate of the reference set’s distribution and measures how many generated samples lie in the estimated manifold.
Paired Fidelity. As our evaluation sets, OES-Pub and OES-Com, also contain paired video-music data in the form of source-separated musical tracks from each movie clip, we are also able to directly assess how well our models recreate the reference music on a paired sample-by-sample basis. Specifically, here we measure the CLAP Audio Similarity and Kullback-Leibler (KL) Divergence between the generated music and the reference music for this purpose. The CLAP Audio Similarity is calculated as a cosine similarity between the CLAP embeddings of the generated and reference samples for each video clip. The KL divergence is calculated using the estimated distributions the generated and reference samples with the PaSST audio classifier.
Sample Diversity. To evaluate the diversity of the generated samples, we employ Recall, following prior work in music generation. Using the same embedding model (CLAP) and reference/generated datasets from Distributional Fidelity, we use a k-NN estimate of each generated distribution and calculate the fraction of real samples that lie in the generated manifold.
Subjective Survey
To subjectively evaluate our models, we first select 10 representative samples from our evaluation set, OES-Com. Specifically, the OES-Com is divided into 10 clusters using k-means clustering, based on the CLAP embeddings of source-separated music, and we select the sample closest to the centroid of each cluster. Using these 10 samples, we design a survey in the form of a website and distribute it within our social network, recruiting 15 participants.
The survey procedure is structured as follows: Each participant is randomly assigned 2 out of the 10 samples. First, participants are required to watch the original version of the first movie clip. This step serves two purposes: to familiarize them with the atmosphere of the clip and to standardize the experience for participants regardless of prior exposure to the movie. After viewing the original clip, participants rate the inference results of each model (S-Base, S-Text, S-Multi, M-Base, M-Text, and M-Multi) for the corresponding clip, with the presentation order of the models randomized by the website. Subsequently, participants repeat the process for the second assigned movie clip, watching its original version and rating the inference results of each model, with the randomized order.
The evaluation assesses each model across three dimensions—genre, mood, and audio quality—using a 10-point Likert scale. For genre, participants rate how cinematic the AI-generated music sounds (1: not cinematic at all, 10: very cinematic). For mood, participants evaluate the compatibility of the music with the emotional tone of the movie clip (1: not compatible at all, 10: very compatible). For audio quality, participants provide a subjective assessment of the audio quality (1: very poor quality, 10: very high quality).
Results and Analysis
Distributional Fidelity Our evaluation on OES-Com reveals that fine-tuning on OSSL enhances distributional fidelity. Specifically, S-Text and S-Multi achieve lower FAD scores compared to S-Base while M-Text and M-Multi exhibit higher Precision scores relative to M-Base, indicating closer alignment with the target distribution. In contrast, the results on OES-Pub show no significant improvement in distributional fidelity. Although M-Text and M-Multi demonstrate increased Precision scores compared to M-Base, S-Text and S-Multi actually experience a decrease in Precision when evaluated on OES-Pub. This discrepancy is expected, as distributional fidelity is calculated using reference embeddings from commercial movie soundtracks. Encouragingly, the ability to improve performance on commercial soundtracks by training on public domain data suggests effective feature transfer across domains. Particularly, M-Multi achieved the lowest FAD scores and highest Precision scroes on both evaluation sets, demonstrating its outstanding performance in distributional fidelity.
Paired Fidelity Fine-tuning on OSSL consistently increases the CLAP audio similarity between reference and generated music across both OES-Pub and OES-Com datasets. Additionally, training reduces KL divergence when evaluated on OES-Pub, indicating improved alignment in classifier predictions. However, this improvement is less pronounced on OES-Com, suggesting some limitations in generalizing to commercial soundtracks. Notably, M-Multi stands out by achieving significantly lower KL scores on both datasets, highlighting its superior performance in paired fidelity.
Sample Diversity Training on OSSL generally results in a slight increase in sample diversity relative to the base models, as indicated by Recall scores when evaluated on OES-Pub, with the exception of M-Text, which shows a minor decrease. We observe the significantly higher Recall scores for S-Text and M-Text on OES-Com, despite the use of commercial soundtracks as reference tracks. This finding counters initial concerns about overfitting to patterns unique to public domain data, demonstrating that fine-tuning can enhance diversity even on out-of-domain references. However, S-Multi exhibits a notable drop in diversity, likely due to the added complexity of learning from both text and video inputs. In contrast, the larger M-Multi model avoids this issue and even shows slight increases in Recall scores on both datasets relative to the baseline, suggesting that greater model capacity helps mitigate the challenges of multimodal training.
Conclusion and Future Work
In this paper, we introduced the Open Screen Soundtrack Library (OSSL), a dataset comprising movie clips, corresponding soundtracks, and mood annotations. To show the effectiveness of our dataset, we adapted a text-to-music generation model with video conditions and fine-tuned it on our dataset. We conducted evaluations both on public domain and commercial films, and the results show the effectiveness of our dataset and architecture, when applied to medium-sized models. However, due to the limited number of participants, the subjective evaluation requires further validation. Despite this, we believe that the OSSL will advance film music research within ethical boundaries and our experiments on the proposed methods show insightful observations for integrating video modalities into existing text-to-music generation models.


