The Beatles had been asked to contribute a song in May of 1967 for the first worldwide television broadcast to be entitled "Our World". The song chosen for this occasion would be recorded at EMI Studios in London and captured live on television. John Lennon's composition "All You Need Is Love" was chosen for the broadcast.
The first thing the Beatles did was to record a backing rhythm track with additions and overdub thereby ensuring the few mistakes would happen during the live session of the broadcast. Therefore, on June 14 1967 The Beatles entered Olympic Studios in Barnes, England to produce the backing track. John Lennon played the harpsichord, Ringo was on drums, Paul on the double bass and George scratching a violin. There were 33 attempts with the 10th attempt being the "best". All of this was transferred onto a four track machine; combined onto track one and called "take ten".
Five days later on June 19, the Olympic Studio tape was taken to EMI Studios where it was transferred to a fresh EMI tape/tape machine with track 1 intact. On track 2 of the tape, some piano, some banjo and some drums were added. Onto tracks 3 and 4 (the remaining tracks) vocals by The Beatles was added such as the "Love, love, love" backing and some chorus vocals by John Lennon as well. A mono mix of the song was completed two days later and this mix was used for rehearsals with an orchestra of session musicians on June 23 1967 in EMI studio one. The next day (also at Studio 1) , the television crew, the orchestra and The Beatles rehearsed the song together as well as the crew blocking camera angles and prepping for the big day.
Finally, On June 25 1967 in Studio 1 at EMI, some vocal overdubs and orchestral overdubs were recorded during run-throughs and rehearsals including takes 44 to 58 being recorded on mono four track for the outside transmission vans, etc. One of these rehearsal takes was played during the BBC introduction of the song. The "live" portion of the song have the orchestra and The Beatles playing to the background track and is officially considered take "59". The backing track is on track 1, John Lennon's vocals are on track 4 (although Paul and George sing along, their mikes are not plugged in - they are simply miming to their pre-recorded vocals of the backing track). The orchestra is on track 3, Paul's bass guitar, George's guitar and Ringo's overhead for drums are all on track 2. Playing on the high-hat along Ringo is none other than Keith Moon. Once the song was over, the raw tape of the BBC was kept.
The next day on June 26, the burst of tambourine used at the beginning of the song for the BBC raw tape was replaced with a snare drum roll played by Ringo as well as John's lead vocal "fixes" whereby he cleaned up a few lines from the performance. The song was mixed in mono from this version and issued as a single 11 days later.
The song also appeared in the "Yellow Submarine" soundtrack for the film and the LP. The song was given a fresh mono mix on November 1 1967 and it was eventually edited as such: First verse and chorus, third verse, fourth chorus, added "fifth" chorus and coda.
As of this point, the song remained only available in mono until October 29 1968 when it was mixed for stereo - the mix is basically track 1 through the left speaker, track 3 through the right speaker, and tracks 2 and 4 centered. The Apple LP/CD "Yellow Submarine Songtrack" has the same mix with the exception of tracks 2 and 4 separated and the orchestra moving around the stereo spectrum as bit more.
The BBC raw "live" audio can be found on such vinyl bootlegs as "The Beatles Vs. Don Ho" and "LS Bumblebee". Better sounding versions of this appear on such bootlegs as "Ultra Rare Trax, Volume 5 and 6" (vinyl) and "Unsurpassed Masters, Vol. 3" (Compact Disc). The Apple "Anthology" version uses the commercial stereo mix. Lastly, an interesting mono mix created by Geoff Emerick with an added chorus (for the "Yellow Submarine" film that was not used) with count-in can be found on the CD bootleg "The Lost Pepperland Reel".