Usually one would consider 'music for film', but here I'm going to talk about doing it the other way round. Most people will be able to imagine the typical process - a film or video is made and then sent to a composer who will then create music for it. The music is then recorded and added to the film at a later time. The music will be good or bad and more or less appropriate and effective in complementing the film's images. Frequently in the final version the music will virtually disappear behind the film's soundtrack and at least one of the music's qualities will be its ability not to interfere with the film in inappropriate places.
In his film, The Shining, Stanley Kubrick seems to use the reverse technique.