M MiniDemonic Member Licensed User Longtime User Jul 3, 2017 #1 I've looked at a couple of the videoview libraries, ExoPlayer for example, but I couldn't seem to find a way to seek forward or backward in single frame steps. I've searched but so far haven't found any thread about this.
I've looked at a couple of the videoview libraries, ExoPlayer for example, but I couldn't seem to find a way to seek forward or backward in single frame steps. I've searched but so far haven't found any thread about this.
Erel B4X founder Staff member Licensed User Longtime User Jul 4, 2017 #2 Use ExoPlayer and try to increase the Position property a few milliseconds each time with a timer. Upvote 0
moster67 Expert Licensed User Longtime User Jul 4, 2017 #3 The wrappers of VLC and Vitamio have a slow motion method. Maybe that can be useful.... Upvote 0
M MiniDemonic Member Licensed User Longtime User Jul 4, 2017 #4 I have looked at Vitamio and I could only find SetPlaybackSpeed but that's not what I'm after. I don't want to playback the video at a slower speed, I want to seek through the video frame by frame. So if I press one button it goes forward one frame, press the other button and it goes backwards one frame. It's kind of possible to do using position or a seekTo method but those only accept milliseconds so to go forward one frame in a 25FPS video I would need to add 40 milliseconds to the position. The problem is that not all videos are of the same framerate. Another problem with using milliseconds is that it doesn't support fractions of a millisecond and for example a video at 30 FPS has 33.3333(repeating) milliseconds per frame so if I advance the frames with 33 I will eventually skip a frame. Same is true for 24 FPS which has 41.6666666667 milliseconds per frame or 60 FPS which has 16.6666666667. I found a library with exact frame seeking, but I have no clue how to make a wrapper. https://github.com/protyposis/MediaPlayer-Extended for anyone interested. I will either have to remake my app in Android Studio and use that library or try to learn how to make wrapper, haven't decided on what to do yet. Upvote 0
I have looked at Vitamio and I could only find SetPlaybackSpeed but that's not what I'm after. I don't want to playback the video at a slower speed, I want to seek through the video frame by frame. So if I press one button it goes forward one frame, press the other button and it goes backwards one frame. It's kind of possible to do using position or a seekTo method but those only accept milliseconds so to go forward one frame in a 25FPS video I would need to add 40 milliseconds to the position. The problem is that not all videos are of the same framerate. Another problem with using milliseconds is that it doesn't support fractions of a millisecond and for example a video at 30 FPS has 33.3333(repeating) milliseconds per frame so if I advance the frames with 33 I will eventually skip a frame. Same is true for 24 FPS which has 41.6666666667 milliseconds per frame or 60 FPS which has 16.6666666667. I found a library with exact frame seeking, but I have no clue how to make a wrapper. https://github.com/protyposis/MediaPlayer-Extended for anyone interested. I will either have to remake my app in Android Studio and use that library or try to learn how to make wrapper, haven't decided on what to do yet.
moster67 Expert Licensed User Longtime User Jul 4, 2017 #5 Interesting. I am holiday now but when I am back in 10 days or so I can have a look at the github project you mentioned unless you have already resolved it by then. Upvote 0
Interesting. I am holiday now but when I am back in 10 days or so I can have a look at the github project you mentioned unless you have already resolved it by then.