AutoHotkey Community

It is currently May 26th, 2012, 4:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: June 26th, 2005, 11:53 pm 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
I'm making a game on AHK and I wanted to add some videos, there isn't any way I could use AHK to play videos, is it?

I know there isn't (currently), and I don't wanted to use Media Player or anything like that, so I wonder if anyone know how could I open a IE window with black background and No Bars, a changed title [and even a diferent icon (if possible)]...

I know that this is possible, I just don't know how!!

This would help a lot .. I don't wanted to use JPGs as GIFs and coordenate the SoundPlay with the images and with the Refresh Rate .. you understand don't you ?!

So please, give me an awnser .. I'm not in a hurry [my game is still very far from being finished ^^;;;]

Thank you in Advance ppl,

_________________
Belial


Last edited by Belial on July 3rd, 2005, 12:28 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 27th, 2005, 6:53 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
bom dia Belial,
This script is only a black background without border, starts video, Escape to quit
I woul'd like to have to define coordinate and size
Code:
;black.ahk 2005-06-27 garry
#NoTrayIcon
Gui,-Border
Gui, Color, 000000
Gui, Show, x0 y0 w1240 h970
soundplay,test55.mpg
return
GuiClose:
ESC::
ExitApp


Report this post
Top
 Profile  
Reply with quote  
 Post subject: I <3 MAN
PostPosted: June 28th, 2005, 12:56 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
LOL .. ppl portugues aki? ou seráx brazileiro? =X

bigaduh ^^

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2005, 5:43 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
ok .. I Tryed the code and it is wonderful [I thought it would be harder 2 do]

anyway, I have already detected some problems on it...

* Sometimes it doesn't use the codecs proprially .. I mean, I see the img and no sound. [1º test I made .. the last part was without any sound]

* I tryed the .avis I was going to use on my script. ; ;
-> NO SOUND
-> The speed was like 10 times FASTER than the original

[So now I'm mad o_O .. any solutions? .. if I give you the videos I used would it help?]

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2005, 8:18 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
bom dia Belial,
(not portugues speaking, like old music from Portugal, barco negro,fado..)
have no experience with video,have generel problems, some videos are running slow with different players
recorded VHS cassette to mpeg1, this works fine
would like to make karaoke functions (define x/y and size, script changes)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: PLEASE
PostPosted: July 3rd, 2005, 12:29 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
Please .. I need an awnser .. is this a bug?! is there any way to correct it?

Any kind of help is apreciated o_O

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2005, 2:42 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Any kind of video playback issues are likely due to system configuration issues or the limitations of the OS. For example, if the system lacks an installed codec for MPEG2 files, it is unlikely that they will play with SoundPlay.

I've not explored the limits of SoundPlay because internally, all it does is call the OS function mciSendString("play..."). So there's probably not much that can be done to make it play more types of files.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2005, 6:26 pm 
Offline

Joined: April 5th, 2005, 10:50 pm
Posts: 133
This code works fine (sound and speed and everything) with .avi & .mpg files. but it doesn't work at all with .wmv fills (even knowing that the correct codec is installed) I think only Windows Media player would play them).
Code:
#NoTrayIcon
fn=mpde.avi
Gui,-caption
Gui, Color, 000000
Gui, Show, x0 y0 w%A_screenwidth% h%A_screenheight%
soundplay,%fn%
winset,style,-0x800000,%fn%
winset,alwaysontop,on,%fn%
return

GuiClose:
ESC::
ExitApp

I don't know if that could help you or not . maybe you need to make sure that the right codec for the file is installed on your OS.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2005, 12:59 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
Chris wrote:
Any kind of video playback issues are likely due to system configuration issues or the limitations of the OS. For example, if the system lacks an installed codec for MPEG2 files, it is unlikely that they will play with SoundPlay.

I've not explored the limits of SoundPlay because internally, all it does is call the OS function mciSendString("play..."). So there's probably not much that can be done to make it play more types of files.


I have the codecs needed instaled ... every player I have can play the file with no problems, but AHK can't. Well.. it can play it, but with no sound and with 3 to 4 times faster then it should.

I wanted 2 know too if is there anyway to know when the file finished playing!!

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2005, 8:34 am 
Wouldn't it be possible to play the movie from within a HTA frontend (written realtime by an AHK script), so it uses IE's internal features ???

Might be nonsense :roll:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2005, 7:43 pm 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
BoBo .. no ideia what you are talking about ^^;;;;

Anyway, it doesn't have to be in AHK, if there is a simple player that could play the videos and that doesn't show ANY bars, buttons, title, etc..

My Idea is a black window [the script wrote above works], with the video centered and playing correctly.

[I'm making a Naruto Game [I don't know if you ever heard about it], so the attacks on the game would show some cuts from the Anime.. so the ideia is showing the file playing and when it finishes it goes back to the game]

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2005, 9:39 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
This seems like a codec problem on your system.

