Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Slowdown, fasten a Video with Playvideo?

Author
Message
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 26th Jan 2018 11:30
Hello AppGameKit fans,

You all know the limited commands for videoplayback

General
DeleteVideo
GetVideoDuration
GetVideoHeight
GetVideoPlaying
GetVideoPosition
GetVideoWidth
LoadVideo
PauseVideo
PlayVideo
PlayVideoToImage
SetVideoDimensions
SetVideoPosition
SetVideoVolume
StopVideo


... so I want to playback a video on Android, but faster or slower than Speed 1.0x, is there anychance to realise that?

My ideas:

Rendering the video in different playback speeds before. Would be cost much space. I had to calculate, where to jump in, and with SetVideoPosition ... maybe
I could render the video to Image, capture the image, but wouldn't show it, until maybe I have 24 Frames captured, I now could play them faster or slow them down. The problems here would be, that the Android Device had to be fast with Video-Decoding, and I need texture RAM. ~ 8 MB per picture, I think. ~ 240 MB in memory, if I had 30 Frames per sec.

I don't need the audio playback. Only video. So I don't have to think about that there. Because I could have Audio with Ogg an play it faster or slower. (Not with LoadMusicOgg, but with LoadSoundOgg.

So maybe we need something like: LoadImagesFromVideo or CreateMemBlockFromVideoFrames (from ..., to ...)

I don't want to rewrite the video-decompression and playback completly. Maybe it could be possible to use AddSpriteAnimationFrame( iSpriteIndex, iImageIndex )

SetSpriteSpeed( iSpriteIndex, fFps ) ... but it would be a very large Sprite-Sheet, I gues. And on a 4K by 4K texture at max, it would be complicated, to have FullHD video, not more than 8 Frames, with stretching at most. With 720p, maybe 16.


... OR? Do I have to render a lot of keyframes in my video and could use SetVideoPosition() and it will jump also some fractions of a second?

[The next chellange would be, to play the video reversed, backwards] (Maybe two videos, on forward, the other backwards, and jumping with SetVideoPosition() ...



Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 29th Jan 2018 16:47
Maybe I can slow down it with "Pause" and play further. But don't know, if that would be the best solution. Could also calculate the FPS and "pause" every ... so and so frames for about some frames ... hope, that would not stutter.

Login to post a reply

Server time is: 2024-04-26 23:27:12
Your offset time is: 2024-04-26 23:27:12