The music stops before the video is over

Your audio is probably too short. 

You can check this information at the bottom of your project, you will see the approximate video duration, so you can compare this with the duration of your track. 

To make your video fit with your audio you can select a custom duration for each element and/or change the global pace of your video underTheme Options.

One solution that you have is to loop your audio. You can find this option by clicking on the down pointing arrow (right side of the green bar).