EasyAVbin - Video Playback

BlitzMax Forums/BlitzMax Programming/EasyAVbin - Video Playback

Hezkore(Posted 2015) [#1]
I've started work on a module that simplifies video playback using Brucey's AVbin module and any help is greatly appreciated!
It's open source and available for download over at https://bitbucket.org/Hezkore/teasyavbin

The idea is to simply load a video file and draw it like an image.
If you build using threads it will use its own thread to decode the video and audio.

Here's a simple example of how it works:
Local MyVideo:TEasyAVbin = LoadVideo("video.avi")
While Not KeyDown(KEY_ESCAPE)
    MyVideo.Update
    MyVideo.Draw(0, 0) 
    Flip
Wend

At the moment using VSync causes some stuttering, especially without threads and that's one thing I'd like some help with.


Pingus(Posted 2015) [#2]
Works fine without vsynch, also some stuttering with vsynch on. But it works fine too if vsync=-1.
I don't know what Brucey's module does, nor yours, but all in all I would say that it's extremly nice to have a video play possibility. Thanks for that module !


xlsior(Posted 2015) [#3]
I don't know what Brucey's module does, nor yours, but all in all I would say that it's extremly nice to have a video play possibility. Thanks for that module !


IIRC The avbin one taps into the windows media player playuback system, and will play any video type for which windows has a CODEC installed. Makes it very flexible, but the downside is that you are dependend on whatever codec the user does or doesn't have on their system.

There's already a few other modules that can deal with video without those outside dependencies, but are limited to specific encoding formats (and therefors probably more suitable for playing video as part of a game, since you can control the video format in that situation:

pantsonhead wrote an Ogg Vorbis and an MPEG-2 video playback module (video only), and Brucey created an Ogg Vorbis module that can play video + synched sound