Giter VIP home page Giter VIP logo

open-airplay's Introduction

OpenAirplay 0.0.32

Stream from a Linux computer to an Airplay Receiver.

OpenAirplay is a python implementation of the Apple Airplay client, intended to mimic the OSX Airplay integration.

I have always been annoyed about how iOS, Mac OSX, and all of Apples proprietary hardware/software has inhibited so many of us technology savvy people.

Project Status:

No longer under active development.

I no longer attend my highschool full of Apple devices, so I have no platform to test this project on.

If someone wants to fund this project, buy me a 2nd gen Apple TV or later so I can actually get back to work on this project.

Otherwise, I have no need or ability to continue development, so if you are able and willing, send over some PRs or code edits.

https://github.com/robobenklein/openairplay/milestones

Project Details:

Right now it's Python 3 using the QT system from PyQt4.
It is designed in an Ubuntu Unity environment, but the application should work on any platform with Python 3 and a system tray.
From my last testing, this ran fine on my Dad's Windows 8 laptop, and I've tested Ubuntu 14.04 to 15.10.

Requirements:

See the dependencies.md file for installing the needed software.

Why I'm doing this:

(From 2015:)
I go to a school where everyone has iPads as their learning tool, which are horrid for coding/programming and software development, but make a good classroom common tool. As a result, there is an Apple TV in every single room for the students to quickly present whatever is on their screen, and the teachers can show their presentations with their assigned Macbooks.

I am one of two people at this school who use Linux (Ubuntu) and who bring their laptops every day. I use mine for school work fairly often, as I understand how much I can do in Linux and not iOS. But whenever some task comes up where I'd need to airplay my work to an Apple TV, I'm being restrained to my iPad.

What this aims to be:

This application is designed to sit in your System Tray just like in OSX, with a drop down list of available Airplay Recievers, and allow you to:

  • Stream your desktop
  • Send a photo/picture
  • Play a video
  • Stream Music
    And whatever else the users and developers of this project wish it to be.

Want to help?

I'm always looking for contributors, if you can help with any of these I'd love to work with you.

  • Python network discovery protocols (for finding listings of devices)
  • Airplay/Media protocols
  • Python Qt (thinking about things like screen capture)
  • And developers to help make this work for non-Ubuntu OSs.

open-airplay's People

Contributors

benkonrath avatar cehberlin avatar espes avatar jamesdlow avatar jpetazzo avatar mstrodl avatar silex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-airplay's Issues

Photo Error when I try to cast my screen?

Here is my command and error:

java -jar airplay.jar -h 10.0.100.210 -d
Press ctrl-c to quit
java.io.IOException: Server returned HTTP response code: 453 for URL: http://10.0.100.210:7000/photo
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926)
	at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1921)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at com.jameslow.AirPlay.doHTTP(Unknown Source)
	at com.jameslow.AirPlay.doHTTP(Unknown Source)
	at com.jameslow.AirPlay.photoRaw(Unknown Source)
	at com.jameslow.AirPlay.photoRawCompress(Unknown Source)
	at com.jameslow.AirPlay$PhotoThread.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 453 for URL: http://10.0.100.210:7000/photo
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	... 5 more

I was following this: https://askubuntu.com/questions/833436/airplay-mirroring-from-ubuntu-16-04-to-apple-tv

Segmentation fault when mirroring screen

I'm unable to mirror my desktop to my 4th generation Apple TV. Photos work fine, but desktop mirroring gives me a segfault. My Apple TV has no passcode/password.

$ java -version
openjdk version "1.8.0_144"
OpenJDK Runtime Environment (build 1.8.0_144-b01)
OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)

$ java -jar airplay.jar -h 192.168.25.46 -p photo.jpg # this works fine
Press ctrl-c to quit 
^C%                                                                                                                                                                      

$ java -jar airplay.jar -h 192.168.25.46 -d # this will crash
Press ctrl-c to quit
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f8e9976a9a9, pid=7867, tid=0x00007f8e99d54700
#
# JRE version: OpenJDK Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.144-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libawt_xawt.so+0x409a9]
#
# Core dump written. Default location: /home/cisneiros/Downloads/core or core.7867
#
# An error report file with more information is saved as:
# /home/cisneiros/Downloads/hs_err_pid7867.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[1]    7867 abort (core dumped)  java -jar airplay.jar -h 192.168.25.46 -d

I'm on Fedora 26

OS:Fedora release 26 (Twenty Six)

uname:Linux 4.13.5-200.fc26.x86_64 #1 SMP Thu Oct 5 16:53:13 UTC 2017 x86_64
libc:glibc 2.25 NPTL 2.25 
rlimit: STACK 8192k, CORE infinity, NPROC 63395, NOFILE 4096, AS infinity
load average:0.65 0.66 0.60```

Photo Protocol Not Working from Shell on AppleTV3,1

The PHP library works fine:

php airplay.php -h 192.168.2.112:7000 -p /Users/admin/Desktop/SPACE.JPG

, but the Shell script none:

curl -D test.txt -X PUT --data-binary @$filename -H 'Connection: keep-alive' -H 'User-Agent: MediaControl/1.0' -H 'X-Apple-Transition: None' -H 'Content-Type:' -H 'Accept:' -H 'Host:' -H 'Expect:' http://192.168.2.112:7000/photo

The result is a black screen /disconnect.

I have found the same issue in Objective-C library LG ConnectSDK ( ConnectSDK/Connect-SDK-iOS#157 ) and AirPlayKit ( https://github.com/rothacr/AirplayKit )

Ubuntu 16.04 Exception

$ java -jar airplay.jar
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jmdns/JmDNS
at com.jameslow.AirPlay.search(Unknown Source)
at com.jameslow.AirPlay.search(Unknown Source)
at com.jameslow.AirPlay.searchDialog(Unknown Source)
at com.jameslow.AirPlay.searchDialog(Unknown Source)
at com.jameslow.AirPlay.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.jmdns.JmDNS
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more

iOS 9 support?

I understand that Apple has some major overhaul of Airplay protocol in iOS9 and Apple TV 4. Is there any plan to reverse engineer the protocol?

Not possible to set resolution when using -h parameter?

If I use bonjour discovery to select the Apple TV, I'm also given the choice of resolution. 1080 or 720. But with the -h parameter, it seems I automatically get 720, which makes the screen unreadable. Is it possible to specify 1080 resolution with the -h parameter?

Unreadable 720 resolution:
720
Readable 1080 resolution:
1080

Can't connect

java -jar airplay.jar -h 172.80.255.65 -d
Press ctrl-c to quit
java.io.IOException: Server returned HTTP response code: 403 for URL: http://172.80.255.65:7000/photo
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at sun.net.www.protocol.http.HttpURLConnection$7.run(HttpURLConnection.java:1725)
at sun.net.www.protocol.http.HttpURLConnection$7.run(HttpURLConnection.java:1723)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1721)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1292)
at com.jameslow.AirPlay.doHTTP(Unknown Source)
at com.jameslow.AirPlay.doHTTP(Unknown Source)
at com.jameslow.AirPlay.photoRaw(Unknown Source)
at com.jameslow.AirPlay.photoRawCompress(Unknown Source)
at com.jameslow.AirPlay$PhotoThread.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://172.80.255.65:7000/photo
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1676)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
... 5 more

Low framerate when mirroring

Hi, I'm using this software from linux to mirror my monitor, but the framerate is really low (around 1 FPS I guess) while it's very high when streaming from OSX.

What can I do to improve the framerate? From the readme you list some server software with a column showing mirroring support, so I guess this client should support mirroring, but from the code it looks like it screenshots the desktop and sends it as a photo instead.

Window decoration and some window contents are missing

When I use this for my Ubuntu Unity desktop, I don't get

  • Mouse Cursor (covered in issue #4)
  • Window Decoration (the "white space" above the terminals is actually black and contains window title, maximize button, etc.)
  • Content of some dialog boxes (the word dialog box contained a "Do you want to save?" question)
  • Desktop Tooltips

See camera picture of AirPlay result:

fullscreen

Suggest more information about JMDNS

I got JMDNS working but not without poking around, and I suggest that some more detailed explanation of accomplishing this is mentioned. E.g. I couldn't get this suggested approach to work:

java -jar airplay.jar

Instead this worked for me:

Download jmdns.jar e.g. from this zip file. Then run:

java -cp airplay.jar:jmdns.jar com.jameslow.AirPlay -d

I'm not sure if this is the best way to do it. But some more documentation on this would've been nice.

Dockerfile not working

Doesn't work because the GUI doesn't work with docker, when building the image I get

debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (This frontend requires a controlling tty.) debconf: falling back to frontend: Teletype

And when launching it :

java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207) at java.awt.Window.init(Window.java:476) at java.awt.Window.<init>(Window.java:438) at java.awt.Window.<init>(Window.java:594) at java.awt.Dialog.<init>(Dialog.java:665) at javax.swing.JDialog.<init>(JDialog.java:590) at javax.swing.JDialog.<init>(JDialog.java:552) at com.jameslow.AirPlay.searchDialog(Unknown Source) at com.jameslow.AirPlay.searchDialog(Unknown Source) at com.jameslow.AirPlay.main(Unknown Source)

HomePod?

Can this project be used to stream a live radio stream to my HomePod from the Ubuntu command line?

How to run the client (iOS) so it connects to server

Hello,

I got the Java code working that starts the server (receiver) for AirPlay mirroring but not sure how to start from the client - iPhone, I click on 'Screen Mirroring' but it's not showing the Java server app. Please help.

Thanks,
Suyash

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.