GUITheoraCtrl Video Player Issue
by Faraz Ahmed · in Torque Game Engine · 02/24/2006 (12:51 am) · 8 replies
Hello, when I try to load and play a video in TGE using the GUITheoraCtrl, I see a white flash in the viewing area before the video starts playing. Makes the video startup look quite amateur. I tried this with two completely different videos encoded into .ogg.
Does anyone else see this when video playback is launched? P.S. its not the background attribute in the code below thats causing this.
Does anyone else see this when video playback is launched? P.S. its not the background attribute in the code below thats causing this.
new GuiControl(IntroVideo) {
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "center";
position = "0 0";
Extent = "720 480";
MinExtent = "8 2";
Visible = "1";
new GuiTheoraCtrl(MyVideo) {
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "center";
position = "0 0";
Extent = "720 480";
MinExtent = "8 2";
Visible = "1";
theoraFile = "./introvideo.ogg";
done = "1";
stopOnSleep = "0";
backgroundColor = "0 0 0 0";
};
};
#2
I don't know about anyone else, but I'm not experiencing this effect on my videos. Just one question -- are you using Torque 1.4 or 1.3 with theora modifications?
Aaron E.
02/24/2006 (4:45 am)
Hello,I don't know about anyone else, but I'm not experiencing this effect on my videos. Just one question -- are you using Torque 1.4 or 1.3 with theora modifications?
Aaron E.
#3
02/24/2006 (9:08 am)
Im using 1.4 out of the box.
#4
Do you get the problem when using the Theora videos that came with the engine? Or is it only showing up on your own encoded files? Are you using the pre-compiled torque executable that came with 1.4, or are you using your own compiled version?
Also, what program are you using to encode your vids?
If you want, you can send an example video file to me and I can try it out to see if I notice the same problem.
02/24/2006 (10:00 am)
Ok. Hmm. A few more questions . . .Do you get the problem when using the Theora videos that came with the engine? Or is it only showing up on your own encoded files? Are you using the pre-compiled torque executable that came with 1.4, or are you using your own compiled version?
Also, what program are you using to encode your vids?
If you want, you can send an example video file to me and I can try it out to see if I notice the same problem.
#5
02/24/2006 (10:03 am)
One more thing, what happens if you play the video in a non-torque theora player? Do you still get the effect?
#6
- I don't think there were any videos that came along with the engine (doing a search for *.ogg returns only sound files).
- I have recompiled the source and am using the torque lighting kit version of the 1.4 source (my bad should have mentioned)
- I'm using version 0.16 of the command line encoder from this site http://www.v2v.cc/~j/ffmpeg2theora
- The video plays fine (no white flash) in windows media player, so its a torque related issue surely
- Not a problem sending you the file, i can be emailed at arcifus*at*gmail*dot*com. If you do test it you should perhaps try using the code pasted above to replicate my setup. Note that I have modified GuiDefaultProfile to include button hover and click sounds....
Cheers
02/24/2006 (9:05 pm)
Hey Aaron,- I don't think there were any videos that came along with the engine (doing a search for *.ogg returns only sound files).
- I have recompiled the source and am using the torque lighting kit version of the 1.4 source (my bad should have mentioned)
- I'm using version 0.16 of the command line encoder from this site http://www.v2v.cc/~j/ffmpeg2theora
- The video plays fine (no white flash) in windows media player, so its a torque related issue surely
- Not a problem sending you the file, i can be emailed at arcifus*at*gmail*dot*com. If you do test it you should perhaps try using the code pasted above to replicate my setup. Note that I have modified GuiDefaultProfile to include button hover and click sounds....
Cheers
#7
I'd suggest dumping the frames in the OGG to make 100% sure there is no initial white frame. ;)
02/25/2006 (2:51 pm)
There are several example videos that come with the 1.4 demo and SDK - look in example\demo\data\video.I'd suggest dumping the frames in the OGG to make 100% sure there is no initial white frame. ;)
#8
I have so far tried it on two different machines, one with an accelerator video card (nvidia geforce fx5200 @ 1024x768) and one with an on board generic intel graphics card (Intel(R) 82915G Express Chipset Family @ 1280x1024). Both spat out the white flash before playing the video. Both are fast P IV cpu's.
I also repeated the test with the virgin non-tlk precompiled torqueDemo.exe with the same results.
Another variable to look at was the way my torque script initialization routines were sequenced. So I created a simple new theora control within the virgin starter.fps and still got the same results.
The only thing I havent done is to dump out the OGG frames to be 101% sure of the content but I did try two entirely different sources of videos (one of which I've authored myself) that run fine on windows media player.
I'm starting to think that this is a genuine issue with the GUITheoraCtrl object.
Since its always a tiny flash during initialization, the work around seems to be an acceptable bandage for now.
02/25/2006 (10:45 pm)
Ah yes.. the TLK sdk release does not come with the demo videos. I unpacked the original 1.4 and ran the demo video called areTorquePopular.ogg (funny) and experienced the same white flash.I have so far tried it on two different machines, one with an accelerator video card (nvidia geforce fx5200 @ 1024x768) and one with an on board generic intel graphics card (Intel(R) 82915G Express Chipset Family @ 1280x1024). Both spat out the white flash before playing the video. Both are fast P IV cpu's.
I also repeated the test with the virgin non-tlk precompiled torqueDemo.exe with the same results.
Another variable to look at was the way my torque script initialization routines were sequenced. So I created a simple new theora control within the virgin starter.fps and still got the same results.
The only thing I havent done is to dump out the OGG frames to be 101% sure of the content but I did try two entirely different sources of videos (one of which I've authored myself) that run fine on windows media player.
I'm starting to think that this is a genuine issue with the GUITheoraCtrl object.
Since its always a tiny flash during initialization, the work around seems to be an acceptable bandage for now.
Torque 3D Owner Faraz Ahmed
Default Studio Name
A work around right now is to set the Visible attribute for the MyVideo object above to 0 and then schedule a MyVideo.setVisible(1) after 300 ms of the launch. The 300ms covers the duration of the white flash (hopefully on most hardware).
Cheers.