Shawn Mendes released a behind-the-scenes video on Thursday, revealing the making of his upcoming duet with Fifth Harmony's Camila Cabello.

The Canadian pop star teased the video on his Instagram account and announced that fans could take a look at the full video on his YouTube channel.

A video posted by Shawn Mendes (@shawnmendes) on Nov 12, 2015 at 4:37pm PST

The video, shot with special effects to give it an old-fashioned look, features the two singers rehearsing the song, titled "I Know What You Did Last Summer," while Mendes plays guitar. The clip then shows the two taking turns recording in the studio and discussing the direction the song should take.

Mendes also gave details about how the song came together. He explained that the song was different from others because it was "spontaneous and random." The 17-year-old revealed in the video that there were a lot of people in his dressing room when he and Cabello began playing around with lyrics and music. The two singers ended up writing the chorus and had a concept of the full song in about 30 minutes. They then decided to take the song to the studio to finish writing and recording.

The video also features a few notes from Cabello, who can be heard giving her feelings on the tune and the song's meaning.

"The writing process is I think what made this song such an unforgettable experience for me because it was so organic and it was so about two people who started jamming out," Cabello says. "It's basically a conversation between two people in a relationship where its dying but nobody wants to admit that its dying" she added.

According to the website promoting the duet, the song will be released on Nov. 18. For snippets of the song, fans can check out the teasers released by Mendes on his social media accounts.

A video posted by Shawn Mendes (@shawnmendes) on Nov 11, 2015 at 3:29pm PST

Check out the full behind-the-scenes video below to watch how the two pop stars recorded the song.