View uploaded video in iOS app - ios

I have a bunch of videos uploaded to google drive. They are in mpeg4 (avi) format I believe. I have tried everything I can think to view the video in a MPMoviePlayerViewController. In the simulator the video player launches and looks like it playing, but I don't see any video. When I run it on my device the player won't launch. I have tried to use the downloadUrl, alternateLink, embedLink and webContentLink with no success.
Is it possible to stream video from Google Drive to iOS?

The simulator isn't a full blown emulator, but just a simulator. It uses similar frameworks from Mac OS, which may have different functionality than on iOS. In other words, the simulator may have more capabilities than an actual device.
The MPMoviePlayerController class on iOS supports only a few containers and codecs, and does not support AVI.
Supported Formats
This class plays any movie or audio file supported in iOS. This
includes both streamed content and fixed-length files. For movie
files, this typically means files with the extensions .mov, .mp4,
.mpv, and .3gp and using one of the following compression standards:
H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps. (The Baseline profile does not support B frames.)
MPEG-4 Part 2 video (Simple Profile)
If you use this class to play audio files, it displays a white screen
with a QuickTime logo while the audio plays. For audio files, this
class supports AAC-LC audio at up to 48 kHz, and MP3 (MPEG-1 Audio
Layer 3) up to 48 kHz, stereo audio.

Related

How to convert image to video with DRM (FairPlay)

I want to hide some private content on screenshots. Since Apple provide us only userDidTakeScreenshotNotification, the only way to achieve this is to convert image to video with DRM. According to these thread:
If your application uses FairPlay Streaming (FPS) your video content
will automatically not be captured by the iOS 11 screen recording
feature or QuickTime Player on macOS. The portion of your application
that is playing the content will be blacked out.
I found commercial implementation of these idea in ScreenShieldKit, but it costs money.
The main question:
How it's possible to convert image or label to FairPlay Streaming (FPS) video in offline mode?

AVAssetExportSession exportAsynchronouslyWithCompletionHandler: Source frame unsupported format

I am using AVAssetExportSession to export a video selected from library. It works great for all videos of all types except landscape-recorded screen recordings (using the screen recording feature in iOS 11). Weird enough, it works perfectly for other landscape videos, and it also works perfectly for portrait videos of the same screen recording feature. But I've tried two videos that are landscape screen recordings, and they both failed with the error Source frame unsupported format.
How can I fix this problem?
UPDATE: Videos play just fine both in Photos and in my app before exporting.
The video size may not be standard like 1920 X 1080 , The screen recording produce non standard video resolutions in some devices.
You need to write the videos in standard resolution while recording

Itunesconnect App Preview Video

I have tried many times to upload App Preview video.
But each time I failed.
Please recommend me best tool to convert my video to availble and how to.
Thanks
You must use Safari to upload your video.
I use QuickTime Player to record the screen of my app.
In QuickTime Player you can record in portrait and landscape, but you cannot rotate your screen during the record.
Open QuickTime Player > File > New Movie Recording (then select your device for camera and microfone).
Sample of record screen:
Apple App Preview Video Guidelines
As you can imagine, Apple wants to generate a similar Look & Feel for all videos. Therefore they released some guidelines, which you should mind when creating a preview video.
15-30 seconds length
Maximum file size of 500 mb
.mov, .m4v, .mp4 format
Only use screen capture
No (very less) copy – due to the reason that you can’t internationalize your video and only upload it once in one language
Don’t overlay animated hands, you can use touch hotspots if really necessary
For games: Show more gameplay scenes than cutscenes
You can use voice over – but mind the internationalization part – Apple recommends to only use a very limited and professional voice over if you have to
Your preview video should only contain content for which you have the full rights (don’t show you app streaming content from an iTunes Playlist or a YouTube video)
App Preview Video Format
Now the most important part – which format or size should your video have. As you have already read in my screenshot size article it can be quite frustrating creating a lot screenshots in different sizes.
Apple recommends you to use the following app preview resolutions (this is already a summary, that you have to create the least amount of different video versions):
iPhone 5+ iPhone 6 Plus: 1920 x 1080
iPhone 6: 1334 x 750
iPad: 1200 x 900

What is the maximum video/movie resolution for iPad 3 (retina)?

For some reason, when I try to play a video that is 1536x2048 on the ipad 3, it doesn't play the video, it just skips it. I've checked that the URL for the video is correct. I'm using MPMoviePlayerController. I tried playing the same video on an ipad also and it does the same thing. It just acts like it ignored the "play" line of code.
Is there a maximum supported video resolution then?
According to MPMoviePlayerController reference I'd say that this can answer you:
Supported Formats
This class plays any movie or audio file supported in iOS. This includes both streamed content and fixed-length files. For movie files, this typically means files with the extensions .mov, .mp4, .mpv, and .3gp and using one of the following compression standards:
H.264 Baseline Profile Level 3.0 video, up to 640 x 480 at 30 fps. (The Baseline profile does not support B frames.)
MPEG-4 Part 2 video (Simple Profile)
If you use this class to play audio files, it displays a white screen with a QuickTime logo while the audio plays. For audio files, this class supports AAC-LC audio at up to 48 kHz, and MP3 (MPEG-1 Audio Layer 3) up to 48 kHz, stereo audio.

3gp video and AVPlayer in iPhone

I have an iPhone application that plays the videos of Camera Roll using AVPlayer. I have a 3gp video in my iPhone which I am not able to play using AVPlayer but can be played in Photos app.
I would like to achieve these:
The videos that are not valid as per AVFoundation classes should not be listed in my views that shows Camera Roll videos using ALAsset Library.
Is there any API related to AVURLAsset, AVAssetTrack etc that identifies if the video is playable or not.
I have tried the following:
playable property of AVURLAsset says that it is playable.
The duration of this videos can be obtained

Resources