Ways to play videos via python

Post your own tutorials, guides and demos.

Post » Mon Nov 22, 2010 3:17 am

First let me say that these examples are barely python, mostly winapi calls. They were mainly an exercise to see how it can be done.

The first example is pretty much like the AVI object but without the controls. It's always drawn on top and it can be destroyed, but it has to be done manually.
[url:3bhii9y1]http://dl.dropbox.com/u/5426011/examples3/video.cap[/url:3bhii9y1]
Made in 0.99.96
Needs the ctypes python library.

The second example is Media Player embedded in the window, so it supports any file format that Media Player can play.
[url:3bhii9y1]http://dl.dropbox.com/u/5426011/examples3/Movie.cap[/url:3bhii9y1]
Made in 0.99.96
Needs the ctypes and win32com python libraries.


Python is cool, but I think a plug-in would be better.
-cheers

EDIT:
Also if it's of any interest here's an example of embedding flash in your app:
[url:3bhii9y1]http://dl.dropbox.com/u/5426011/examples3/flash.cap[/url:3bhii9y1]
Made in 0.99.96
Needs the ctypes and win32com python libraries.
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Mon Nov 22, 2010 4:57 am

Cool example.. until we get a better plugin for video this is a nice alternative! I completely forgot about the Window object for this stuff...
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Wed Nov 24, 2010 1:01 am

Very cool! Thanks for sharing these :D
B
3
S
1
G
2
Posts: 57
Reputation: 964

Post » Wed Dec 01, 2010 10:49 pm

I can't seem to get the flash example working...

I installed the required libraries but it just says some error about dispatch...



And then "name flash is not defined", though i specified a valid path/file ...

I'm really interested by this example for my day job...

Can you please help?

Thanks
B
4
S
1
G
2
Posts: 91
Reputation: 1,057

Post » Thu Dec 02, 2010 5:07 pm

Do you have Flash installed for Internet Explorer? The error you're getting means that it can't find Flash installed.

Here's the link from the Adobe site to install Flash for Internet Explorer:
[url:1zywpq7j]http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax.exe[/url:1zywpq7j]
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Thu Dec 02, 2010 8:21 pm

MMM it's true i never use IE lol i'll try to install the ie plugin.

How come i didn't think about this? I even installed this plugin for a client (via logmein) ... this week !


EDIT : great ! Works like a charm :)
I can finally get rid of mediator 8 !

Thank you :mrgreen:
B
4
S
1
G
2
Posts: 91
Reputation: 1,057

Post » Wed Dec 08, 2010 11:01 am

Wow nice job R0J0
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Mon Dec 13, 2010 10:12 pm

Hi,
excuse me but I can't manage to have the ctypes library to work.
I double click on the installer then a quick black screen appears and disappear in a second.
Dunno if it works or no but Construct doesn't seem to find it.

Is there something I do wrong ?
I have Python 2.7.1 installed.

Thanks !

I can't wait to test this !
B
11
S
1
G
2
Posts: 5
Reputation: 1,147

Post » Tue Dec 14, 2010 6:44 pm

ctypes should be included with a python install and Construct uses python 2.6.

Here are all the python files you need for ctypes, just extract into the "Construct\Data\Python" Directory.
[url:271xcej1]http://dl.dropbox.com/u/5426011/examples3/py.zip[/url:271xcej1]
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Tue Dec 14, 2010 7:34 pm

Cool, it works now.

Thanks a lot !

I'm going to try this. :D
B
11
S
1
G
2
Posts: 5
Reputation: 1,147

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests