Coder Social home page Coder Social logo

casdrop.py's Introduction

Casdrop

Things you need before we get started:

A. You know your TV (CASDROP_TV_NAME) and Speaker (CASDROP_SPKR_NAME) name.

B. Your machine is running python ~> 3.9.7 (not mandatory, but you need at least python 3).

C. Install all dependencies to run this program: pip install requirements.txt

   

Once that's done...

Step1. Open a new terminal on your unix/linux based computer

NOTE: make sure you're running in a BASH environment

  Step2. Open params.sh and edit the <> with your own values

  Step3. Run the following command in your terminal: ONLY RUN THIS ONCE!

`bash params.sh #you may need to run this command with elevated privileges`

  Step4. Do the following:

1. Start a simple HTTP server:
	`python -m SimpleHTTPServer`

2. Start the casting service: 
	`python3 casdrop.py`

3. Drop a file in your watch `CASDROP_WATCH_FOLDER` folder

**At this point, depending on which file (.mp4 || .mp3) you uploaded it should start streaming on the device.**

   

Reference:

  • CASDROP_WATCH_FOLDER => A folder you drop files in, to cast to device(s)

  • CASDROP_SERVER_URL => The IP address you get from SimpleHTTPServer a.k.a (http://<ip_address>)

  • CASDROP_SPKR_NAME and CASDROP_TV_NAME=> Displayed name of devices with (Ussually shown in cast menu on YouTube or Spotify mobile app)

Here's my sample param.sh file

Image description

 

Features, Suggestions, TODO:

Currently you can drop a .mp3 or .mp4 which will cast with zero problem. However, I plan on adding more features down the road...

Let me know in the comments if you'd like me to make a video explaining this is more detail

casdrop.py's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.