Airplay Doesn't Work with Streaming Video
#1
I just downloaded the Eden beta release and the Airplay functionality is absolutely awesome! There is one thing that's not working for me though. Any form of streaming video from my iPad2 cannot be air played successfully to xbmc. Oddly enough if I just airplay the audio of the streaming video the audio streams fine in xbmc.

One quick way to reproduce this issue is to use the Trailers app for iPad and try to airplay a trailer to xbmc. I saw the "working" loading icon show up in xbmc but it quickly stopped and nothing happened.

Does anyone have this issue or know a fix? I'm running xbmc on mac osx.
Reply
#2
does it work from within youtube app? else xbmc.log is needed...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Nope, doesn't work with the youtube app either. I've put the log up on paste bin. It expires in a month, let me know if you need the log for longer, I have saved a back up of the log.

The log is at: http://pastebin.com/tpHeD6p9

I tried to watch the Prometheus movie trailer and you should start seeing it play around the 8:30 mark in the log.

Thanks for your help!
Reply
#4
I've been having similar issues, though it depends on the application. Some applications work fine (such as Airvideo streaming media from the local netowkr, the Youtube app, or the Boxee iPad app (at least streaming youtube bookmarks)), whilst others such as the BBC iPlayer and ABC (Australia) iView app fail to work.

Trying with ABC iView I get this log data:

