Hi,
I would like to decompose a video filmed with a phone into several images which can be used afterwards.
I thought I could jump to some moments in the video (at regular time slots) with video:seek(), pause the video and capture the image each time.
So I’m trying to work with video:seek() but it seems like the video starts at the beginning each time instead of going to the requested time… Here is my code:
local video = native.newVideo( 960, 540, 1920, 1080 ) local function videoListener( event ) print( "Event phase: " .. event.phase ) if event.errorCode then native.showAlert( "Error!", event.errorMessage, { "OK" } ) end end video:load( myData.nameOfVideo, media.RemoteSource ) video:addEventListener( "video", videoListener ) -- jump to 5 seconds video:seek( 5 ) video:play()
So, my first question is: how can I jump to a specific moment of the video (in this case 5 seconds)?
And my second question is: would you know any other ways to achieve my initial goal (described above)?
