Im mirroring my app on a tv, using this post about video mirroring for iPad, in an iPad1
the problem is that the image is not full screen,
how can i make the image full screen?
thanks!
The image most likely isn't scaled correctly because your iPad's aspect ratio is 4:3 whereas your TV (if HD) is most likely 16:9.
Related
I'm developing an IOS app that will support both iPhone and iPad. I want to play a full-screen background video, but the same file will either be stretched or cutoff on larger or smaller screens.
What is the best strategy for making sure the video plays with the correct aspect ratio? Do you just bundle them both and use code to distinguish?
It doesn't seem correct to bundle different videos for each possible aspect ratio. Wouldn't the app bundle size get out of hand? Is there a way to package the correct one for iPad vs iPhone somehow?
I am using the AVFoundation framework to have a camera view on my iPhone app.
On iPhone 5 and further, the camera fills the entire view where it's in. On iPhone 4/4S, the view isn't filled entirely and I get blank spaces on both sides of the view. I believe it's not because of the constraints, but because of the proportion of the iPhone's screen :
With the preset AVCaptureSessionPresetPhoto, on iPhone 5/6, the ratio of the image is 3/4. On iPhone 4/4S with the same preset, the ratio of the image is 9/16. It looks like the shape of my camera's view can be filled with a 3/4 image, not a 9/16 image.
So I looked for all the preset available, and I tried the preset AVCaptureSessionPreset640x480 thinking that the problem would be solved since 640*480 delivers a 3/4 image... But it didn't fixed anything, I still have blank spaces on both sides of the view.
Is there a way to adapt the resolution with the AVFoundation framework ?
(I think my problem would be easier to understand with images, but I'm not authorized to post some yet)
I didn't found a way to use the camera on the exact ratio i wanted, so I just created a new ViewController that I only use on the iPhone 4/4S, with a different interface for this device
On Snapchat, it allows you to take a full screen camera photo on iOS. The preview is full screen, and the image returned is full screen. There appears to be no cropping/stretching/etc... What you see is what you get.
Now I've looked all over the place, and I can't figure out how this is actually being done, seeing that the iPhone camera always returns an image with an aspect ratio of 4:3. Yes, you can use the camera view transform to have a full screen "preview", but the image returned is still 4:3 and needs to be cropped.
So my question is, how do you take a full screen camera photo on iOS without cropping? If your answer is that it can't be done, then how is Snapchat doing it (or appearing to do it)?
Snapchat isn't displaying everything the camera is picking up. By cropping a bit from the top/bottom or sides, they can create a 16:9 image from a 4:3 image. This is easy to verify.
Open up the snapchat and camera apps so it's easy to switch between them.
Place your phone on its side pointed at something with some marks for reference points.
Switch between the apps without moving the phone. There is content that you do not see on Snapchat.
I'm just wondering what size the video should be so that there won't be black bars on iphone 4/5 or ipad? Any suggestion will be appreciated. Thanks!
Since the iPhone 4, iPhone 5, and iPad all have different screen aspect ratios it's impossible to have a single size of video which in full-screen mode won't have black bars on some devices.
Instead, you can use the scalingMode property of MPMoviePlayerController to keep your video zoomed in to fit the screen (assuming that's what you're using to play back your video - similar analogues exist in other video playback classes). You probably want to use the MPMovieScalingModeAspectFill scaling mode, which will fill the video to fit the screen without distorting it.
I need a full screen portrait video like the following:
What should my export settings be in Adobe After Effects. I know that iPad supports h.264 and up to 640x480. But I need it to fill the 1024x768 in portrait mode. As long as I get the final video looking just as it does in the screenshot is all that matters (meaning no black bars on the sides or anything, just fullscreen video).
The iPad will happily play 720x1280 h.264 video.
So, in your situation, you should be able to render your video out at a width of 768 pixels, and with a corresponding vertical size that matches your video's aspect ratio correctly.