AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Videos on AHK [No Sound .. Problems in speed!!!]
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Sun Jun 26, 2005 10:53 pm    Post subject: Videos on AHK [No Sound .. Problems in speed!!!] Reply with quote

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 Sat Jul 02, 2005 11:28 pm; edited 4 times in total
Back to top
View user's profile Send private message MSN Messenger
garry



Joined: 19 Apr 2005
Posts: 2212
Location: switzerland

PostPosted: Mon Jun 27, 2005 5:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Mon Jun 27, 2005 11:56 pm    Post subject: I <3 MAN Reply with quote

LOL .. ppl portugues aki? ou seráx brazileiro? =X

bigaduh ^^
_________________
Belial
Back to top
View user's profile Send private message MSN Messenger
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Tue Jun 28, 2005 4:43 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
garry



Joined: 19 Apr 2005
Posts: 2212
Location: switzerland

PostPosted: Tue Jun 28, 2005 7:18 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Sat Jul 02, 2005 11:29 pm    Post subject: PLEASE Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Sun Jul 03, 2005 1:42 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail
MYYM



Joined: 05 Apr 2005
Posts: 133

PostPosted: Sun Jul 03, 2005 5:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Thu Jul 07, 2005 11:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
BoBo
Guest





PostPosted: Fri Jul 08, 2005 7:34 am    Post subject: Reply with quote

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 Rolling Eyes
Back to top
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Sat Jul 09, 2005 6:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
daonlyfreez



Joined: 16 Mar 2005
Posts: 949
Location: Berlin

PostPosted: Sat Jul 09, 2005 8:39 pm    Post subject: Reply with quote

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

_________________
mirror 1mirror 2mirror 3ahk4.me • PM or
Back to top
View user's profile Send private message
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Sun Jul 10, 2005 11:13 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
Guest






PostPosted: Mon Jul 11, 2005 7:25 am    Post subject: Reply with quote

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
Back to top
Belial



Joined: 26 Jun 2005
Posts: 40
Location: Portugal

PostPosted: Fri Jul 15, 2005 3:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group