npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

playonkodi

v0.3.1

Published

Stream your local/network content directly on Kodi without FTP, SMB or anything else

Downloads

12

Readme

play-on-kodi

Stream your local/network content directly on Kodi without having to setup FTP, SMB or anything else.

Installation

$ npm install -g playonkodi

For superhero devs:

$ git clone https://github.com/ritiek/play-on-kodi
$ cd play-on-kodi
$ npm install -g .

Also make sure you have youtube-dl installed.

Usage

usage: playonkodi.js [-h] [-v] -s SERVER -p PORT [-i INTERFACE_IP] MEDIA

Stream your local/network content directly on Kodi.

Positional arguments:
  MEDIA                 Path to media file

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -s SERVER, --server SERVER
                        Kodi's local ip address
  -p PORT, --port PORT  Kodi's web interface port
  -i INTERFACE_IP, --interface-ip INTERFACE_IP
                        [Optional] Interface IP to send to Kodi server

Examples

Stream a local video to Kodi

$ playonkodi -s 192.168.0.108 -p 6050 /path/to/local/media/file

Stream a video from the internet to Kodi

$ playonkodi -s 192.168.0.108 -p 6050 http://path/to/media

Since this tool now uses the youtube-dl backend to resolve URLs, so you should be able to media content from most websites (including YouTube, HotStar, and many more). Just pass the URL, and you'll know if it plays on Kodi.

Send local IP address to Kodi server manually (useful if script cannot find out the correct network interface IP automatically)

$ playonkodi -s 192.168.0.108 -p 6050 -i 192.168.0.105 /path/to/local/media/file

Loading External Subtitles

There maybe cases where you would want to link your local media content with external subtitles (.srt, etc.). Due to a limitation in Kodi, we cannot do that for you automatically (check out issue #3).

However you can install mkvtoolnix ($ sudo apt install mkvtoolnix) to embed external subtitles in the container itself and pass this new container to Kodi.

For example:

$ mkvmerge -o output.mkv input.mp4 subtitles.srt
$ playonkodi -s 192.168.0.108 -p 6050 output.mkv

How it works?

  • For local media, it makes your media content available locally to the devices on the same network. Otherwise it just uses youtube-dl to resolve the passed URL.

  • It then attempts to figure out your PC's local IP address.

  • And lastly, it makes a network request to Kodi's jsonrpc server to play the hosted media content.

Contributing

  • This tool is supposed is supposed to be very minimal way to play local and network files on Kodi. I made it to quickly be able to your local media content to Kodi server. You don't want to setup FTP/SMB (if not already), add it as a network source on Kodi and locate the media to just make the thing play!

  • If you believe your idea is simple and interesting at the same time, please open an issue or send a PR!

License

`License