bakjos / FFMPEGMedia

Unreal FFMPEG Plugin to support more video formats and alpha videos
210 stars 55 forks source link

Frame by frame seek #19

Open vectorcharlie opened 3 years ago

vectorcharlie commented 3 years ago

Hi Santiago!

I am trying to do a video player inside ue4 4.25.3

All is working perfectly, but having an issue when doing a seek, it continues playing even if the playback is paused.

I noticed you have inside FFFMPEGMediaTracks::ReadThread() a call to StepToNextFrame() if the state is paused.

Then in StepToNextFrame() you set the SetRate to 1.0 which starts playback again. I tried to remove it or set it at 0.0 so it just seeks and shows the frame but it does not "refresh" or updates.

What would be the call to refresh? or how I would be able to seek and just stay in the seek position without playback.

Thanks so much!!!

Charlie

bakjos commented 3 years ago

Hi @vectorcharlie thanks for posting this issue, this is one of the areas the plugin needs to be improved. When I built this library it wasn't designed to seek through the file, one of the things that could works is pause and then resume the player after the seek.

vectorcharlie commented 3 years ago

Thanks @bakjos ! I have been tinkering with the code looking for a ways to make this work. I have a pair of questions:

-Is SetRate(0.0f)/SetRate(1.0f) the best way to pause/resume? -Do you have already any function to play only a specific range/time?

Thanks again!

CI