Quote:1:21:10 T:4120 NOTICE: -->Python Interpreter Initialized<--
11:21:40 T:6264 NOTICE: DVDPlayer: Opening: https://abcsecurehttp-a.akamaihd.net/pla...bcfdd298af
11:21:40 T:6264 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
11:21:40 T:7584 NOTICE: Creating InputStream
11:21:40 T:6264 ERROR: Incorrect movie stacking regexp format:[(.*?)([ ._-]*[a-d])(.*?)(\.[^.]+)$]
11:21:41 T:7584 ERROR: Previous line repeats 1 times.
11:21:41 T:7584 WARNING: XFILE::CFileCurl::CReadState::FillBuffer: curl failed with code 22
11:21:41 T:7584 ERROR: CFileCurl::CReadState::Open, didn't get any data from stream.
11:21:41 T:7584 ERROR: XFILE::CFileCache::Open - failed to open source <https://abcsecurehttp-a.akamaihd.net/playback/_definst_/goingpostal_01_02.mp4?d=ios&a=3e421a599a4c10625f6af80fa87304a4&a=3e421a599a4c10625f6af80fa87304a4&deviceId=3aa40eca2d939eb274463b601700d852f4015e1f&deviceToken=f0b81da8fdb4558f765be7ae00e3f6a3bd3f1afe1874ee6d01e64bbcfdd298af>
11:21:41 T:7584 ERROR: CDVDPlayer::OpenInputStream - error opening [https://abcsecurehttp-a.akamaihd.net/pla...cfdd298af]
11:21:41 T:7584 NOTICE: CDVDPlayer::OnExit()
11:21:41 T:7584 NOTICE: CDVDPlayer::OnExit() deleting input stream
11:21:41 T:8864 ERROR: AIRPLAY Server: unhandled request [/setProperty]
11:21:41 T:6264 NOTICE: CDVDPlayer::CloseFile()
11:21:41 T:6264 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
11:21:41 T:6264 NOTICE: DVDPlayer: waiting for threads to exit
11:21:41 T:6264 NOTICE: DVDPlayer: finished waiting
11:21:41 T:8864 ERROR: AIRPLAY Server: unhandled request [/setProperty]
11:21:47 T:8864 ERROR: AIRPLAY Server: unhandled request [/getProperty]
11:22:03 T:5728 ERROR: Previous line repeats 3 times.
11:22:03 T:5728 NOTICE: -->Python Interpreter Initialized<--
11:22:03 T:5728 NOTICE: {'limit': '4'}
11:22:05 T:6264 NOTICE: Storing total System Uptime
11:22:05 T:6264 NOTICE: Saving settings
11:22:05 T:6264 NOTICE: stop all
11:22:05 T:6264 NOTICE: ES: Stopping event server
11:22:05 T:6264 NOTICE: stopping upnp
11:22:05 T:5360 NOTICE: ES: UDP Event server stopped
11:22:06 T:6264 NOTICE: stopping zeroconf publishing
11:22:06 T:6264 NOTICE: Webserver: Stopping...
11:22:06 T:6264 NOTICE: WebServer: Stopped the webserver
11:22:06 T:6264 NOTICE: Webserver: Stopped...
11:22:06 T:6264 NOTICE: stop sap announcement listener
11:22:06 T:6264 NOTICE: clean cached files!
11:22:06 T:6264 NOTICE: unload skin
11:22:06 T:6264 NOTICE: stop python

With iPlayer I get this log data:

Quote:11:56:34 T:6656 NOTICE: DVDPlayer: Opening: http://iplayer.bbc.com/content/video/liv...width=wifi
11:56:34 T:6656 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
11:56:34 T:6692 NOTICE: Creating InputStream
11:56:35 T:6692 NOTICE: Creating Demuxer
11:57:05 T:6692 ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file http://iplayer.bbc.com/content/video/liv...width=wifi
11:57:05 T:6692 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
11:57:05 T:6692 NOTICE: CDVDPlayer::OnExit()
11:57:05 T:6692 NOTICE: CDVDPlayer::OnExit() deleting input stream
11:57:05 T:6656 NOTICE: CDVDPlayer::CloseFile()
11:57:05 T:6656 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
11:57:05 T:6656 NOTICE: DVDPlayer: waiting for threads to exit
11:57:05 T:6656 NOTICE: DVDPlayer: finished waiting
11:57:10 T:6656 ERROR: Control 1 in window 10099 has been asked to focus, but it can't

With another app, Crackle, it just plays the pre-roll add and then stops. If I wait till the feature starts before switching airplay to XBMC it tries but fails giving this kind of log data:

Quote:12:01:16 T:6656 NOTICE: DVDPlayer: Opening: http://mediacrackle-i.akamaihd.net/i/1/g...?__b__=800
12:01:16 T:6656 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
12:01:16 T:9024 NOTICE: Creating InputStream
12:01:17 T:9024 NOTICE: Creating Demuxer
12:01:47 T:9024 ERROR: CDVDDemuxFFmpeg::Open - Error, could not open file http://mediacrackle-i.akamaihd.net/i/1/g...?__b__=800
12:01:47 T:9024 ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer
12:01:47 T:9024 NOTICE: CDVDPlayer::OnExit()
12:01:47 T:9024 NOTICE: CDVDPlayer::OnExit() deleting input stream
12:01:47 T:6656 NOTICE: CDVDPlayer::CloseFile()
12:01:47 T:6656 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
12:01:47 T:6656 NOTICE: DVDPlayer: waiting for threads to exit
12:01:47 T:6656 NOTICE: DVDPlayer: finished waiting
12:01:52 T:6656 ERROR: Control 1 in window 10099 has been asked to focus, but it can't

Guess I should log proper feedback via the right channel.
Reply
#5
Quote:Nope, doesn't work with the youtube app either.

One thing I need to add is that I'm living in China where youtube is blocked. On my iPad2 I used VPN to watch youtube videos but on the machine where XBMC is running it was using the regular local internet connection (and hence trying to connect to youtube would fail). That could be a reason why it didn't work.

UPDATE: Just tried it with VPN on both ipad and the server machine and YouTube airplay works fine. Looks like there's something different with the Trailers app and the YouTube app.
Reply
#6
Alright I think I figured out the problem. If you take the link of the prometheus movie trailer: http://trailers.apple.com/movies/fox/pro..._a720p.m4v and try to open it in your browser you will get redirected to the apple trailer home page. Trying to use curl to download the link also results in an html page.

Then I googled around and saw this link:

http://blog.hd-trailers.net/tutorials/ho...orkarounds

In short, apple will not allow the link to be downloaded unless the User Agent is "QuickTime". If you use curl -A QuickTime then the movie will download correctly. So it seems the fix is easy, just set the user agent as "QuickTime" via FileCurl::SetUserAgent("QuickTime") right before xbmc tries to open that url.

There are 2 choices. One is to hardcode logic to recognize an apple trailer link and set the user agent as QuickTime. The other would be to always set the user agent as QuickTime no matter what.

As for virduk's problem with the various apps. The links all don't work if you just take it and open it a browser. Seems like there are some problems with permissions or authentication. So it may not be an easy fix there.
Reply
#7
allways check native airplay ... if that doesn't work - it won't work on xbmc either ... thx for tracking down that user agent issue ... no clue how to fix it though atm...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#8
Quote:allways check native airplay ... if that doesn't work - it won't work on xbmc either ...

Unfortunately I don't have an Apple TV so I can't test it. However, judging that the Trailers app is released by Apple, I'm pretty sure that native airplay would work. The other fact is the video player for Apple TV and iPad are indeed Quicktime to begin with, it would make sense that they set the User Agent as QuickTime and so the link would've worked anyway. Of course, just my educated guess...

Quote:no clue how to fix it though atm...

Why is that? Is it not a simple matter of setting the user agent field before opening the apple trailer url (or universally setting the user agent as QuickTime for all urls, although that may or may not make sense for XBMC)? I'm a little curious if there's a bigger issue at play here. Obviously you're an XBMC team developer so you know what you're talking about, I'm in no way doubting you. I'm just curious about the reason.
Reply
#9
the reason is, i'm still on vacation ... i will not set the user agent per default because it definitly could give urls outthere which explicitly don't want this quicktime user agent set ... you'll never know Wink.

I bet its an easy fix - once i'm back home and have some time to talk to some other devs ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#10
lol when you said "atm" I didn't realize you meant it literally. I agree that setting it universally probably isn't the right choice here. It's probably best to recognize the the apple trailer url needs special attention and setting the user agent field appropriately. Nonetheless, have fun with your vacation!
Reply
#11
the itunes movie app is not available in the german appstore ... any other app i can use for verification?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#12
nvm i got me an us account ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#13
If you just open up safari and go to http://trailers.apple.com to view any trailer and try to AirPlay it you will be able to reproduce the issue too.

I took a look at the code too and it seems the dvdplayer tries to request a stream by calling CFileCurl::Open. If we add logic there to set the user agent to QuickTime before requesting the url then it should work.
Reply
#14
jonathan_ou Wrote:If you just open up safari and go to http://trailers.apple.com to view any trailer and try to AirPlay it you will be able to reproduce the issue too.

I took a look at the code too and it seems the dvdplayer tries to request a stream by calling CFileCurl::Open. If we add logic there to set the user agent to QuickTime before requesting the url then it should work.

Wasn't even aware that i could airplay with safari. There is already logic there for changing the user-agent by appending a "|User-Agent=QuickTime" to the url. But ATM i can't get AirPlay to work at all since i've updated my iPad to iOS 5.0.1. I didn't figure out how to fix this yet - this has to be solved beforehand so that i can reproduce your issue...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
Airplay Doesn't Work with Streaming Video0