Giter Club home page Giter Club logo

go-chromecast's Introduction

Chromecast

This implements a basic number of the google chromecast commands. Other than the basic commands, it also allows you to play media files from your computer either individually or in a playlist; the playlist command will look at all the files in a folder and play them, if it is a known media type, on at a time

Can play / load a local media file on your chromecast. Currently the chromecast default media receiver only supports the following formats:

Supported Media formats:
    - MKV
    - MP4
    - WebM

If an AVI file is found it will use ffmpeg to transcode it to MP4 (in a temp file) and use cast the transcoded mp4 file.

Commands

NAME:
   Chromecast - cli to interact with chromecast

USAGE:
   chromecast [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
    list      list available chromecasts
    status    current status of the chromecast
    pause     pause current media
    unpause   unpause current media
    reset     reset the current playing media
    end       go to end of current playing media
    seek      seek to a delta in the current playing media
    playlist  loads a playlist and plays the media
    load      load a mp4 media to play
    repl      repl for running commands
    help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --debug, -d    log debug information
   --uuid value, -u value  specify chromecast uuid
   --help, -h     show help
   --version, -v  print the version

Examples

$ make build
$ ./chromecast status                       # Shows the status of the chromecast
$ ./chromecast pause                        # Pauses the current chromecast application
$ ./chromecast unpause                      # Unpauses the current chromecast application
$ ./chromecast reset                        # Resets the current chromecast application to the beginning
$ ./chromecast end                          # Ends the current chromecast application
$ ./chromecast seek <int>                   # Seeks to a playing time in the current chromecast application
$ ./chromecast load <filename.mp4>          # Loads a media file to play on the chromecast application
$ ./chromecast load <filename> video/mp4    # Loads a media file with content type 'mp4' to play on the chromecast application
$ ./chromecast load <url> video/mp4         # The chromecast will play this media file from the url
$ ./chromecast playlist <folder>            # This will loop through all the files in a folder and play them one-by-one
$ ./chromecast repl                         # Starts an interactive session

TODO

- Add flag to go into interactive mode after running command
- Add metadata to loaded media
- add sorting to playlist order
- Fix logging / debug information
- Add exploratory repl commands to try different things on the media and default connections
- Cache the dns result of the chromecast

Resources

- https://github.com/xat/castnow
- https://github.com/trenskow/stream-transcoder.js/blob/master/lib/transcoder.js
- https://github.com/heartszhang/mp4box
- https://github.com/dhowden/tag
- https://github.com/balloob/pychromecast
- https://developers.google.com/cast/docs/reference/receiver/cast.receiver.media
- https://creativcoders.wordpress.com/2014/12/12/stream-live-mp4-video-with-ffmpeg-while-encoding/
- https://rigor.com/blog/2016/01/optimizing-mp4-video-for-fast-streaming

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.