Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: -Squall- on Sun 31/10/2010 13:25:32

Title: Can't play .Ogv videos
Post by: -Squall- on Sun 31/10/2010 13:25:32
Hi!

I have a problem with playing .ogv format videos. I placed them into game main folder (video01.ogv, etc), but when I run the game, videos result in a black screen (though I hear the videos music). I used PlayVideo command.
I've tried to install the new AGS version (3.2), and I changed the resolution of the videos, but still had the same problem.
I changed drive codec to direct 3D 9 too. My game's resolution is 800x600 with 32 bits.
(In .AVI they work fine, but other people can't play them, that's because i'm trying to use ogv format and build them into the EXE)

Any suggests?
Thank you very much!
Title: Re: Can't play .Ogv videos
Post by: mode7 on Sun 31/10/2010 14:47:16
does it work in direct draw 5?
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Sun 31/10/2010 16:01:18
Quote from: mode7 on Sun 31/10/2010 14:47:16
does it work in direct draw 5?

No :( The same black screen in both drivers.
Title: Re: Can't play .Ogv videos
Post by: mode7 on Sun 31/10/2010 18:43:17
which encoder did you use? can you playback the ogv in another media player?
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Mon 01/11/2010 01:08:52
Quote from: mode7 on Sun 31/10/2010 18:43:17
which encoder did you use? can you playback the ogv in another media player?
I used Theora Converter, and they work fine with VLC player.
Title: Re: Can't play .Ogv videos
Post by: arj0n on Mon 01/11/2010 09:44:31
known problem...
They don't play normal using winsetup->D3D9?
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Mon 01/11/2010 18:16:38
Quote from: Arj0n on Mon 01/11/2010 09:44:31
known problem...
They don't play bormal using winsetup->D3D9?
No, I can hear the music but I only see the black screen :(
Title: Re: Can't play .Ogv videos
Post by: arj0n on Mon 01/11/2010 22:24:39
This might work:

1. make video in AfterEffects
2. save in MOV format, with the Sorenson compression set to the highest quality...
3. use the program GF (ffmpeg2theroa) 2007.2 to convert that MOV file to "ogg"...

Converter: ffmpeg2theora-0.27 (http://v2v.cc/~j/ffmpeg2theora/download.html)
Frontend: GFrontend (ffmpeg2theora) v2007.2 Final (http://download.freewarefiles.com/files/GF_ffmpeg2theora_final.exe)

4. rename "ogg" file manually to "ogv".

[Step 1 can of course be done with other programs and step 2 can be saved in another format]

;)
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Mon 01/11/2010 23:33:39
Quote from: Arj0n on Mon 01/11/2010 22:24:39
This might work:

1. make video in AfterEffects
2. save in MOV format, with the Sorenson compression set to the highest quality...
3. use the program GF (ffmpeg2theroa) 2007.2 to convert that MOV file to "ogg"...

Converter: ffmpeg2theora-0.27 (http://v2v.cc/~j/ffmpeg2theora/download.html)
Frontend: GFrontend (ffmpeg2theora) v2007.2 Final (http://download.freewarefiles.com/files/GF_ffmpeg2theora_final.exe)

4. rename "ogg" file manually to "ogv".

[Step 1 can of course be done with other programs and step 2 can be saved in another format]

;)

Thank you very much, but it doesn't work... the same black screen. Should I try other resolutions? I can upload a video if needed ...
Title: Re: Can't play .Ogv videos
Post by: arj0n on Mon 01/11/2010 23:51:13
Can you upload it so I can place it in ags and compile to see if it works on my pc?
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Tue 02/11/2010 01:20:44
Quote from: Arj0n on Mon 01/11/2010 23:51:13
Can you upload it so I can place it in ags and compile to see if it works on my pc?
Here is: http://www.megaupload.com/?d=U2HG6SNH

And this is my code:

function room_Load()
{
PlayVideo("video01.ogv",3, 11);
FadeIn(1);
gMenu.Visible = true;
}

Thank you!
Title: Re: Can't play .Ogv videos
Post by: arj0n on Tue 02/11/2010 11:49:13
Using your part of code and OGV file it does show the OGV video properly at my pc... :)
Title: Re: Can't play .Ogv videos
Post by: Wyz on Tue 02/11/2010 13:34:16
Hmmmm, try this:


function room_Load()
{
FadeIn(1);
PlayVideo("video01.ogv",3, 11);
gMenu.Visible = true;
}
Title: Re: Can't play .Ogv videos
Post by: -Squall- on Tue 02/11/2010 14:11:23
I tried to change "room_Load" for "room_FirstLoad" and it worked!

Thank uou very much!  ;)
Title: Re: Can't play .Ogv videos
Post by: arj0n on Tue 02/11/2010 15:08:32
Room_Load & Room_FirstLoad both work at my pc.
Anyway, goodluck!
Title: Re: Can't play .Ogv videos
Post by: Wyz on Tue 02/11/2010 15:47:20
I think I know what happened there:
First you do a fade out then you start the video, after the video is done you do a fade in. The problem is, also the video is affect by the fade out, so you'll have a black screen. I once had the same problem and it took me ages to find a way around it but I came up with this solution:


FadeOut(1);
FadeIn(10000);
PlayVideo("video01.ogv",eVideoSkipNotAllowed,11);
FadeOut(10000);
FadeIn(1);
Title: Re: Can't play .Ogv videos
Post by: Khris on Tue 02/11/2010 16:06:03
Arj0n, are you positive you saw the video even when it was played in "player enters screen before fadein" (room_Load)?

Anyways, the way to do this would be to use a featureless black room or set the screen transition to instant, then play the video in the "after fadein" event.
Title: Re: Can't play .Ogv videos
Post by: arj0n on Tue 02/11/2010 19:09:11
Khris: sorry, it was After Fade-In, my bad...