• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

VideoView, pausing, and re-showing previous frames

 
Jim Harrison
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using VideoView and my own play/pause/first-frame/last-frame/step-back/step-forward.

The step forward starts a Thread and monitors when the customVideoView.getCurrentPosition() has changed. When its value is different I call customVideoView.pause(). This gives the illusion of going frame-by-frame. I keep an ArrayList of ints based on the currentPosition values for the "frame" the user sees.

I'm having problems with the step-back: basically go to the previous frame. The video is in the pause state and i get the previous currentPosition from the ArrayList and call (in the UI thread) customVideoView.seekto(previousCurrentPosition). However the customVideoView does not show this frame. If i continuously press the step-back button I get the appropriate int currentPosition from the ArrayList; however, the view never updates.

I even have the event OnSeekCompleteListener registered for the mediaPlayer: but not sure what to do in that method (if anything) I've tried start()/pause() but it doesn't update the view to that frame.

I'm not sure if the audio is messing up showing the previous frame. When it comes to audio I don't need to play audio. In fact I don't need any audio when the video is being recorded. I'm only interested in the frame-by-frame sequence. My videos are up to 5-seconds long. I have code that goes through the video finding the next frame and saving that as either .jpg of .png. Doing this takes about 2 minutes to process (on a Nexus 10) a 5 second video.

I'm not sure how to programmatically turn off (don't process) audio during the video capture or even turn it off (don't capture) during video capture.

Any input would be great.

Thank you
Jim
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic