Make your own Saregama Carvaan with YouTube and Google Sheets

Saregama Carvaan, a digital music player that looks like an old-fashioned transistor radio and targets the non-millennial generation, has become a huge hit in India. The company analysed data from online music streaming sites like Saavn, Gaana and YouTube, came up with a catalogue of 5000+ “greatest” Hindi movie songs and pre-loaded them into Carvaan, classified by artists and moods.

Like a radio station, Saregama Carvaan mixes nostalgia with an element of surprise - the player’s algorithm plays music in a random sequence so the listener would never know which song is coming up next. Can the Carvaan experience be recreated with YouTube? Let’s find out.

1. The Songs List

A quick Google search on the Saregama website led me to this PDF document - it contains a complete list of every song that’s bundled into the Carvaan player. I imported the songs PDF into a Google Spreadsheet so the data could be easily filtered by movie names or artistes.

saregama-carvaan.png

2. The YouTube Database

The YouTube API lets you query the video database by keywords. I wrote a simple Google Script that reads the song titles from the Google Spreadsheet and finds the corresponding video on YouTube. The YouTube API returns the video link, the description, the channel of the video uploader and the thumbnail image (source code).

youtube-api-video.png

3. The Spreadsheet Formulae

Google Spreadsheet provides the IMAGE formula that helped me embed the YouTube thumbnail URLs as images into the spreadsheet cells. I used Array Formulas to apply the same formula to the entire column in the spreadsheet.

The YouTube video IDs were converted to the YouTube URLs again with the help of a simple array formula.

=ArrayFormula(CONCAT("https://youtu.be/",D2:D))

4. The YouTube Playlist

Now the spreadsheet was populated with a list of songs that are preloaded into Carvaan and their corresponding YouTube videos.

The next task was to create a YouTube playlist with all the videos. I had earlier built a tool for copying YouTube playlists and the same API was used here for building the playlist inside the spreadsheet (source code).

youtube-playlist.png

The Final Result

And here’s the final result - a YouTube playlist with 5000 songs that come bundled with Carvaan. Press the “Shuffle” icon and the songs would play in random sequence continuously.

saregama-carvaan-youtube-playlist.jpg

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.