Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Movie udf, Just like Sound


  • Please log in to reply
13 replies to this topic

#1 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 669 posts

Posted 17 May 2008 - 12:48 PM

Hi,
This udf works (almost) the same as Sound udf there is just a slight change in the mcisendstring
have a look:

the udf:
AutoIt         
#cs ----------------------------------------------------------------------------  AutoIt Version: 3.2.11.7 (beta)  Author:         ludocus  Script Function:     Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here Func mciSendString($string)     Local $iRet     $iRet = DllCall("winmm.dll", "int", "mciSendStringA", "str", $string, "str", "", "int", 65534, "hwnd", 0)     If Not @error Then Return $iRet[2] EndFunc   ;==>mciSendString Func _MovieOpen($pFile, $pHwnd, $pTop, $pLeft, $pWidth, $pHeight, $pAlias='')     if $pAlias = '' then $pAlias = RandomStr(10)     mciSendString("close "&$pAlias)     if Not @error Then         mciSendString("open " & FileGetShortName($pFile) & " alias "&$pAlias)         mciSendString("window "&$pAlias&" handle " & Number($pHwnd))         mciSendString("put "&$pAlias&" destination at "&$pTop&' '&$pLeft&' '&$pWidth&' '&$pHeight)         return $pAlias     Else         return 0     EndIf EndFunc func _MovieClose($hAlias)     return mciSendString("close "&$hAlias) EndFunc func _MoviePause($rAlias)     return mciSendString("pause "&$rAlias) EndFunc func _MovieStop($jAlias)     return mciSendString("seek " &$jAlias& " to start") EndFunc func _MoviePlay($sAlias)     mciSendString("set Test_Video time format milliseconds")     If mciSendString("status "&$sAlias&" position") = mciSendString("status "&$sAlias&" length") Then mciSendString("seek "&$sAlias&" to start")     mciSendString("play "&$sAlias)     return 1 EndFunc func _MoviePos($tAlias)     $sReturn = mciSendString("status "&$tAlias&" position")     if @error then return 0     return $sReturn EndFunc func _MovieLength($tAlias)     $tReturn = mciSendString("status "&$tAlias&" length")     if @error then return 0     return $tReturn EndFunc func _MovieSeek($sSnd_id, $iHour, $iMin, $iSec)     Local $iMs = 0     Local $iRet     mciSendString("set " & FileGetShortName($sSnd_id) & " time format miliseconds")     $iMs += $iSec * 1000     $iMs += $iMin * 60 * 1000     $iMs += $iHour * 60 * 60 * 1000     $iRet = mciSendString("seek " &$sSnd_id& " to " & $iMs)     If $iRet = 0 Then         Return 1     Else         Return SetError(1, 0, 0)     EndIf EndFunc func _MovieStatus($kAlias)     Return mciSendString("status "&$kAlias&" mode") EndFunc Func RandomStr($len)     Local $string     For $iCurrentPos = 1 To $len         $string &= Chr(Random(97, 122, 1))     Next     Return $string EndFunc


Enjoy!

Edited by ludocus, 17 May 2008 - 12:55 PM.








#2 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 669 posts

Posted 17 May 2008 - 12:57 PM

Comments are welcome :)

#3 Synapse

Synapse

    Adventurer

  • Active Members
  • PipPip
  • 107 posts

Posted 17 May 2008 - 01:55 PM

This is awsome....thx ludocus i`ve been w8ing 4 a long time for something like this.....thx again...and keep up the good work !!

#4 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 669 posts

Posted 17 May 2008 - 02:26 PM

no problem.
Lol, i like your avatar :)

#5 joseLB

joseLB

    Polymath

  • Active Members
  • PipPipPipPip
  • 246 posts

Posted 16 December 2008 - 04:39 PM

great sofware, Ludocus.
Simple and efficent. I tried with a lot of kind of movies and it worked with all.

Most of them, GUICtrlCreateAvi didnt work...
Thanks
Jose

Edited by joseLB, 16 December 2008 - 06:01 PM.


#6 Zisly

Zisly

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 252 posts

Posted 16 December 2008 - 10:59 PM

Which video formats does it support?

#7 Michel Claveau

Michel Claveau

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 352 posts

Posted 17 December 2008 - 05:21 PM

Hi!

Very fun & easy.
Run with many windows (WordPad/Write ; Excel ; Explorer ; etc. etc.)
Don't run inside several windows (notepad, terminal, ...)

A good application of MCI

Thanks, Ludocus.

Edited by Michel Claveau, 17 December 2008 - 05:23 PM.


#8 joseLB

joseLB

    Polymath

  • Active Members
  • PipPipPipPip
  • 246 posts

Posted 17 December 2008 - 06:40 PM

Which video formats does it support?

Well, I ran it with some videos that where inside my computer. I suppose that plain avi, windows media, divx, and some avi I have no idea how they where generated.
But I also believe that it only runs the kind of movies your PC supports, (codecs). I suggest you try it.

#9 Michel Claveau

Michel Claveau

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 352 posts

Posted 18 December 2008 - 07:43 AM

Hi!

...I suppose...I have no idea how they where generated...


Ludocus used MCI (Media Control Interface ). MCI is inside Windows since (very) long time (win 95)

See:
http://msdn.microsoft.com/en-us/library/ms709461(VS.85).aspx
http://en.wikipedia.org/wiki/Multimedia_Control_Interface
http://support.microsoft.com/kb/142731

#10 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 669 posts

Posted 18 December 2008 - 06:55 PM

Well, I ran it with some videos that where inside my computer. I suppose that plain avi, windows media, divx, and some avi I have no idea how they where generated.
But I also believe that it only runs the kind of movies your PC supports, (codecs). I suggest you try it.

I know how to fix it.. but im not really doing autoit at the moment.. so you'll have to wait..

#11 joseLB

joseLB

    Polymath

  • Active Members
  • PipPipPipPip
  • 246 posts

Posted 18 December 2008 - 07:28 PM

I know how to fix it.. but im not really doing autoit at the moment.. so you'll have to wait..

Hi Ludocus, I didn't find any problems. I meant that with all kind of videos I tried (that where at hand), they worked OK...
And I meant that most of them I don't know how they where generated, as an ".avi" movie can be a divx, etc., etc. generated movie.

On other hand, the standard guiCtrlCreateavi didn't work on almost all videos I tested (same of above).
Your's it a great udf... simple, efficient and straight to the point.
Jose

#12 ludocus

ludocus

    Possibly inventive crap going on right here

  • Active Members
  • PipPipPipPipPipPip
  • 669 posts

Posted 20 December 2008 - 08:34 AM

misunderstanding then..
Thnx!

#13 matwachich

matwachich

    Polymath

  • Active Members
  • PipPipPipPip
  • 235 posts

Posted 02 January 2011 - 07:23 PM

For me, the video is playing too fast, and without sound!!!
Any solution???

#14 ChangMinYang

ChangMinYang

    Adventurer

  • Active Members
  • PipPip
  • 100 posts

Posted 03 January 2011 - 10:48 AM

:: Ludocus
Your method is so beautiful.
Thanks a lot.

$sStrA = ycmGet_CryptHASH( $iLinA , $sPathA , "MD5" ) ; I used this instead 'Random String'

Edited by ChangMinYang, 03 January 2011 - 10:54 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users