Movie background iPhone SDK - iphone

I am trying create an application with movie background , I have a .mov video clip which i want put it on background and overlay with buttons and .... what is the best way to do so ? does MPMovieController good idea ?

I think you could use a MPMovieController. Then remove the controls (play, pause).
moviecontroller.controlStyle = MPMovieControlStyleNone;
Then make it so that it repeats.
moviecontroller.repeatMode = MPMovieRepeatModeOne;
Hope this helps!

Related

Movie file Blur effect

I want to implement blur effect to Video.
To play video, I use MPMoviePlayerViewController.
But, I don't know how to implement blur effect to movie.
I tried to overlay blur image above the movie so implement blur effect, but it isn't possible.
When video play, It should change with real time. I found libraries to implement image blurr effect, but can't find library to apply blur effect to video with realtime.I use mp4 file for blur effect. I tried to use GPUImage framework, but it doesn't run exactly.
How can implement that?
Please help me.
Thanks.
I believe GPUImage from Brad Larson is the best way to achieve.
Following is the excerpt from the github page of GPUImage
//Filtering live video
//To filter live video from an iOS device's camera, you can use code like the following:
GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:#"CustomShader"];
GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, viewWidth, viewHeight)];
// Add the view somewhere so it's visible
[videoCamera addTarget:customFilter];
[customFilter addTarget:filteredVideoView];
[videoCamera startCameraCapture];
Since GPUImage has open-source code, you can open up the GPUImageVideoCamera class and study the portion where it perform the live filtering of video data. Then use Apple's CoreVideo framework to grab the video data of a movie video being played and make this GPUImage portion work for it.
Sometimes, boiler-plate codes are not available, but there's always a way out.. Good luck. :)

Is it possible to play video continuiusly after go to other view and come back

I have a video on the first view that use 'MPMoviePlayerController'. I declare the video in 'viewDidLoad' method. I need the video play continuously when go to another view and come back. Is it possible? How?
yes it Possibe play video in background mode try this link
Hope it Help You

MPMoviePlayer or AVPlayer Frame advance

Is there a way to playback a video file frame by frame using either MPMoviePlayer or AVPlayer?
Or even another movie player that I do not know about?
Here is what I want to do. I want to load a video into a fullscreen player and move the content one frame at a time based on user interaction. This will need to be pretty solid as I would need to accurately control what frame the movie player was displaying at any one time.
Ideally I would love to know if it were possible to load a video and control the frame displayed using code.
I know that I could do this using a UIImageView animation but tests show that this uses FAR to much memory.
When using AVPlayer, you can use the - (void)stepByCount:(NSInteger)stepCount method of its current AVPlayerItem to step forward or backward.
AVPlayer *mPlayer = [AVPlayer playerWithURL:url];
[mPlayer.currentItem stepByCount:1];

Camera as background view?

I would like to test around a bit with augmented reality. My first problem is how to get the picture that comes from the camera as background for my view? For what i want to do, i dont need to access the picture, i just need it as background. I found a few solutions how to take a picture with the camera, but nothing that gives me a picture that comes from the camera.
thanks,.
I would use AVFoundation for that.
You need to set up an AVCaptureSession with an AVCaptureDevice and an AVCaptureDeviceInput. Finally - and this is what you're interested in - set up an AVCaptureVideoPreviewLayer.
Send the startRunning: message to your AVCaptureSession object, and you should be good to go.
Docs here: http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW14
another way would be using UIImagePickerController .
Create an instance, say picker and set: picker.showsCameraControls = NO .
And finally set cameraOverlayView with your overlay: picker.cameraOverlayView = someViewController.view.
Hope this helps.

Creating a view overlay over MPMoviePlayerViewController

I am developing an app that plays internet radio. Owing to my lack of skill, i have only used the stock MPMoviePlayerController.
This is so far been able to play a few m3u streams (like the 'feeling floyd' station)
However, i was wondering if there was any way to have this MPMoviePlayerViewController to show me extra information.. like the song that is playing (which information i was able to extract form teh metadata.)
I can get this information all right, but how do i put it on the screen?
Can I make an overlay or something? (the centre of the MPMovieplayer is taken up by the quicktime background... it would be great if i could use an overlay on this space to show current music information or whatever.)
Is this overlay thing possible? if not, is there any other way?
Thank you very much!
V
If you want your own custom view over the player you can add it as a subview to the player's view as [player.view addSubview:yourView];
Get the moviePlayer property of MPMoviePlayerViewController. I think you should be able to to do this [moviePlayer.view addSubview:myView].