I have created an overlay to an MPMoviePlayerController using the following code, which essentially adds a subtitle in my iphone xcode project:
[_mpMoviePlayerController.view addSubview:lblOverlayView];
I want to now be able to save the video (and eventually facebook, but I don't NEED help with that, just the saving would be fine) with the subtitles. It is playing a preloaded video, and the dynamic part is the subtitle, which is whatever text the user enters (which becomes the value of lblOverlayView. If you have any other ways of adding text that can very over the top of a preexxisting/preloaded video and then saving/emailing/facebooking it, that would also be great! Just some way of doing it!!
Any help I can get will be hugely appreciated.
Related
I am using expo and i am trying to implement a feature similar to snapchat/instagrams draw on video and add text/caption to video before upload it. My problem is not the UI part but editing the original video and getting a uri for the new video
I know with images you can use libraries like expo-pixi then take a snapshot of a view but i am not how to go about this for recorded videos specifically
anyone would be kind enough to point me to the right direction?
Has anybody any idea how to make UITableView the way how it is done with Youtube app?
I mean, in the cells there are thumbnails and some text. This part I have already done.
But still cannot realize how to trigger video. I know how to trigger it from web view, but this is different case.
any help will be appreciated.
EDIT: My observation is that the cells behave like UIWebViews in the native YT app.
Did you have use UITableViewCell for the cell template?
There is MPMoviePlayerController
Overview:
A movie player (of type MPMoviePlayerController) manages the playback of a movie from a file or a network stream. Playback occurs in a view owned by the movie player and takes place either fullscreen or inline. You can incorporate a movie player’s view into a view hierarchy owned by your app, or use an MPMoviePlayerViewController object to manage the presentation for you
You can see also in the detail in Apple's Multimedia Programming Guide by using Video .
I've looked through the Apple documentation but have seen no mention of how to do this, nevermind if it's even possible or not. I'd like to make it so that an iPhone/iPad begins video recording automatically when a certain view is loaded, and stops and saves when the view is dismissed. Is there any way that I can do this or am I just going to have to use the normal UI for video recording?
Use AVCaptureSession
https://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureSession_Class/Reference/Reference.html#//apple_ref/occ/cl/AVCaptureSession
What I want to achieve here is a screen with 2 or more different videos on at a time. I know in the apple documentation it says you can't have more than one video playing at a time and thats fine, I don't want to do this.
All I want is to have the 2 videos on screen and when you press on it, it starts to play, you can go fullscreen if you want but as soon as you press on a different video, the old video stops and the new one starts.
I already have three MPMoviePlayerController set up with the correct position, size and video and the 3 boxes are all drawn to the screen but at the moment, only the last one to be drawn to screen can actually be watched.
Does anybody know if there is any way to achieve this or not and if so, how would I go about it?
Thanks,
Matt
As for as I know, you can only have one active movie player at the same time. It's a limitation from MPMoviePlayerController. Message in Apple documentation :
Note: Although you can create multiple MPMoviePlayerController objects
and present their views in your interface, only one movie player at a
time can play its movie.
Source : http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html
I've been struggling to make video on the iPad work. I'm using an MPMoviePlayerViewController and it plays fine in the simulator. I've tried several different converters, including ones dedicated to producing iPad-formatted video, but none of the videos play on the device. The MPMoviePlayerViewController loads and the controls appear.
For most of the videos, the spinning progress indicator never goes away. For a few, the video loads but when I press play the video immediately pauses. I know that the video is there because I can scan through and see various frames.
I know the code works because it plays a different movie file perfectly. I just have no idea what I'm doing wrong that's preventing my movie from playing. Does anyone know a good step-by-step process of getting an iPad-formatted video from any .mov or .mp4?
Thanks,
Luke
Also, just for future reference, import target video into iTunes, then highlight it and from the Advanced menu choose "Create iPod or iPhone Version" or "Create iPad or AppleTV Version" depending on your target device.
This guarantees that the right codecs are used and the right bitflags set on the video file.
Fixed - the one that loaded but couldn't play eventually worked. Why? Who knows.