FoFiX v3.1xx development thread

Discussion particular to FoFiX, its development, and themes
Forum rules
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Re: FoFiX v3.1xx development thread

Postby evilynux » Tue Aug 18, 2009 5:45 pm

Mafiu wrote:The game looks great with the VideoBackGround, but my FPS drop like 20fps.

Well, without any reference point, your statement is quite irrelevant...
Most importantly, performance will highly depend on the video encoding, image resolution, audio encoding, audio quality and decoder implementation.

e.g. Expect a 320x240 Flash video with 96kbps mp3 sound to be much different (in terms of performance) to a 1600x900 WMV (ASF) with 256kbps mp3.
max26199
Member
Posts: 36
Joined: January 2nd, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby max26199 » Tue Aug 18, 2009 6:39 pm

hmm... the reason that the video-implementation doesnt work under windows has something to do with the python/opengl code

using python/gtk works (http://pastebin.ca/1534437)

the strange thing is, that even the audio doesn't start
even if i remove the fakeSink, and only parse the audio tags, i cannot get sound (videoSetup)

so, maybe the video doesnt start / but when gst.STATE_PLAYING is called, some error messages from ffmpeg are thrown (on some videos, but that is normal as it also happens with gst-launch)

the EndOfStream event istn called either (fakeSink-lastMessage nor bus-onMessage)

-----
i also wonder, why the bus/onMessage doesn't work
it is the same code as in the gtk-example above
Blue Heaven!
User avatar
death_au
Member
Posts: 3991
Joined: December 12th, 2007
Location: Australia
Reputation: 7
Contact:

Re: FoFiX v3.1xx development thread

Postby death_au » Tue Aug 18, 2009 6:49 pm

jfosheezy wrote:ok i have rev 1808 and i am good at computers so you arent talking to a noob
but i cant get the videos to work

Can't get the videos to work where?
In-game the videos have been written out while the issues are all worked out. You can only use the VideoPlayerTest for now, and you have to get gstreamer up and working properly first (which sounds like a pain for windows users).

Maybe tonight I'll have a go at getting this set up. I want to try and get it set up in such a way that I don't have to "install" anything in Windows. I want to be able to take my portable hard drive to another machine and still have it work. Wish me luck on that.
max26199
Member
Posts: 36
Joined: January 2nd, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby max26199 » Tue Aug 18, 2009 7:29 pm

I want to try and get it set up in such a way that I don't have to "install" anything in Windows. I want to be able to take my portable hard drive to another machine and still have it work.


Do you mean to copy the python interpreter to the ext. hdd and compile the code on the other machine?
if so, that should be no problem
you just need gtk and gstreamer on the ext. hdd and set the required environment variables with a batch-script like

set Path=%Path%;%~d0\gtk\bin;%~d0\gstreamer\bin
set GST_PLUGIN_PATH=%~d0\gstreamer\lib\gstreamer-0.10
space warrior
User avatar
akedrou
Member
Posts: 557
Joined: December 3rd, 2008
Location: Boulder
Reputation: 1
Contact:

Re: FoFiX v3.1xx development thread

Postby akedrou » Tue Aug 18, 2009 8:24 pm

r1809 fixes most things left to be fixed for now. Hooray!
FoFiX dev | Troublemaker | Malcontent
Blue Heaven!
User avatar
death_au
Member
Posts: 3991
Joined: December 12th, 2007
Location: Australia
Reputation: 7
Contact:

Re: FoFiX v3.1xx development thread

Postby death_au » Tue Aug 18, 2009 9:33 pm

max26199 wrote:Do you mean to copy the python interpreter to the ext. hdd and compile the code on the other machine?
if so, that should be no problem
you just need gtk and gstreamer on the ext. hdd and set the required environment variables with a batch-script like

set Path=%Path%;%~d0\gtk\bin;%~d0\gstreamer\bin
set GST_PLUGIN_PATH=%~d0\gstreamer\lib\gstreamer-0.10

I do a similar thing at the moment anyway with my current Python setup. The main problem I have so far is the MSVC runtimes that Python 2.6 require. I can't get that to run portably nicely. Most machines I use have them installed anyway, but it's an annoyance.
Actually, I just had a thought. If I put a directory with the dlls on the PATH variable as well... I'll have to try that later.
I haven't tried to hook in gstreamer yet though.
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Re: FoFiX v3.1xx development thread

Postby evilynux » Tue Aug 18, 2009 9:36 pm

@max26199: Gtk takes care of the gobject stuff properly... But with pygame and/or pyopengl it seems something clashes...
If you uncomment the bus stuff and add gobject.MainLoop().get_context().iteration(True) to the run method, does onMessage get called?
For me it does, but "our" python thread then freezes after ~5 seconds.

@akedrou: Very nice! Thanks alot!
Last edited by evilynux on Tue Aug 18, 2009 9:40 pm, edited 1 time in total.
User avatar
Mafiu
Member
Posts: 87
Joined: December 7th, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby Mafiu » Tue Aug 18, 2009 9:37 pm

evilynux wrote:
Mafiu wrote:The game looks great with the VideoBackGround, but my FPS drop like 20fps.

Well, without any reference point, your statement is quite irrelevant...
Most importantly, performance will highly depend on the video encoding, image resolution, audio encoding, audio quality and decoder implementation.

e.g. Expect a 320x240 Flash video with 96kbps mp3 sound to be much different (in terms of performance) to a 1600x900 WMV (ASF) with 256kbps mp3.


Without the video i have constant 60fps. When i use the 1800rev with the video support and using MP4 (768Kb video bibrate, 320x240, no sound) my fps drops to 40, others MP4 (1200kb video bibrate, 640x480, no sound) or others using others video formats (avi,wmv, etc) only have a blank background.
space warrior
User avatar
akedrou
Member
Posts: 557
Joined: December 3rd, 2008
Location: Boulder
Reputation: 1
Contact:

Re: FoFiX v3.1xx development thread

Postby akedrou » Tue Aug 18, 2009 10:51 pm

Mafiu wrote:Without the video i have constant 60fps. When i use the 1800rev with the video support and using MP4 (768Kb video bibrate, 320x240, no sound) my fps drops to 40, others MP4 (1200kb video bibrate, 640x480, no sound) or others using others video formats (avi,wmv, etc) only have a blank background.

If you are referring to the few revisions where you could access the video code from in game... It doesn't matter. The reason we removed it is because there remains a lot of work to be done before it can be properly implemented, so the fact it runs with a slower framerate is not surprising in the least. The rest of the people are referring (or should be referring) to the advanced testing done with VideoPlayerTest.
FoFiX dev | Troublemaker | Malcontent
User avatar
Mafiu
Member
Posts: 87
Joined: December 7th, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby Mafiu » Tue Aug 18, 2009 11:46 pm

The videoplayertest no work for me... :crying:

Thanks! and great job!, FOFIX is almost perfect :2thumbsup:
C++ code is tasty.
raphaelr
Member
Posts: 104
Joined: December 23rd, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby raphaelr » Wed Aug 19, 2009 3:18 am

I think we could improve the performance by disabling the audio in the video. Since we don't need it.
Image
Custom Song: Beatsteaks - As I Please (Only Guitar @ Amazing)
Before asking for help, try doing a barrel roll.
User avatar
lvl4573r
Member
Posts: 77
Joined: May 24th, 2008
Location: Somewere
Reputation: 0
Contact:

Re: FoFiX v3.1xx development thread

Postby lvl4573r » Wed Aug 19, 2009 4:34 am

Spoiler:

death_au wrote:
jfosheezy wrote:ok i have rev 1808 and i am good at computers so you arent talking to a noob
but i cant get the videos to work

Can't get the videos to work where?
In-game the videos have been written out while the issues are all worked out. You can only use the VideoPlayerTest for now, and you have to get gstreamer up and working properly first (which sounds like a pain for windows users).

Maybe tonight I'll have a go at getting this set up. I want to try and get it set up in such a way that I don't have to "install" anything in Windows. I want to be able to take my portable hard drive to another machine and still have it work. Wish me luck on that.



Good luck!


Also, please try making like a guide or something if you manage to get it working :smile:
evilynux
Member
Posts: 382
Joined: July 2nd, 2008
Location: Montréal, Canada
Reputation: 0
Contact:

Re: FoFiX v3.1xx development thread

Postby evilynux » Wed Aug 19, 2009 9:46 am

raphaelr wrote:I think we could improve the performance by disabling the audio in the video. Since we don't need it.

My code supports that already. That can be done by setting "mute = True" when instantiating VideoPlayer.
max26199
Member
Posts: 36
Joined: January 2nd, 2008
Reputation: 0

Re: FoFiX v3.1xx development thread

Postby max26199 » Wed Aug 19, 2009 10:54 am

evilynux wrote:For me it does, but "our" python thread then freezes after ~5 seconds.

yep... here too.

i also found the problem, why audio is not playing in the VideoPlayer, a "audioresample" is missing before autoaudiosink - video works now too :)

edit:
only testVideoPlayerLayer() works
with the other 2 tests, i only get a black screen (but audio playing)

Return to “FoFiX”

Who is online

Users browsing this forum: No registered users and 14 guests