I don't know if there are any plans extending this command, but there is a small utility called RunMp2, part of the MediaMenu, that can launch a file fullscreen

Quote:
1. Description
--------------

This is a simple program designed to launch the Windows Media Player
with the file that you pass it as a parameter. This is useful if you
want to do an autoplay CD-ROM with any media file (AVI, WAV, ...) that
the Media Player can play.

Using this program has two advantages over running the Media Player
directly:

- The program will search for the location of Media Player. This allows
you to to use an autoplay CD-ROM in other computer although the
Media Player be installed in a different location.

- This application launch the Media Player in fullscreen mode, and when
the play of the media file is over, the Media Player is closed.


And you can try this as a command line:

Code:
mplay32 /play C:\path\to\yourfile.mpg

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2005, 12:13 am 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
Well, that program is almost perfect BUT, it didn't Automaticaly closed as it was expected.

"mplay32 /play C:\path\to\yourfile.mpg" <- what is this for?

I simply created a .lnk with the location of RunMp2 and the location of the AVI file...

have I done anything wrong that is causing the file not to close when it ends ?! õ_O

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 11th, 2005, 8:25 am 
Quote:
Media Player (both the 16-bit MPLAYER.EXE and the 32-bit MPLAY32.EXE) supports the following command-line syntax:

MPLAYER /play /close /embedding file

All of the command-line switches and the file name are optional. Their meanings are as follows:

/play Play file right away. /close Close after playing (only valid with /play). /embedding Run as an OLE server. file The file or device to open.

This information was inadvertently omitted from the Windows documentation.

In Windows 95 and Windows NT 3.5 and higher, the Media Player also supports the following switch:

/open Open the file if specified; otherwise, show the File Open dialog.

In addition, the following switches can be used to ensure that the specified file is of a particular type:

/AVI The file must be a Video for Windows (.AVI) file. /MID The file must be a MIDI (.MID) file. /WAV The file must be a Wave Audio (.WAV) file.

From here

And:

runmp2.exe "C:\the\path\to\myvideo.mpg" works for me


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2005, 4:05 pm 
Offline

Joined: June 26th, 2005, 9:43 pm
Posts: 40
Location: Portugal
RunMp2 automaticaly runs the file on fullscreen mode and runs the file without problems.

BUT, it doesn't close itself at the end of the file



Windows Media Player, [with /play and /close] runs the file NOT in fullscreen and DON'T closes itself at the end of the file as it should.

[Other Problem: Windows Media Player on other computers can be on other location or simply doen't exist]

---
RunMp2 works as I want, it just don't close automaticaly, am I doing anything wrong? ... anyway, even if it doesn't close automaticaly AHK should be able to close it easily [but in this case, how can AHK know when the file stopped playing (it stops when it reachs the end of the file)]

Awnsers and sugestions are welcome, and thanks in advance ^^;;

_________________
Belial


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Cerberus, poserpro, SKAN, tterB and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group