Watch Ed Sheeran's Studio Session With Peter Jackson In New 'Hobbit' Vid

Sheeran records his end-credits tune for upcoming 'Desolation of Smaug.'

Now we can see why Ed Sheeran was totally "geeking out"
 over the opportunity to record a song for the soundtrack to Peter Jackson's "The Hobbit: The Desolation of Smaug."

Sheeran penned the emotional ballad "I See Fire" for the end credits of the movie, which is due out on December 13. His first solo track released in two years gave Sheeran the opportunity to produce the song and play all the instruments, including picking up a violin for the first time.

On Tuesday, Jackson posted a video of Sheeran recording the song and hanging in the studio, intercut with scenes from the film.

Jackson captured the moment when a starry-eyed, hoodie-wearing Sheeran first walked into the studio, looking surprised by the camera and asking where he should set up his gear. In the next scene, Sheeran gets down to business, loses the hoodie and takes a few swings at the song's stirring hook, "I see fire/Blood in the breeze."

The haunting a cappella open of the tune proves that Sheeran totally nailed the "Hobbit" sensibility. "Oh misty eye of the mountain below/Keep careful watch of my brothers' souls," he sings. "And should the sky be filled with fire and smoke/Keep watching over Durin's son."

A gently strummed acoustic guitar then comes in as Sheeran sings anew about fire and flames, grasping at ropes, raising glasses of wine and dying in unison. There are promises of more fire and flames, that is, until "Desolation comes upon the sky."

The black-and-white performance footage of Sheeran is intercut with full-color scenes from the film, which, of course, also contain images of fire, so much fire. At one point, the studio scene switches to color and we see the singer sitting on the arm of a couch playing the song's melancholy violin solo and tweaking lyrics on this laptop.

The behind-the-scenes video shows how involved Sheeran was in every aspect of recording, playing and arranging the song, though near the end he gets a bit of help from the boss. "And if the night is burning I will cover my eyes," he sings as Jackson sits in the studio beside Sheeran and bobs his head to the song. And then, Ed gets the ultimate nod of approval: a coffee mug cheers from a clearly pleased Jackson.

The nearly six-minute clip ends with a grinning Sheeran getting his photo taken with Jackson and some of the other essential soundtrack crew in the studio.