Ways to play videos via python

Post your own tutorials, guides and demos.

Post » Tue May 17, 2011 4:05 pm

Hi!
As my first post in this forum, a little word : construct is awesome, long live consctruct. I'm an old user of mmf2... since I switch to construct I can't go back, it's physiologically impossible :D

Well, back to business : I'd like to ask if someone can provide a little handy .zip with the file I need to provide if I want to distribute... Let say that player I did to see where I can go with Rojo's way =)

ConstructPlayer.zip

I had to use the second way (the Media Player embedded I didn't manage to make the first one work, it was always a blank window), so I guess I have to provide all the ctypes libraries with its dependancies and all or part of the win32com stuff with dependancies too...
I read the little py2exe quickguide by scidave but it seems a little blurry to me and as I'm nearing dangerously my deadline It would be great to have a little help with that thing =)

little teaser of my game demo (for motivation purpose :D ):
http://www.cohl.fr/annuaire/images/0000000894_002.jpg

(damn it's already a bit old...)
Last edited by Yann on Sun Sep 14, 2014 11:44 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Tue May 17, 2011 6:33 pm

Here is all the needed files:
http://dl.dropbox.com/u/5426011/examples5/py2.zip
Extract this file to the same folder as your game.

Then add this line before you import ctypes and win32com.
[code:mnr27tuh]sys.path=[System.AppPath + 'py2'][/code:mnr27tuh]
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Wed May 18, 2011 1:00 am

Thank you rojo =)
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed May 18, 2011 2:39 am

There seems to be a strange behavior when I try my player on another computer.

All works fine on my eeepc which runs on windows XP (32bit)
But when I run it on my home computer which runs on windows 7 (64bit) I get the following error :
[code:2wt0jfy5]Traceback (most recent call last):
File "<string>", line 4, in <module>
File "C:\Documents and Settings\Big S\Local Settings\Temp\ConstructPlayer\py2\win32com\__init__.py", line5, in <module>
ImportError: DLL load failed: The specified module could not be found[/code:2wt0jfy5]
I was a bit surprised as I don't know any "Big S" =)
Then I tried to bring my own __init__.pyc (from my eeepc... I didn't install python on my home computer) ... there was the same kind of error but with my eeepc path.
I infered that the path is compiled in the .pyc, I then tried with the corresponding .py
Then I get what it seems to be a dependancy error :
[code:2wt0jfy5]Traceback (most recent call last):
File "<string>", line 4, in <module>
File "[PATH TO MY __init__.py]", line 5, in <module>
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found[/code:2wt0jfy5]
I then checked the lib you gave me in the py2.zip , I saw win32api.pyd, os.pyc, but no sys something.
I tried to search the corresponding file in my python folder (back on my eeepc) but didn't find anything conclusive.

As the computers at my school runs on windows 7, I think I need help... again.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed May 18, 2011 7:23 pm

Try the py2.zip download again, I updated it with some dlls it needed.
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Wed May 18, 2011 11:15 pm

Yeeppeeeeh! That's working ber fine =)

Thank you very much for your time. Now I will be able to insert a nice cinematic and I will share this zip with my three schoolmates who use construct too.
I will probably show all my work soon (my deadline is 2011-06-06 extendable till 2011-06-18 I hope :D)
Thanks again o/
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jun 13, 2011 4:43 pm

Hi Rojo ! I'm using your Player, first of all, thank you very much !
My problem : the player works very fine but not in fullscreen mode, is there anything I missed ?
B
1
G
1
Posts: 2
Reputation: 429

Post » Mon Jun 13, 2011 5:13 pm

[quote="Florent":3hon5iyh]My problem : the player works very fine but not in fullscreen mode, is there anything I missed ?[/quote:3hon5iyh]
No, technically the video player is a window control so it doesn't work fullscreen.
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Mon Jun 13, 2011 5:48 pm

Thank you for reply, I've find a trick to have a "fake fullscreen" by removing caption. My last problem is : my video format is 1280*720 and my app format is 1280*1024, unfortunatly the player is not centered on frame.
B
1
G
1
Posts: 2
Reputation: 429

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest