Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Allegro Video Addon Resolution Cap?

This thread is locked; no one can reply to it. rss feed Print
Allegro Video Addon Resolution Cap?
echogames
Member #16,324
May 2016

Hello,

When programming my game, I have a splash that shows up on startup. I've converted the 1080p 60fps avi file into an ogv file using ffmpeg2theora. When viewing the result, it is obvious it is in 1080p and 60 fps.

Below is the relevant code for the video.

#SelectExpand
1ALLEGRO_VIDEO *splash = al_open_video("assets/splash.ogv"); 2ALLEGRO_BITMAP *splashframe; 3 4//begin 60 iterations per second ALLEGRO_TIMER 5 6if (al_get_video_position(splash, ALLEGRO_VIDEO_POSITION_ACTUAL) > 11.75) al_close_video(splash); 7 8splashframe = al_get_video_frame(splash); 9if (splashFrame != NULL) al_draw_scaled_bitmap(splashFrame, 0, 0, al_get_bitmap_width(splashFrame), al_get_bitmap_height(splashFrame), 0,0, 1920 * multiplyer, 1080 * multiplyer, 0);

The problem is when I use a 1080p 60 fps video. It plays as if a 30fps video is put in, where it plays twice as fast with glitches. If I input a 720p 60fps video, it works just fine. Does ALLEGRO_VIDEO cap at 1080p 30fps? I'm just confused as to why the 720 version works while the 1080p version does not.

Thanks!

SiegeLord
Member #7,827
October 2006
avatar

Do you by any chance have the video available somewhere? Allegro has no caps but perhaps there's some weird interaction between the file and the code. I tried with a 60FPS, 1080p file on my machine and it seemed to work ok (I've attached a copy for you to try, it's just a short video from some video game I nicked from the internet).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

echogames
Member #16,324
May 2016

I tried to attach the video to this reply. Let's see how that goes.

EDIT: I also tried the code with your video as well. It also seemed to play at twice the speed.

SiegeLord
Member #7,827
October 2006
avatar

Hmm, maybe it's your code that's at fault. Could you try compiling the ex_video example from Allegro's source code: https://github.com/liballeg/allegro5/blob/master/examples/ex_video.c ?

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

echogames
Member #16,324
May 2016

I'll look through it some more. Worst case scenario: the game starts with a 720p splash. It's not too big of an issue.

Thanks for the help.

Go to: