iina
iina copied to clipboard
Add Airplay functionality
It would be cool if IINA supported Airplay, so you can play videos on your Apple TV without having to mirror your entire screen.
I'll add my vote to this. AirPlay receiver/recorder and sender would be a great add.
AirPlay only supports H.264/AAC mp4 file, which is supported by QuickTime nicely.
Beamer supports sending many other formats, not sure if its transcoding or not tho. https://beamer-app.com/features
AirPlay (as a protocol) is not restricted to any formats. Apple TV only supports H.264/AAC/Tx3g. 3rd party video players on iOS (and to a lesser extent on macOS) support AirPlay streaming in any format (by de-muxing on the fly).
For example: I use nPlayer on my iPad to AirPlay MKV/HEVC/OPUS/VobSub to my TV via an Android TV box and it works perfectly.
Summary: Format support depends on the receiving device which is NOT necessarily an Apple TV. Many 3rd party video players support streaming via AirPlay and many TV sticks and boxes support receiving AirPlay. (allowing use of many formats)
By default people think of AirPlay as a way to stream videos to Apple TV. Developer guide suggests encoding video with H.264 compression and so on: https://developer.apple.com/library/content/documentation/AudioVideo/Conceptual/AirPlayGuide/PreparingYourMediaforAirPlay/PreparingYourMediaforAirPlay.html
The problem of implementing this functionality was discussed at mpv: https://github.com/mpv-player/mpv/issues/3448#issuecomment-268125970
Also there are some write-ups on how this can be achieved: https://github.com/feross/webtorrent-desktop/issues/1097 https://github.com/butterproject/butter-desktop/issues/528#issuecomment-267760909
To begin with something, I suggest implementing basic AirPlay functionality for streaming supported formats (which seems relatively easy to do). Here is one library: https://github.com/qasim/Airstream
As of tvOS 10.2, AirPlay requires “device verification” which has broken many third-party implementations. Beamer doesn't work. AirParrot added support March 16.
IINA should absolutely support AirPlay, but I understand if it's not top priority. I'm excited to see a proper GUI video player again since MPlayerX.
https://nto.github.io/AirPlay.html https://gist.github.com/watson/50e46a6085ffc805d326 http://sergiochan.xyz/2016/08/29/iOS-Airplay-中的-Airtunes-Server-服务协议和机制详解以及-Android-Demo-的实现/ https://github.com/xbmc/xbmc/pull/698 https://developer.apple.com/library/content/documentation/AudioVideo/Conceptual/AirPlayGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011045-CH1-SW1
Hope it helps.
Thanks for the links, but it appears that the first one is for iOS 5. Do you know of anything newer?
Sorry, I did not notice, that's as far as it goes now. I've hopper-reversed the airserver mac app recently and it failed to load the dylibs, which is annoying. I'll keep up with this if I find something valuable.
Alright, thanks!
This one seems difficult now as I couldn't find any document or o-s implementation of new device verification (/pair-verify
without PIN), let alone FairPlay encryption (/fp-setup
, hope this is not mandatory in newer airplay servers).
Any help on those protocols are greatly appreciated.
For basic operations already documented, you just give airplay server a URL to play, and the airplay device fetch and try to play that url. This has been tested on AirServer app and works, but greatly limited on many aspects. Beside from the format supported, I don't even know are actual devices still support this type of operation, and you need to put up a http server for the device to fetch. This could be a security issue from my point of view.
I was looking into airplay protocols, and will update if I have time to play with that again.
An alternative app for the airplay feature. https://atksoft.com/index.php?name=Home
@fabi94music Sorry, out of the loop here. Is 1.0 gonna inculde AirPlay?
It's unlikely as of now, since I don't think any of us are working on it. One of these days I might take a look at trying to reverse engineer AirPlay, but there are no plans for support currently since this is not a publicly documented protocol.
https://developer.apple.com/documentation/avfoundation/airplay_2/getting_airplay_2_into_your_app
AirPlay 2 is an audio streaming API, as opposed to being a video streaming one as we would need here. In addition, it's only available on iOS and tvOS. The ability to stream video from macOS is not public API on macOS, to my knowledge.
The original WWDC session does list it as supporting on macOS, although AVAudioSession
that the docs recommend doesn't seem to be present on the platform. That might also be the case for the documented method for Airplay 1 though; I'm not super familiar with macOS / iOS audio frameworks.
If it is possible now, or in the future, I would like to chime in and say that even just an audio streaming capability would be quite useful for those of us that use IINA but would like to the audio play over an external speaker. Currently the latency of Airplay 1 means this not really viable but supposedly Airplay 2 should have no problems with real-time playback.
Hello, when about to wait for airplay?
It will be cool to have airplay listed in the feature!
Any news about AirPlay? Could be awesome to watch whatever videos or stream link directly on the Apple TV
Actually you can (using this workaround),
As a workaround, you can activate Airplay to AppleTV as a second monitor, and use inna in full screen airplayed at AppleTV as your second monitor;
Works perfectly.
Em 13 de dezembro de 2018 às 19:31:53, mickaphd ([email protected]) escreveu:
Any news about AirPlay? Could be awesome to watch whatever videos or stream link directly on the Apple TV
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lhc70000/iina/issues/63#issuecomment-447127894, or mute the thread https://github.com/notifications/unsubscribe-auth/APvTV3lKpDmiBkBH4ADKJXy-55k6HRNsks5u4sdJgaJpZM4LdDEL .
Mirroring the Mac screen does not work perfectly. It is not smooth at all with the Apple TV 4 the video is chopped. I am using Airflow which does a way greater job. https://airflowapp.com/ But that would be great to have it in iina.
@lhc70000 VLC will get AirPlay 2 Support for Android and multiple 2019 TV's will be able to receive AirPlay 2 video and audio. Is there a way to implement it into IINA as well?
Almost 2019, issue still open ...
We are short at either experienced people or time, especially on this topic. Your help is welcomed.
https://developer.apple.com/documentation/avfoundation/airplay_2/getting_airplay_2_into_your_app
@whatthehomepod This public API belongs to AVFoundation
but IINA doesn't use AVFoundation
to play videos. Integrating AirPlay into IINA requires reverse engineering and implementing the protocol by ourselves.
(See my response to this exact link above)
Integrating AirPlay into IINA requires reverse engineering and implementing the protocol by ourselves.
That's pretty unfortunate. For those in need of this feature, VLC announced Airplay 2 support in version 4 (Nightly builds are available).
@alexandreleroux Do you have any documentation of this feature? I couldn't find any references to AirPlay in the VLC source code, or any indication of AirPlay 2 capabilities in the macOS VLC 4 nightly builds.