What I need, is to be able to edit AVCam so that I can store, access or view somehow the timestamps of each frame in a short video captured. After some research, I think it can be done but unsure how. I have seen in Xcode 'CMSampleBuffergetoutputsampletiminginfoarray' which sounds like it might help. Or perhaps by using, getpresentationtimestamp etc.
I don't know exactly which timestamp I need (PTS or DTS), I am going to film a fast moving object and would like the exact time elapsed between each frame.
Please help!
Related
Ok I need to open the camera, take a picture and save this in UITableView, also need to be saved the GPS info like date, place and how much km you are from the place that you take the image.
The image need to be saved in UITableView with the GPS info and every time that you take a new pic the process start again and is saving one after one in the same UITableView.
Many thanks.
First, welcome to stackoverflow.
Second, this isn't really a question, so I am going to "answer" this the best way possible. It seems like you are trying to just learn how to make an iPhone application, and this is your first stab at it.
I HIGHLY recommend checking out the stackoverflow FAQ first.
Next, check out Apple's Sample Apps and developer library for some help in getting started:
Sample Code
Getting Started
Photo Picker
Photos by Location
Lastly, as you are working through your code, if you stumble onto a problem, please return and as a more specific question.
Thanks,
Dan
The most important GPS info for photos are:
- time
- latitude
- longitude
Slightly advanced GPS info, still important for photos:
heading (v1)(or course) the direction in which you are going, driving; unfortunately when making a photo you have been stand still for some time, so there not always is a valid heading/course available.
heading (v2) the direction which the camera is looking while taking that photo: if GPS is not suitable, you also can use the compass orientation.
That 3 or 4 attributes, is usually stored into jpgs using an EXIF headers. If for some reason you cannot, or don't want to store that info into the picture then you have to store that values in an own file. A simple CSV file is sufficient.
I am referring this application and want to learn that how can we create like this?
Actually there is the major R&D task for me and I don't even know what to search in this topic.
I don't know , from where to start googling.
According to my understandings, the concepts is, It is getting all frames from video as Image and edit it like draw line on it and then save it, so once video is played it also contains that editing.
I had referred this iFrameExtractor but can't got success.
Please advise me how to start doing R&D on this topic..
Thanks in advance.
Ok i have a answer for your question, First of all u have to get all video from your iPhone. That can be done using ALAssetLibrary after that u have to how thee videos in UITableView. I think that should be easy for u. After selecting a video from a table view u have to play that selected video using MPMoviePlayerController or AVPlayer. After that u have to draw anything.There are number of methods of drawing anything on Videos which are:-
UIBezierPathCurve, UIGraphicsBeginImageContext, Open GLes etc etc
Thats it.try googling on it. thanks :)
Can any one help me to seek at particular time in AVQueuePlayer?
I have use this controller to play video in iPhone because i need to play two video at the same time.
But my problem is to navigate in video and jump to at particular time, I am not able to do that.
I Know the method the That is [controller seekToTime:(CMTime)] But it is not moving the video at exact position of the video.
Does any one know the solution?
This is stated in the documentation for seekToTime::
The time seeked to may differ from the specified time for efficiency. For sample accurate seeking see seekToTime:toleranceBefore:toleranceAfter:.
So try using seekToTime:toleranceBefore:toleranceAfter: instead, specifying a low or zero tolerance. You may also want to specify true for AVURLAssetPreferPreciseDurationAndTimingKey when creating any AVURLAssets you may be using.
Update... I ended up doing hackery and not being especially pleased with the results--the snap-through-black between movies may or may not show, and because I was bad and didn't inquire as to the load status etc it's possible to get many things confused.
But for straight looping an AVQueuePlayer assetItem it works to set a boundaryTime observer and use that to rewind the assetItem. My stuff is only a few seconds long so the seekToTime is pretty seamless, I don't know what it'll do seeking on a longer asset. looping an assetItem in AVQueuePlayer
I have to figure out the best way to transition from one video to the next
BASIC IDEA: An example would be that there is a video of a person walking.....the user taps the video and a seamless transition occurs to a video of a person running (over simplified example)
My first thought was to create 2 movie players and use transitions between the 2 view elements. But movie-player doesn't support that.
stopping the current video, loading new content, and then starting it is a solution but not very elegant. We are making a interactive sales tool for our reps and we want this to look as professional as possible.
CURRENT THOUGHT: If there was some sample code for AVPlayer, it would seem I could use AVVideoComposition to switch between videos? But details on how that might happen don't seem to be currently available.
POSSIBLE CLUE: I figured this would be easy as I bought an app called Live Cams HD that shows 16 different video feeds at once.
Any ideas? Thanks in advance!
Steve, the short answer is that you are not going to be able to get the kind of results you want using AVPlayer. The h.264 video logic included in iOS is really great at playing video and video/audio together, but it really sucks at starting/stopping and switching from one clip to another. The reason is that there is a lot of buffering that needs to happen to load up and start playing a h.264 video in hardware. Basically, you need to roll your own code that sets UIImage/CGImageRef for your views in a way that makes it easy to switch from one clip to another by simply switching from one array of UIImage objects to another. Of course, that is easy to say yet not so easy to implement.
What I would suggest is that you evaluate existing code that already implements this logic instead of rolling your own. For example, have a look at this StreetFighter demo app. It shows how a very simple game like iPhone UI can be constructed using a series of clips that show a character doing a kick, a punch, or throwing a fireball. The results looks like this:
I also wrote up a blog post about seamless-video-looping-on-ios. You can of course roll your own code to do all this, but I would suggest reading more about my library at the linked website as it will save you a lot of time.
After the first video has played every frame except the last one, you quickly swap to a view with an image of the last frame (basically the last frame) and then you transition into a view with the an image of the first frame of the next video and start up that one.
Or you could create a animation with all your frames (programming your videos), that will make it customizable, but the quality will probably not be as good and the cpu usage can spike, so you will have to make a call on that one.
I want to do something as follows.
When user is capturing the video from his iPhone 3G, 3GS and iphone4, he should be able to show some data on the screen which will be captured on the video it self, so when we will see the video again, he will be able to see the video along with data on screen.
Like for example we can say I want to display the speed of the vehicle when video was being captured. So when user will see this video after words, he should be able to see the speed on the video it self.
Is this possible in iPhone??? or any body having other ideas for this.
Thanks in advance...
Regards,
VIshaL
It sounds like you want to create some sort of dynamic video overlay.
This is your single best bet towards what you are asking, but I am unsure if it will lead you to the result you need as it may be too dynamic in nature.
http://blog.blackwhale.at/2009/10/custom-video-overlay-view-on-the-iphone/
I hope this helps.