Many mobile devices are equipped with video shooting function, and users tend to use these mobile devices to produce user generated content (UGC), and share with friends or the public owing to the popularity of social media. To make the video to be attractive, embedding appropriate background music into the video is a popular way to enrich user experience, but it is a time-consuming and labor-intensive task to find music that fits the video. This work proposes to use latent factors to recommend a list of music songs for a given video, in which the recommendation is based on the proposed score function, which involves the weighted average of the latent factors for the video and music. Moreover, we use pairwise ranking to design the objective function, and use stochastic gradient descent to optimize the proposed objective function. In the experiments, we specify two hypotheses and design several experiments to assess the performance and the effectiveness of the proposed algorithm from different aspects, including accuracy, quantitative research, and qualitative research. The experimental results indicate that the proposed model is promising in accuracy and quantitative research. Furthermore, this work provides detailed analysis to investigate the fitness of the background music that recommended by the system through interviewing the subjects.