Game Development Community

Play Theora

by Aditya Kulkarni · in Torque Game Builder · 08/04/2010 (1:20 pm) · 10 replies

I am using guiTheoraCtrl, but the file doesn't play.

Steps I followed:
->Created a single avi using flash cs4.
->Converted to ogg using vlc (ffmpeg converts to ogv)
-> Tried to play, no luck.

#1
08/04/2010 (1:57 pm)
It would help if you posted the code and error messages.
#2
08/04/2010 (2:09 pm)
Kevin, I would but there's no code and no error messages.

I just popped in the control inside a gui, and browse for the ogg file in the gui editor.

When the game executes, canvas.pushDialog("guiName") is called. It doesn't even play it when I browse and select the file inside the editor.
#3
08/04/2010 (2:15 pm)
I avoid the gui editor like the plague, sorry.
#4
08/04/2010 (2:18 pm)
like the plague? haha...
#5
08/04/2010 (5:12 pm)
Did you remember to call:
MyVideo.setFile("game/data/video/FileName.ogg");
This assumes you created your theora control like so in a gui file:
new GuiTheoraCtrl(MyVideo) {
      profile = "GuiDefaultProfile";
      horizSizing = "relative";
      vertSizing = "relative";
      position = "0 0";
      extent = "1024 768";
      minExtent = "8 2";
      visible = "1";
      done = "0";
      stopOnSleep = "1";
      backgroundColor = "0 0 0 255";
   };
#6
08/05/2010 (5:52 am)
well if theoraFile is defined in the gui, setfile is not needed...but i also tried it your way @patrick, i.e. removed theoraFile path from the gui profile and used setFile...still doesn't play...

think the codec is at fault...it's theora+vorbis right? oh also can i know, what software do you use for creating the avi?

new GuiTheoraCtrl(videoScreen) {
         canSaveDynamicFields = "0";
         isContainer = "0";
         Profile = "GuiDefaultProfile";
         HorizSizing = "relative";
         VertSizing = "relative";
         Position = "0 0";
         Extent = "800 600";
         MinExtent = "8 2";
         canSave = "1";
         Visible = "1";
         hovertime = "1000";
         theoraFile = "~/data/images/Splash/video.ogg";
         done = "1";
         stopOnSleep = "0";
         backgroundColor = "0 0 0 255";
      };
#7
08/05/2010 (7:51 am)
ok got it working, found this: http://tdn.garagegames.com/wiki/Image:TheoraGoodies.zip

using the old version of ffmpeg solved the problem...funny
#8
08/05/2010 (1:48 pm)
Ya, odd. ffmpeg crashes for me during conversion. I use VLC player to convert.
#9
08/05/2010 (2:10 pm)
yup it crashes for me too, but the generated file works great...
#10
08/05/2010 (2:17 pm)
the zip is backed up here:
torque.abigholeintheweb.com/public_system/useruploads/TheoraGoodies.zip

(..in case TDN is zapped at some point)