Skip to content
🎥 Command-line AirPlay video client for Apple TV
Ruby Shell
Branch: master
Clone or download
Latest commit 331c99a Jan 11, 2016


Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Change permission to execute Apr 19, 2015
exe Move bindir to exe Apr 12, 2015
lib Support invalid RSS Jan 10, 2016
spec Change podcast Apr 9, 2015
.gitignore add ignore: vendor Sep 19, 2012
.rspec add rspec Sep 20, 2012
.travis.yml Remove Ruby 2.3.0 because that is not supporting Travis's OS X enviro… Jan 10, 2016
Gemfile first commit Sep 19, 2012
Gemfile.lock Lock version of `nio4r` Jan 10, 2016
Guardfile add guard-spec for TDD Oct 4, 2012
LICENSE Update copyright year to 2016 Jan 10, 2016
Rakefile add rspec Sep 20, 2012
airplayer.gemspec Update required Ruby version Jan 10, 2016


Command-line AirPlay video client for Apple TV

Gem Version Dependency Status Build Status Coverage Status Code Climate


  • OS X, Ubuntu, Arch Linux
  • Ruby 2.2 or later
  • Bundler 1.10.0 or later
  • AppleTV 2G or later
  • youtube-dl (If you want to watch YouTube)

For Arch Linux

nss-mdns package is required.

$ sudo pacman -S nss-mdns


$ yaourt -S nss-mdns

For Ubuntu

$ sudo apt-get install rdnssd libavahi-compat-libdnssd-dev



$ gem install airplayer


$ git clone git://
$ cd airplayer
$ bundle install --deployment --binstubs
$ bin/airplayer version


Play online video

$ airplayer play http://heinlein.local/Movies/AKIRA.m4v

 Source: http://heinlein.local/misc/Movies/AKIRA.m4v
  Title: AKIRA.m4v
 Device: Apple TV (
   Time: 00:04:25 |=                                              | 3% Streaming

Play video

$ airplayer play '~/Movies/Trailers/007 SKYFALL.mp4'

  Title: SKYFALL.mp4
 Device: Apple TV (
   Time: 00:00:20 |=====                                         | 11% Streaming

Play all video in specific directory

$ airplayer play ~/Movies/Trailers

  Title: 007 Casino Royale.mp4
 Device: Apple TV (
   Time: 00:02:33 |==============================================| 100% Complete

  Title: 007 Quantum Of Solace.mp4
 Device: Apple TV (
   Time: 00:02:01 |==============================================| 100% Complete

  Title: 007 SKYFALL.mp4
 Device: Apple TV (
   Time: 00:02:36 |==============================================| 100% Complete

Play video podcast XML

Example: CNN video podcast

$ airplayer play

  Title: exp-travel-insider-hilton-head-island.cnn.m4v
 Device: Apple TV (
   Time: 00:00:44 |============                                  | 39% Streaming

Play YouTube video

$ airplayer play ''

Repeat play

Repeat one

$ airplayer play '~/Movies/Trailers/007 SKYFALL.mp4' --repeat

Repeat all

$ airplayer play '~/Movies/Trailers' --repeat

Shuffle play

$ airplayer play '~/Movies/Trailers' --shuffle

Select Device

If you have multiple "AirPlay" devices, specifying the device number for the following play is available on any device.

Check the AirPlay device number

$ airplayer devices
0: John's Apple TV ( # John's Apple TV number is 0
1: Jane's Apple TV ( # Jane's Apple TV number is 1

Use --device or -d options

$ airplayer play --device 1 '~/Movies/GHOST IN THE SHELL.mp4'

Advanced Usage

Register to OS X Service

You can create Automator Service, that opens URL from your browser in airplayer.

automator service

Supported MIME types

AirPlay Overview - Configuring Your Server

File extension MIME type Ruby mime-types
.ts video/MP2T video/mp2t
.mov video/quicktime video/quicktime
.m4v video/mpeg4 video/m4v
.mp4 video/mpeg4 application/mp4, video/mp4


© 2012 - 2016 Tomohiro TAIRA.

This project is licensed under the MIT license. See LICENSE for details.

You can’t perform that action at this time.