Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th October 2011, 14:18   #1  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Reading AviSynth output in C++

Hi,

I've more-or-less got the hang of writing AviSynth plugins, but now I'd like to write something in C++ (preferably with as little "++" as possible) that will let me open and read frames from an AviSynth file.

Can anyone recommend some simple source code I could look at to get an idea of how to do things?

Or, alternatively, can anyone tell me that I'd be better off looking into VFW APIs and just opening an AVI file - because I could do it that way too, but I thought AviSynth might be more flexible in the future.

David
wonkey_monkey is offline   Reply With Quote
Old 12th October 2011, 15:01   #2  |  Link
talen9
Registered User
 
Join Date: Aug 2007
Location: Italy
Posts: 286
I suppose that avs2yuv could be something like what you're looking for .. it takes an AVS file as an input, feeds it to AviSynth and you get an YUV stream as the output; maybe in the source you'll find something useful.

BTW, I know that there's a more up to date version of the program, look around in the forum for it, I don't have the link just here and now...
talen9 is offline   Reply With Quote
Old 12th October 2011, 15:02   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Hi David, suggest AVSTimer, I think it's in the New Plugins sticky (last page probably).
Have not yet lookd at it but it's supposed to be a simple timer & statistics for AVS's.
I asked for source to use as example for just the same thing.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 12th October 2011, 16:00   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Hi again David,
The link to AVSTimer (http://forum.doom9.org/showthread.ph...46#post1510246)
in the New plugins thread, gives a bad or deleted file message from MediaFire, to v106 by user Groucho2004.
He must have just deleted it from MediaFire when he set up this thread:

http://forum.doom9.org/showthread.php?t=162155
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th October 2011 at 16:06.
StainlessS is offline   Reply With Quote
Old 12th October 2011, 18:33   #5  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
avs2yuv does exactly what you're looking for and is only around 250 lines of code. Just use that as a reference.
TheFluff is offline   Reply With Quote
Old 13th October 2011, 14:20   #6  |  Link
talen9
Registered User
 
Join Date: Aug 2007
Location: Italy
Posts: 286
BTW, I found the link for the patched avs2yuv I mentioned before .. here it is
talen9 is offline   Reply With Quote
Old 13th October 2011, 17:56   #7  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Thanks everyone - I've had a quick look at the avs2yuv source and it looks the way to go.

David
wonkey_monkey is offline   Reply With Quote
Old 15th October 2011, 18:06   #8  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
...well, almost. Both AVSMeter and avs2yuv do all their AVISynth stuff within int main() {...}, but when I try and do what they're doing in a function, it causes an exception as soon as the function returns, and I'm utterly clueless! Any more ideas of what I could look at, preferably a full win32 program?

David
wonkey_monkey is offline   Reply With Quote
Old 15th October 2011, 20:17   #9  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Possibly a problem in the cleanup/destructors.
Can you post your code (or at least an outline if it's very long)?
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 15th October 2011, 22:53   #10  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
As a result of some Googling I linked my project to avisynth.lib instead of loading avisynth.dll as avs2yuv and AVSMeter do - that seems to have solved the exception and I can now read frames.

Thanks for the help!

David
wonkey_monkey is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.