Play two consecutive videos in ios app (objective-c) - objective-c

I have two video files with sound and I need to play them consecutive. I know I can use AVQueuePlayer to play them consecutive in a layer but I would rather use MPmediaPlayer because of its fetures - nice design, implemented stop, play, fullscreen mode bugless etc... Is it possible to play two consecutive videos (without gap) using default MPmediaPlayer?
Thank you. Have a nice day!

Related

HTML5 video player support time mark up and jumping programmatically

I'm looking for a HTML5 video player that allows:
(i) (programmatically) making marks of the interesting segments on the time bar, so the users can quickly jump into that part. Something like YouTube's. Something looks like the following, where # is the interesting parts of the video.
-------#######---------##-------------##----------------
(ii) (programmatically) plays the video at a given time. So javascript:play(5) will skip to the 5th minute of the video.
Is there any such thing for free?
Thanks
Code cue points in this player will be useful. http://knowledge.kaltura.com/javascript-api-kaltura-media-players#HandlingCodeCuePoints
Also check the comparison of the players http://html5video.org/wiki/HTML5_Video_Player_Comparison

Is it possible play multiple clips using presentMoviePlayerViewControllerAnimated?

I have a situation where I'd like to play 2 video clips back to back using an MPMoviePlayerViewController displayed using presentMoviePlayerViewControllerAnimated.
The problem is that the modal view automatically closes itself as soon as the first movie is complete.
Has anyone found a way to do this?
Three options:
You may use MPMoviePlayerController and start the playback of the 2nd (Nth) item after the previous is complete. This however will introduce a small gap between the videos cause by identification and pre buffering of the content.
You may use AVQueuePlayer; AVQueuePlayer is a subclass of AVPlayer you use to play a number of items in sequence. See its reference for more.
You may use AVComposition for at runtime composing one video out of the two (or N) you need to play back. Note, this works only on locally stored videos and not on remote (streaming or progressive download). Then use AVPlayer for the playback.
It's not possible. If the video assets are in local file system, consider AVComposition.

IOS Segemnting a video

I want to segment a video into 9 sections jumble the sections about and then play them together. I am currently trying to use AVPlayer to do this. I can get the sections to load on the simulator but only the first 4 will load on the actual phone. I guess the resources are topping out.
My question is: Is AVPlayer the best framework to use for this (as it seems a waste to create a player item, player and playerlayer for each segment(Which I think is why the resources are topping out)) or is there a lower framework I can use to load one video and display certain segments of it on certain sreas of the screen?
Thanks

ios app question video effects

I am trying to piece together a solution to let users take and edit videos in an app. I have seen the 8mm app and am wondering how they did it... and made it so smooth.
At first I was thinking the effects might have been a series of pngs streamed together like a animated gif and then placed on top of the real video. but then for merging the images to the video I am at a loss. Also the app is so smooth I think it has to be using some low level Core.media Framework but am not sure.
Any ideas or advise on where to begin?
Thanks
AVFoundation combined with OpenGL ES 2.0 (with shaders) provides great performances for adding effects to camera / video in realtime (and even better with the ios 5 but i can't say too much due to the NDA).
You probably read most the documentation of AVFoundation to start with, because there is a lot going on. One method that might be of interests is this one:
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection;
which allow you to work directly with blocks of data representing video information coming from the camera. You can then modify this data to change the video information, for example, adding additional content or pictures on top of the video frame. You can use Open GL ES to do this processing.

creating fade between 2 videos in winforms

i have a media player in vb form...with 2 files in a listbox as a playlist
now i want to create a fade between changing these files as a transition how can i do that...
You can't do this with the MediaPlayer control, unless you "fake" it by merging the two videos into one (handling the overlap transition from the first to the second in your code) and then playing the single merged video.
DirectShow can do this in theory, but programming DirectShow is difficult (all the more so from .Net) and it's obscure enough now that you won't find many people to help you. Also, from my experiments into this area (I was trying to use DirectShow to transition from one video w/sound to the next without any interruption or slight pausing), it appears that DirectShow can play one video at a time with no problems at all, but on some systems (including mine) it can't handle playing two at once. To do a cross-fade transition, you need to have both graphs running during the overlap time, which my computer at least was never able to handle.
I would check out WPF and see if its controls can do this. I'm not sure they can but it's possible.