REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Video player

Open mplucinski opened this issue 6 years ago • 2 comments

Hi all,

I've been observing your project for a long time, but only recently had time for any significant contribution. I noticed that REGoth completely lacks video playing capability for in-game clips and decided to try to fill in the gap.

This patchset implements the basic video playing capability. The functionality is pretty straightforward: when an appropriate Daedalus function is triggered, the video player kicks in and play the clip.

Some more details:

  • To decode the videos (they use BINK format), I use ffmpeg. I added it to the libraries - it's configured to build the necessary parts only (bink decoders, demuxer and the file access layer) to minimize the compilation time and the size of the binary. Only Linux is supported as of now.

  • Only video is played. There's no audio support ATM. I don't really know how to integrate it with the existing audio system - any advice?

  • Keyboard control is limited to the cancelling the sequence with the ESC key. The original game had (if my memory serves me correctly) an extended video control option in the config file - does it make sense to implement this?

  • Tested with intro and credit videos from G1&2. (In G2, the main intro doesn't show up during the new game loading, but later DNDR-Intro does - I don't remember if the original game did it as well).

I'm looking forward for feedback, especially regarding the architectural decisions and aforementioned matter of the integration with the existing audio system.

BR, Mariusz

mplucinski avatar Jun 02 '18 19:06 mplucinski

Heh, I started some work on that myself (see video-playback-branch: https://github.com/REGoth-project/REGoth/tree/video-playback), but only quickly hacked some stuff together to make it work.

I implemented an UI-view for videos, but the video completely blocked the game while it played, from withing the UI-view. (not so nice). Also, no sound, wrong framerate.

It seems that there are no very simple small ffmpeg based video-player libraries out there, so I made my own one (based on some sample code I found): https://github.com/REGoth-project/FfmpegVideoPlayer

So, maybe some of my stuff is helpful for you. I'm actually glad someone else is working on this, ffmpeg is not for me as it seems! 😄

ataulien avatar Jun 02 '18 19:06 ataulien

@mplucinski Hey man, I've tried to test your video player- unfortunately, I couldn't do it. It's not possible to start videos with the AppVeyor artifact.

tomedi avatar Jul 08 '18 09:07 tomedi