MJD

Cast Anything (almost) to Chromecast

castnow is command line utility which can be used to playback media files on your chromecast device. It supports playback of local video files, youtube clips, videos on the web and torrents. You can also re-attach a running playback session.

For this to work you must install Node.js. Use the links below if you do not have Node.js installed.

OS X
Windows

Once you have Node.js installed castnow must be cloned and then installed from the command line using the following:

git clone https://github.com/xat/castnow.git

and

npm install castnow -g

To stream from the command line use the following:

start playback of a local video file
castnow ./myvideo.mp4

start playback of video and mp3 files in the local directory
castnow ./mydirectory/

playback 3 videos after each other
castnow video1.mp4 video2.mp4 video3.mp4

start playback of some mp4 file over the web
castnow http://commondatastorage.googleapis.com/gtv-videos-bucket/ED_1280.mp4

start playback of some youtube clip
castnow https://www.youtube.com/watch?v=pcVRrlmpcWk

playback multiple youtube clips after each other
castnow https://www.youtube.com/watch?v=ptRlYs3Cp4E \ https://www.youtube.com/watch?v=3vqmJ9k2010 \ https://www.youtube.com/watch?v=VVMYqcMFEys

playback single youtube playlist
castnow https://www.youtube.com/playlist?list=PLrIJmi5XabBPCYKEQZn9foC8MJfLGmdPz

playback multiple youtube playlists after each other
castnow https://www.youtube.com/playlist?list=PLrIJmi5XabBPCYKEQZn9foC8MJfLGmdPz \ https://www.youtube.com/playlist?list=PLrIJmi5XabBPNDJ_YyC-KNa_cZ6SwTOYC

playback multiple youtube playlists and clips after each other
castnow https://www.youtube.com/playlist?list=PLrIJmi5XabBPCYKEQZn9foC8MJfLGmdPz \ https://www.youtube.com/playlist?list=PLrIJmi5XabBPNDJ_YyC-KNa_cZ6SwTOYC \ https://www.youtube.com/watch?v=3vqmJ9k2010 \ https://www.youtube.com/watch?v=VVMYqcMFEys

start playback of some video over torrent
castnow <url-to-torrent-file OR magnet>

start playback of some video over torrent, with local subtitles
castnow <url-to-torrent-file OR magnet> --subtitles </local/path/to/subtitles.srt>

transcode some other videoformat to mp4 while playback (requires ffmpeg)
castnow ./myvideo.avi --tomp4

re-attach to an currently running playback session
castnow

Download castnow.
Read more about castnow including extra options and player controls.

Via WonderHowTo