Home » Kodi » Create Kodi Video Addon – Kodi Addon Development

Create Kodi Video Addon – Kodi Addon Development

Last updated on August 14th, 2017 at 01:23 pm EST

How to Create Kodi Video Addon – Kodi Addon Development

Background

We joined the Kodi community less than two months ago. A few days before we started using Kodi and third party addons, TVAddons had shut down. The shutdown which left a big hole in the community. Users were looking for their favorite addons, and developers were looking for new places to host their addons. Working addons were hard to find, and that is when we decided to learn how to create video addon for Kodi. We knew it was not going to be easy, but we also knew it was going to be a learning curve. The resources and tutorials to create Kodi video addon are available on the internet, just that they are not in one place. In this post we will share our journey on how to create Kodi video addon.

This is how we had envisioned our Kodi addon, but when we realized that scraping a website was a different animal all together we had to change our plans.

Kodi Addon Development-Flowchart

How to Create Kodi Video Addon – Kodi Addon Development

Create Kodi Video Addon

Step 1 – Install Python, Create Addon Zip and Repository Zip

All Kodi addons are coded in Python, so naturally the first step is to Install and setup Python. To install your addon within Kodi you need to create a zip file for the addon. You can also share your addon once you have the zip file. Now, if you want your addon to update automatically, you would need a repository as well which needs to be hosted online. Hit our link below to learn how you can do all this.

How to Create Kodi Addon and Repository Zip, Install Python etc

Step 2 – Kodi Sys.argv Explained and Creating a Menu

Once you have setup and installed Python, and have an addon zip file we are ready to start with our first addon. We need to understand sys.argv and how it works in a Kodi addon. We personally feel that once you understand sys.argv you will be able to create a menu, and navigate through a Kodi addon. We also believe in coding what we just learned so we will use our understanding of Kodi sys.argv to create a menu. Hit the link below to learn all of this.

Kodi Addon Development – Sys.argv explained, Create a Menu

Step 3 – How to Take User Input in Kodi Using Python

The next thing we decided to learn was how to take user input. Why? We wanted to learn this so that when we create an addon, we can take input from the user, scrape a website to see if we find the search term, and then display the results. In this tutorial, we just take user input and store it. The videos are hardcoded irrespective of what the user searches for. We just wanted to learn how to take user input, and feel good about it by playing a video.

Kodi Addon Development – How to Take User Input in Kodi Using Python

Step 4 – How to Play a Video in Kodi Using Python

The next step is to learn how to play a video in Python using Kodi. Kodi has a inbuilt video player which can handle a lot of video formats. We just need to create a list (menu) of videos and set a few parameters. Again videos in here are hardcoded because we just want to learn how to play a video. This is where we hit a roadblock, the mp4 video played fine in Kodi but the youtube video did not play. This is because we need to process the youtube link, and this when we learnt about URL Resolver. The tutorial for this part is a work in progress and will be published as soon as we are done with the write up.

Kodi Addon Development – How to Play a Video in Kodi Using Python

Step 5 – How to Play a Video using URL Resolver

The next obvious step was to learn how to play a video using URL Resolver. URL Resolver is a Kodi addon which works in the background, and knows how to navigate through certain websites, get the video link from the url and then you can play the link in Kodi. URL Resolver is used by a lot of third party Kodi addons, and is installed as a dependency. Some of the major video streaming websites which URL Resolver supports are :-

  • Youtube
  • Openload
  • Vimeo
  • Vidzi
  • Nowvideo
  • Novamov

The tutorial for this part is a work in progress and will be published as soon as we are done with the write up.

Kodi Addon Development – How to Play a Video using URL Resolver in Kodi

How to Create Kodi Video Addon – Kodi Addon Development

At this point we have a working Kodi video addon, which can play hard coded videos. We know how to:-

  • Create a menu
  • Take user input
  • Play a video
  • Play a video using URL Resolver

What we need to learn next is how to scrape websites to get videos, which as we mentioned before is a different animal all together.

Scraping a Website

Scraping a website means we get the html into python, then we get the video links from the html. We read that there are two ways to get this information; using Regular Expressions in Python, or Beautiful Soup library in Python. We decided to learn scraping a website using Beautiful Soup.

Example 1

In our first example we scrape Youtube for a search term. The purpose of the article is to give you an overview of how to use Beautiful Soup and scrape links, hit the link below to learn more.

Video Scraping With Beautiful Soup and Python

Example to Kodi Video Addon

We have successfully created a working Kodi video addon using all the previous tutorials in this article. Click the link below for more details.

Python – How to Create Kodi Video Addon – Youtube Search

We also recommend you to watch the below video.

How to Create Kodi Video Addon – Kodi Addon Development

Thanks

We would like to personally thank the peeps over at Noobsandnerds for helping us out, below are a few names:-

Our apologies if we missed out on anyone at the dev group.

Feedback

If you have feedback for us (positive or negative) feel free to let us know via comments below.

Do you STREAM on Kodi WITHOUT a VPN?

We STRONGLY suggest you use a VPN Service like IPVanish.

Why VPN? 1. Stay Secure and Anonymous Online 2. Stream Content Anonymously 3. Access Geo Locked Content 4. Hide Your Activity from your ISP

Why IPVanish? 1. They Keep No Logs = No Tracking 2. Native apps for Android, Android TV, iOS, Mac, Linux 3. No Speed Slowdown 4. Highly Recommended 5. 7 Days Money Back Guarantee

Sign-Up for IPVanish

Follow Us

Close
Please support the site
By clicking any of these buttons you help our site to get better