Video Addon
Bingocat

I'm trying to load and play a video using the video addon but am having problems. It seems that al_open_video is not opening the video for whatever reason. I've tried a few different file types, but none will work. Maybe I'm just missing something with the addon.

#SelectExpand
1al_init(); 2al_init_primitives_addon(); 3if (!al_init_video_addon()) { 4 cout << "Could not initialize the video addon.\n" << endl; 5} 6al_init_font_addon(); 7al_init_ttf_addon(); 8al_init_acodec_addon(); 9al_install_mouse(); 10al_install_keyboard(); 11al_install_audio(); 12al_reserve_samples(1); 13 14ALLEGRO_DISPLAY *display = al_create_display(W_SCREEN, H_SCREEN); 15ALLEGRO_EVENT_QUEUE *event_queue = al_create_event_queue(); 16ALLEGRO_TIMER *timer = al_create_timer(1.0 / 60.0); 17ALLEGRO_VIDEO *video = al_open_video("C:/video.wmv"); 18ALLEGRO_FONT *font = al_load_font("arial.ttf", 18, NULL); 19 20if (!video) 21 cout << "ERROR WITH VIDEO" << endl;

Edgar Reynaldo

Only ogg theora is supported

Bingocat

Oh that explains it. Thanks!

Edgar Reynaldo

There was a ffmpeg backend too, but it was too messed up to keep in its current shape. It would sure be nice to support any format ffmpeg supports, but I just don't have time myself to make it happen.

Luckily though, you can still use ffmpeg to convert all your video files to .ogv, and still play them in allegro. Kind of cheating, but so what.

nshade

That's what I did. I had a MIDI file that I wanted to put into my game. I just rendered it as a wav file and converted it to ogg. The player is none the wiser.

Thread #617279. Printed from Allegro.cc