Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing android as a server (receiver) in airplay

I want to create the airplay in android in which my android device will work as a airplay server(receiver)and iPhone device will work as a receiver . I have used jmdns in my application which is open source library in java for the airplay . It is working fine for the audio . But when I come to the video and image then there is lot of struggle for me even with the discovery of the device .Here is my code for the creating and registering the service :

    ServiceInfo info = ServiceInfo.create(identifier + "@" + name + "._raop._tcp.local", identifier + "@" + name, port, "tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1");

        dns = JmmDNS.Factory.getInstance();
        ((JmmDNSImpl)dns).inetAddressAdded(new NetworkTopologyEventImpl(JmDNS.create(InetAddress.getByName("localhost")), InetAddress.getByName("localhost")));

        try {
            Thread.sleep(1000); // If this isn't done the Announcement sometimes doesn't go out on the local interface
        } catch (InterruptedException e) {
            e.printStackTrace(System.err);
        }

        dns.registerService(info);

when i change that ._raop in the first line to the ._airplay then the device has been discovered for the image and audio in the iPad. When i select the device for playing the video the it show the message "This video is playing android(server name )". But in server side i am not getting any packets to process. I am studied Jmdns lot . But i am not getting how to implement the video and image in the airplay using jmdns . Any ideas ?

like image 535
V-Xtreme Avatar asked Feb 28 '13 05:02

V-Xtreme


People also ask

How do I connect my Android device to airplay?

Connect to an AirPlay receiver Open the AirMusic app on your Android device, and on the main page you’ll find a list of nearby receivers that AirMusic supports, including AirPlay, DLNA, Fire TV, and even Google Cast devices. In this list, tap on the AirPlay device that you wish to stream to.

Is there an open source airplay server for Raspberry Pi?

An open-source AirPlay mirroring server for the Raspberry Pi. Supports iOS 9 and up. Airplay Receiver SDK supports Airplay Mirroring and AirPlay Casting to a receiver device. Build a single or multi-room streamer for an existing audio device using a Raspberry Pi! Supports Bluetooth, Airplay and Spotify Connect OwnTone is forked-daapd's new name.

What is airplay and how does it work?

AirPlay has changed the way people stream their music and other media content over several devices over a common wireless network. With multiple applications available for the users of Android, the feature has been successful in reaching out to other users as well.

What is the best airplay app for Android TV?

Top 10 AirPlay Apps for Android. Here is our list of the top 10 AirPlay apps for Android. • 1) Double Twist. • 2) iMediaShare Lite. • 3) Twonky Beam. • 4) AllShare. • 5) Android HiFi and AirBubble. • 6) Zappo TV. • 7) AirPlay and DLNA Player.


Video Answer


1 Answers

You need a streaming server. FFmpeg seems to me an interesting place to start. See the ffserver component.

Here is a nice tutorial on how to wrap it in ffmpeg-java.

like image 186
Dennis Winter Avatar answered Oct 13 '22 06:10

Dennis Winter