https://github.com/derhuerst/play-on-apple-tv
A command line tool to play any audio/video on an Apple TV.
https://github.com/derhuerst/play-on-apple-tv
airplay airtunes apple-tv audio cli
Last synced: 3 months ago
JSON representation
A command line tool to play any audio/video on an Apple TV.
- Host: GitHub
- URL: https://github.com/derhuerst/play-on-apple-tv
- Owner: derhuerst
- License: isc
- Created: 2018-01-21T04:01:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-27T17:11:26.000Z (over 1 year ago)
- Last Synced: 2025-07-19T14:02:33.871Z (4 months ago)
- Topics: airplay, airtunes, apple-tv, audio, cli
- Language: JavaScript
- Homepage: https://github.com/derhuerst/play-on-apple-tv#play-on-apple-tv
- Size: 33.2 KB
- Stars: 26
- Watchers: 2
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# play-on-apple-tv
**A command line tool to play any audio/video on an [Apple TV](https://en.wikipedia.org/wiki/Apple_TV).**
[](https://asciinema.org/a/158258)
[](https://www.npmjs.com/package/play-on-apple-tv)


[](https://github.com/sponsors/derhuerst)
[](https://matrix.to/#/@derhuerst:matrix.org)
## Usage
Using [`npx`](https://www.npmjs.com/package/npx):
```shell
npx play-on-apple-tv some-audio-file.mp3 my-apple-tv.local
npx play-on-apple-tv 'http://some-server/some-audio-file.mp3' my-apple-tv.local
```
Find the name of your Apple TV using [bonjour-browser](https://www.npmjs.com/package/bonjour-browser):
```shell
npx bonjour-browser | grep airplay
```
Play a Youtube video by finding the raw video url using [`yt-dlp`](https://github.com/yt-dlp/yt-dlp):
```shell
npx play-on-apple-tv $(yt-dlp -f 40 --get-url 'https://www.youtube.com/watch?v=jNQXAC9IVRw') my-apple-tv.local
```
## Contributing
If you have a question or have difficulties using `play-on-apple-tv`, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to [the issues page](https://github.com/derhuerst/play-on-apple-tv/issues).