The video I recorded on the iphone using the camera plug-in is h265 encoded and cannot be played on Android. Can the video recorded on the ios also be h264 encoded? I tried to solve this problem myself, the following is my code, Can it be merged into the camera plug-in, or when shooting video, support parameter setting encoding format?
enter image description here
Related
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?
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
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.
We have an issue where video generated by our application and saved to camera roll (from user action) will show as black thumbnail on the iOS Photo Gallery instead of a thumbnail of a frame. Once you select the video it will play without any issues on the iOS device or any other device (export to your mac or pc...).
The issue does not occur on the iPhone simulator, only on iOS devices..
We generate the video using AVFoundation (very similiar to this How do I export UIImage array as a movie?)
We then combine the video with an mp3 file using AVMutableVideoComposition. If I extract all frame of video, first frame is not black.
The thumbnail in the Photo Gallery will show as a black square, no time span (on iOS4) shown on the thumbnail. We save the video to camera roll using UISaveVideoAtPathToSavedPhotosAlbum ...
We have changed the video compression type and settings multiple times with no luck. The output is a H264 QuickTimeMovie.
Any ideas ?
Thank you.
As Flash content is not supported on iPad, we keep on hearing that the content can be converted into HTML5 content which works on the iPad.
So my question is specifically which are those formats that the iPad actually plays (like .swf is for Flash) ?
There are various video codecs such as H.264 that HTML 5 developed video players can play.
You can read more into the concepts here: Video - Dive Into HTML5
There are several video encoders out there that can convert your video into one of these formats usually with the mp4 extension.
Just reiterating what #James-Santiago said, MP4 is the way to go and for converting, I'd recommend Miro Video Converter.
Once you have your video decoded, add the HTML5 DOCTYPE and then the following code to play your video:
<video src="myVideo.mp4" controls></video>