video trimming in uiimagepicker - iphone

I was able trim the video when i used the photo library source type. But when I use the camera source type trimmed video appears to be saved. but when i play the saved video it is not trimmed. Can any one pls help me with this?

It looks like you can't use uiimagepicker AND get the edited video. You have to use UIVideoEditorController.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIVideoEditorController_ClassReference/Reference/Reference.html#//apple_ref/occ/cl/UIVideoEditorController

Related

Subtitles display in moview

I have a video downloaded from a link and also the .srt files for it.
How can I show the subtitles?
They are not included with in the video, instead they are given as a separate url.
From what I browsed so far MPMoviePlayerController wont support such kind of external subtitles but AVPlayer does.
Can any one please suggest a solution for it?
You have to implement the subtitle thing yourself. So you first need to parse the .srt and then display UILabels with the text at the right time.
Look at this:
How to display subtitles within MPMoviePlayerController

Recording video with option of manipulating the pixels before writing to file

I know that I can access raw video images from the iPhone's camera with AVCaptureVideoDataOutput. I also know that I can record video to a file with AVCaptureMovieFileOutput. But how can I first access the raw video images, manipulate them and then write the manipulated ones into the video file? I've already seen apps in the app store, which do this, so it must be possible.
Ok, I now know, that it's done with AVAssetWriter.

mp4 vs m3u8 format

I am trying to play a video in iPhone, which has m3u8 format. The video's link is parsed from an XML (so i cannot change it). I'm trying to play it with MoviePlayerController (set it on fullscreen, controlStyle is fullscreen too, set the presentModalViewController to the MoviePlayerController). After pressing the play button, the movie has only sound for a few seconds, no video screen, and the app crashes.
In this XML I have a different videolink, which contains mp4 format. Playing the video in the same mode (with MoviePlayerController and the settings...), it works fine. So: do you have any ideas what the problem is? If there is any encoding problems of m3u8? If it can be changed and how?
Thank you :)
Look the AVPlayerDemoPlaybackViewController class from this very useful open source control released by Peter Steinberger
https://github.com/steipete/PSPushPopPressView
Thanks again Peter!

uiimagepickercontroller video duration - photo library

Am developing a app which will upload video to the server which is picked form local iphone photo library.
here i want to restrict the user not to upload more than 3min of video..Question is how to get the duration of the video which is picked from local photo library using uiimagepickercontroller.
will it contain any property for that..?
Thanks
I am not sure but did u try imagePickerController.videoMaximumDuration = urDuration;
You can get the size of your videofile.If you want to put check according to the size that is possible or you can get the duration by using mpmovieplayer class but for that you have to get the full video file .I dont think so you want to do this so its gud if you can put a check according to the size.

Record Camera from iPhone and use as overlay in another video

I know how to record a video from the camera on the iPhone, my question, is it possible to take the recording and overlay it on a saved video and save it out as another file?
No, I don't think so. Not using an standard framework. You could probably do something involving screen capture and combing a load of images to make a video. But it would be complicated.