Does AirPlay always transcode or re-encode video and audio while streaming?

sofakng

macrumors regular
Original poster
Dec 5, 2008
222
12
Does anybody have any information on how AirPlay works when streaming content such as YouTube or HBO Go?

For example, I really like the Chromecast because video URLs are sent to the Chromecast and then they are played at 100% native quality from the streaming source.

When you use AirPlay Mirroring, I know that the iOS device is just encoding the screen into a video/audio stream and then streaming it to the Apple TV, but what about YouTube and other similar services that don't use mirroring?

I'm wondering if YouTube and similar apps are re-encoded and thus have lower quality when streaming...
 

Rigby

macrumors 601
Aug 5, 2008
4,741
3,689
San Jose, CA
Well, there are really two questions:

1) Will video streams be transcoded when you Airplay them? Generally no. Almost all streaming apps on iOS use the AV Foundation framework and compatible video/audio streams that can be directly played by the Apple TV, so Airplay will stream the original video. The only exception are apps like VLC that can play formats that are not natively compatible with iOS by using their own codecs. For such formats only Airplay Mirroring can be used (typically with terrible quality).

2) Will video streams be relayed through the iOS device or streamed directly to the Apple TV? If the stream is served via a compatible HTTP Live stream, the ATV can stream it directly. The iOS device and ATV can also exchange authentication credentials and encryption keys for the server when required. So in many cases the stream will go directly to the ATV similar to the way Chromecast works. I don't know if that's the case for Youtube, but it would be technically possible for videos that are available in an Apple-compatible format (i.e. not only Flash).
 
  • Like
Reactions: robpow

sofakng

macrumors regular
Original poster
Dec 5, 2008
222
12
Thanks for the information!

Is there a way to determine if the video is being played directly or mirrored? (i.e. with VLC or similar)
 

nebo1ss

macrumors 68030
Jun 2, 2010
2,736
1,242
Switch off the phone after the video starts. That is how you prove it with Chromecast. Don't see why the same test
should not work with airplay.
 

sofakng

macrumors regular
Original poster
Dec 5, 2008
222
12
I can put the phone to sleep and the video keeps playing, but if I actually turn the phone off then the video stops in all of the applications I've tried.
 

Longkeg

macrumors 6502
Jul 18, 2014
294
107
S. Florida
Just curious... All the examples you mention can be played directly on the ATV. Why Airplay them from a second device?
 

sofakng

macrumors regular
Original poster
Dec 5, 2008
222
12
Yeah, those are bad examples. What about Amazon Instant Video or the Disney Channel apps?

...or I might want to browse on my iPhone or iPad instead of using tvOS, but I want to make sure I'm still getting "100%" quality if I'm using AirPlay instead of the native app.
 
Last edited:

TrueBlou

macrumors 68040
Sep 16, 2014
3,787
2,499
Scotland
AirPlay should be sending the full quality video to the Apple TV.

Generally speaking, if you are streaming from an iOS device to the Apple TV you can't power off the iOS device as its doing a part of the work.
The only time I've seen this be different is if you are streaming from your iTunes library on your computer.
For instance in the remote app on iOS, if you begin playing a song from your library and tap on the AirPlay icon and select the Apple TV. The music is actually being sent from your computer, so you can completely switch off your phone, or do other things without it affecting the playback from the iTunes library.
 

Rigby

macrumors 601
Aug 5, 2008
4,741
3,689
San Jose, CA
Thanks for the information!

Is there a way to determine if the video is being played directly or mirrored? (i.e. with VLC or similar)
Try starting Airplay and then putting the iOS device in airplane mode (disconnecting it from the network). With some apps the video will continue playing on the ATV.