As the title says, I've created a BennuGD module which wraps around libvlc, so it's now possible to use basically any video format in BennuGD.
Windows download (much bigger, but contains everything you need).
Linux download (very small, but you need to have a recent version of VLC installed through your system's native package management software. Also, rename the .zip file to .tar.bz2).
The module will play videos with subtitles, if available.
Both contain a sample video player app. The hotkeys for the app are:
- Space bar: Pauses/unpauses the video.
- Right: Seek the video to the right.
- Left: Seek left.
- m: Mute/Unmute the video.
- up: Volume Up.
- down: Volume down.
- enter: Switch audio track.
- escape: Stop+quit.
And the list of functions this module includes is:
[code language="bennu"]
/* Plays a video file with the given width/height
* Will play the video with subtitles, if found */
int video_play(string filename, int width, int height);
/* Stop a currently playing video.*/
int video_stop();
/* Pause/unpause the currently playing video*/
int video_pause();
/* Check if the video is currently playing */
int video_is_playing();
/* Get total length of the currentyl playing video, in centisecs */
int video_get_length();
/* Get current seeking position in the video, in centiseconds */
int video_get_time();
/* Seek through the video, must be given a time
* in centiseconds (what the bennu timer
's use) */
int video_set_time(int time);
/* Get the width of the currently playing video */
int video_get_width();
/* Get the height of the currently playing video */
int video_get_height();
/* Get the muted/unmuted status */
int video_get_mute();
/* Mute/unmute the currently being played video */
int video_mute();
/* Get the volume of the currently playing video
* Will be 0<=volume<=200 */
int video_get_volume();
/* Set the volume of the currently playing video
* Must be 0<=volume<=200 */
int video_set_volume(int volume);
/* Get the number of available tracks in the video
* The first track (track number 0) is used for disabling audio */
int video_get_tracks();
/* Get the number of the currently being played track */
int video_get_track();
/* Set the audio track for a currently being played video */
int video_set_track(int track);
/* Get the description for an audio track.
* Not sure if it works correctly, must test it. */
string video_get_track_description();
[/code]
Hope you find it useful 