Quantcast
Channel: iPhone Tips, Help and Troubleshooting
Viewing all articles
Browse latest Browse all 13311

Quick Tip: Displaying and Recording AirPlay-capable iPhone / iPod touch Screens

$
0
0
This article has technical sections. However, the generic tips and trick sections can easily be understood by non-techies too.

Answering a question HERE, I've made some serious tests to find out how you can best record the contents of the iPhone 5's screen if

- you don't want to / can't purchase a HDMI recorder so that you can use the HDMI adapter
- you need, at least resolution / detail-wise, perfect mirroring, with true pixel-by-pixel mirroring.

Unfortunately, the HDMI-Lightning adapter, as has already been pointed out,
- always generates a 1080p output
- always uses overscan (unless you're lucky to have a monitor / projector which, when driven via a HDMI – DVI-D cable, makes the iPhone disable overscan), which itself rescales
- in addition, as the underlying en/decoding algorithm can't transfer video at full 1080p resolution, it rescales videos to 900p.

For the tests, I've used a very simple app not doing anything else than just displaying an image in its resource bundle to avoid having to rely on the (TV output-wise, buggy - dedicated article) built-in Photos app.

Should you want to try it on your own iPhone, it's available for download HERE. You'll need to put ISO_12233-reschart-169-fhd.png, available for download HERE, in the DisplayCheckerboardOniPhone5InnerScreen subdirectory before loading it in Xcode.

As the original question asked about the quite excellent Reflector ($12.99; homepage) client, I've examined it. This, however, doesn't mean other software-based solutions can't be great. Some of them are. For example, if you want to record a video of the screen right on your iDevice without having to use a desktop computer, you can use the essential “Display Recorder” app on jailbroken devices, developed by the same Ryan Petrich as the also-essential “DisplayOut” (dedicated bible). A new app, “RecordMyScreen”, is also worth mentioning, albeit it's still quite a bit weaker than Ryan Petrich's Display Recorder (no audio recording, for example). It, as opposed to Display Recorder, doesn't require jailbreaking.

Configuring Reflector

First and foremost, if you really want to use Reflector for recording your iPhone 5 (iPod touch 5 / iPhone 4S) screen, you must switch it to optimized iPhone 5 (or, with older, 3:2 Retina screens, 960*640) mode in preferences:



Should you forget this, the resulting mirrored picture will be of much lower resolution. If, for example, you stick with the default “Any Device (1280*720)” mode, in Portrait mode, the height will be 720 rows, which is smaller than both the old, 3:2 3.5” screens (960*640) and the new, 16:9 4” ones (1136*640).

That is, particularly if you want to record screen footage, make double sure you properly set the device type.

New 4” screens and Portrait mode recording

If you use the built-in recorder (Device > Start Recording) for recording in Reflector, you'll note that, in Portrait mode, the recorded footage will be of 1080 pixels high and not 1136. This also means rescaling will take place, completely destroying fine details. Let me show you an example (a direct framegrab from a recorded session):



(Please consult my previous articles on how this checkerboard should be evaluated. Also note that, starting with this crop, you are supposed to click the thumbnail for the full, original image on Flickr so that you can see the entire image, not just a small crop of it. Finally, as you can see based on the status row above, all the shots are taken on my iPhone5 running iOS7 beta 1.)

Should you want to avoid this, use an operating system-level recorder (for example, ScreenFlow) after making sure you select 1:1 pixel mapping (via Device > Scale: Actual Size). An example ScreenFlow framegrab from a 1920*1200 recording on my 17” MBP:



This will, of course, only work on desktops with 1200 rows or more – for example, the old (and, unfortunately, discontinued) 17” MBP series, which sports a WUXGA (1920*1200) screen. On models with lower-resolution screens you can't use external recorders to do this trick.

Comparison time: wireless vs. wired

Compared to the wired Lightning-HDMI approach, because of the inherent, major problems of the latter, Reflector, as it doesn't use any kind of scaling, delivers much better pixel-by-pixel rendering. Let me show you some examples:

This is the wired mirroring in Portrait orientation:


and, as has already been shown, this is the (unscaled) wireless one to Reflector, recorded by an external client on an WUXGA screen:




Let's see how the landscape orientation compares. The wired Lightning-HDMI adapter delivers pretty bad results because of the overscan and the several rescales:



And the wireless (Reflector), flawless one:





What about routing the signal through an Apple TV 2/3 via AirPlay and recording the HDMI output of the latter?

Not a good idea – it'll be scaled to either 720p or 1080p, resulting in major small detail deterioration.

Appendix One - What about the background multimedia playback in iOS7?

Now that I've used iOS7b1 screenshots in the above article and elaborated on both wired and wireless (AirPlay) video streaming to external receivers, let me also elaborate on whether there are any changes in doing this in the background, that is, when running any other app (including the operating system itself) in the foreground.

Many people think Apple's new additions to the background model elevates the operating system to the level of the, multitasking-wise, far superior Android or Windows RT.

Unfortunately, this isn't the case with multimedia (either). Exactly the same restrictions apply as in pre-iOS7 operating system versions:

- not any kind of cabled output, not even via cables inherently incapable of mirroring (composite & component)
- wireless AirPlay only works in background when not in mirroring mode. By default, Videos is able to play back local (but not via Home Sharing!) videos this way. In addition, several AppStore players with enabled background mode allow for the same, assuming yo play back iOS-native files, that is, ones that can be natively decoded by the AirPlay receiver. Note that top AppStore players like nPlayer and GoodPlayer must be manually configured to allow for background playback. I've published a lot of info on all this HERE http://forums.macrumors.com/showthread.php?t=1594897 .

Incidentally, speaking of the stock Videos app, Apple at last has got ridden of the ugly non-proportional fonts of their proprietary closed captions. Now, these captions are rendered using nice, proportional fonts:




Feel free to compare this to the first framegrab in Section “1.1.2.1 Apple CC's” of my Closed Captioning bible.

Incidentally, the same frame with the new Videos UI displayed:



Appendix Two – the source code for my image displayer app

It's, as has already been pointed out, REALLY simple. Assuming the Full HD-sized ISO_12233-reschart-169-fhd.png file is copied to the resource bundle, it just displays it in a UIImageView programmatically added to the current view. This means the best place to put it is in a View Controller; for example, the viewDidLoad method of a simple one-view project. The UIImageView's size is directly set to be the same as the source image (here, full HD).


UIImage* resChartImg = [UIImage imageNamed:@"ISO_12233-reschart-169-fhd.png"];
CGFloat widthOfImage = resChartImg.size.width;
CGFloat heightOfImage = resChartImg.size.height;
UIImageView* picv = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, widthOfImage/[UIScreen mainScreen].scale, heightOfImage/[UIScreen mainScreen].scale)];
picv.image = resChartImg;
[self.view addSubview:picv];


Viewing all articles
Browse latest Browse all 13311

Trending Articles