Jump to content

Playing a AVI File [Solved]


 Share

Recommended Posts

Hi All,

I am trying to play a AVI file within a GUI. The code below is taken from the helpfile.

#NoTrayIcon
#include <GuiAVI.au3>
#include <GUIConstantsEx.au3>

Local $hGUI, $hAVI, $sFile = @ScriptDir & "\Test.avi"

; Create GUI
$hGUI = GUICreate("(External) AVI Open", 500, 500)
$hAVI = _GUICtrlAVI_Create($hGUI, "", -1, 10, 10, 1920, 1080)
GUISetState(@SW_SHOW)

; Play the sample AutoIt AVI
_GUICtrlAVI_Open($hAVI, $sFile)

; Play the sample AutoIt AVI
_GUICtrlAVI_Play($hAVI)

; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

; Close AVI clip
_GUICtrlAVI_Close($hAVI)

GUIDelete()

I know the code works as if i change $sFile to C:\Program Files (x86)\AutoIt3\Examples\GUI\SampleAVI.avi it loads. 

The helpfile mentions the video must be silent and test.avi is. Are there other requirements in order it to load?

Test.avi

 

Thanks :)

Encase anyone else finds this, i spent some time trying to uncompress my AVI using ffmpeg but i still couldn't get AutoIt to play it.


I suspect it's me doing something wrong but i did found it was taking my test file from a small 166kb file to 170MB.
From what i reading uncompressed avi files are rather large by nature which rendered it not practical for my implementation. 

 

Edited by IanN1990
Link to comment
Share on other sites

  • 1 year later...


The topic is still not resolved. I tried to transcode the video file, but in addition to system AVI, not a single encoder could create an unpacked file that will work. PS: please post a working example. 

I tried a lot of codecs, but did not understand which codec the file 😄 \ Program Files (x86) \ AutoIt3 \ Examples \ GUI \ sampleAVI.avi was created

AVI_Meta.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...