UEZ Posted May 17, 2015 Share Posted May 17, 2015 (edited) It's written in VScript. That's my version of AutoIt. It has pretty much the same syntax as AutoIt, but has true compiler. It's what I wanted to do with AutoIt while being active in development. Anyway, not to repeat myself, some limited fuckers had different ideas.Oh, and Jon doesn't want me to talk about my work on AutoIt on the forums, so that's about all the info I'm willing to share.Not all codecs support frame count format, particularly those that handle streaming video formats, because streaming is done in time intervals, and not in frames. I can explain the algo if you want, the code can obviously be written in AutoIt.We are going off-topic here, so create new thread somewhere if you want to go further. No PMs please.Link and example: FrameGrabber.dll What about my question regarding returning a bitmap handle or bitmap data rather than saving the grabbed frame to disk?Actually I would talk about VScript because I'm curious but Jon doesn't want it but can you show me the code please? You said it is similar to AU3 code. I want to understand how you did it. Thanks. Edited May 18, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 19, 2015 Share Posted May 19, 2015 (edited) The silence of trancexx seems to indicate that It's not possible !For get frame by frame you just have to set the times depending of the FPS Edited June 14, 2015 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 19, 2015 Author Share Posted May 19, 2015 (edited) Nope, wrong forum section. Maybe this topic will be moved to "Developer Chat" section.Afterwards will be see... Edited May 20, 2015 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
trancexx Posted May 20, 2015 Share Posted May 20, 2015 (edited) It uses IVMRWindowlessControl interface, particularly GetCurrentImage method. Unlike other similar methods from other interfaces, this one succeeds regardless of possible hardware acceleration.The problem with DirectShow is plethora of deprecated interfaces, that should no longer be used. That's why it's very important not to use such interfaces for forward compatibility.GetCurrentImage gets 32-bit DIB bitmap. To answer your question about whether bitmap data could be returned - yes. Last step of this version of frame grabber is simple prepending BMP header to that DIB and writing all that to disk.Complete description of the code is:Create IGraphBuilder interface object - by calling ObjCreateInterface passing CLSID_FilterGraph and IID_IGraphBuilderCreate IBaseFilter (Video Mixing Renderer here) object - by calling ObjCreateInterface passing CLSID_VideoMixingRenderer and IID_IBaseFilterAdd the VMR to the filter graph - by calling IGraphBuilder.AddFilter(IBaseFilter, "Your name of this filter in the graph")Query VMR for IVMRFilterConfig - by calling ObjCreateInterface passing IBaseFilter (VMR) object and IID_IVMRFilterConfigSet rendering mode to VMRMode_Windowless - by calling IVMRFilterConfig.SetRenderingMode(VMRMode_Windowless) - This is super important step!Query VMR for IVMRWindowlessControl - by calling ObjCreateInterface passing IBaseFilter (VMR) object and IID_IVMRWindowlessControlAssign the rendering window (desktop one) - by calling IVMRWindowlessControl.SetVideoClippingWindow(handle to the desktop window)Render video file - by calling IGraphBuilder.RenderFile(video file)Query IGraphBuilder for IBasicAudio, IMediaControl, IMediaSeeking and IMediaEvent interfaces - by calling ObjCreateInterface passing IGraphBuilder object and IID_IBasicAudio, then IID_IMediaControl, IID_IMediaSeeking and finally IID_IMediaEventCall IBasicAudio.put_Volume(-10000) to mute the video (just in case)Call IMediaSeeking.SetPositions(startTime, AM_SEEKING_AbsolutePositioning, endTime, AM_SEEKING_AbsolutePositioning)Run the graph - play video - by calling IMediaControl.Run()Wait until rendering stops - by calling IMediaEvent.WaitForCompletion(INFINITE, ...)Finally grab the frame - by calling IVMRWindowlessControl.GetCurrentImage(pDIB)...Do whatever with it (I'm writing it to the disk to a BMP file)Call CoTaskMemFree on pDIBSimple right? Yes it is, the most boring and tedious is to write interfaces description strings, after that it's pure fun.If you want to limit yourself to AVI files only then it might be good idea to use AVIFile..., AVIStream... functions from avifil32.dll for simplicity (if you would find that simple). Edited May 20, 2015 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
UEZ Posted May 20, 2015 Author Share Posted May 20, 2015 Thanks for the answer and pseudo code. I need to dig first in how to use those interfaces and then let's see.I will revert when I understood the object stuff and have any question. This can take a while (I'm over 40 ;)) Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 21, 2015 Share Posted May 21, 2015 Do you suggest that trancexx is youngest than you ?Would you have some other interesting informations ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 21, 2015 Author Share Posted May 21, 2015 Do you suggest that trancexx is youngest than you ?Would you have some other interesting informations ? Afaik, yes she is younger than me.I'm not an interesting person, rather boring. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
wakillon Posted May 21, 2015 Share Posted May 21, 2015 I'm not an interesting person, rather boring. No at all ! And i was asking about her ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
UEZ Posted May 21, 2015 Author Share Posted May 21, 2015 LOL Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Lakes Posted June 8, 2015 Share Posted June 8, 2015 Maybe this should be in the chat forum, (mods, move as required).The mention of a true autoit compiler piqued my interest, now, I know you (trancex) can`t provide any details about this here, but some speed comparisons (a youtube video would be really nice) would be interesting to see. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now