What steps will reproduce the problem? 1. Simple use frameGrabber.getLengthInFrames() 2. Observer total number of frames above method retuns? 3. Observer total number of video and image frames processed?
What is the expected output? What do you see instead? It should return total of audio+video frames OR is there any method to find out the total number of audio frames and video frames?
What version of the product are you using? On what operating system? Java CV 0.11, Using Android Operating system.
Please provide any additional information below. I want to process the video from end. So first of all fetch total number of frames using getLengthInFrames():
index = getLengthInFrames(); frameGrabber.setFrameNumber(index)
and fetch the frames from end to 0th index because i want to process the video from end to start.
But when I loop untill grabbedFrame != null then I notice that it prints as below:
Total No Of Frames (getLengthInFrames()) = 2968 Total No Of Audio Frames = 1856 Total No Of Video Frames = 2967
So if i use index to check that video processing is completed then audio is missing in new processed video. And If i do not use index then how can i know that which number i have to use in setFrameNumber to perform seek operation?
Is there any other way or best way to do this? Please help me.
Please let me know if further information is required.
Comment #1
Posted on Jun 11, 2015 by Happy KangarooSince what you care about isn't the number of frames, just use setTimestamp() with getLenghtInTime(). This is much better supported by FFmpeg.
And please post any other questions you may have on either the mailing list or GitHub. Google Code will soon disappear.
Comment #2
Posted on Jun 11, 2015 by Grumpy OxHi Samuel,
Thank you for quick reply, it helps me a lot because i stuck.
I can get the total length in time using getLenghtInTime() method. This will seek to end of the file. After that i use grabFrame() and it will give me the frame from end. But i am stuck after that. How can i go to one frame previous and again from that one frame previous and till first frame of the video file.
grabFrame() automatically go to next frame. i.e. each time you call grabFrame() it grabs next frame. But how can i go reverse?
Please help me.
Comment #3
Posted on Jun 12, 2015 by Grumpy Ox@Samuel. Can u please help me.
Status: Done
Labels:
Type-Other
Priority-Medium