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. |
25th March 2009, 22:38 | #1 | Link |
Registered User
Join Date: Aug 2008
Posts: 6
|
avs2yuv.exe v0.24 and TFM()
I was trying to use TFM with the output option under avs2yuv.exe, but the stats file was always empty.
The reason is that TFM doesn't write out the statistics file until its destructor is invoked. avs2yuv never deletes its IScriptEnvironment, so this never occurs. Here is one possible fix: Code:
--- avs2yuv.cpp.orig.cpp 2009-03-25 14:36:08.417734300 -0700 +++ avs2yuv.cpp 2009-03-25 14:23:34.209782400 -0700 @@ -10,6 +10,7 @@ #include <string.h> #include <io.h> #include <fcntl.h> +#include <memory> #include "internal.h" #ifdef _MSC_VER @@ -113,7 +114,7 @@ if(!CreateScriptEnvironment) {fprintf(stderr, "failed to load CreateScriptEnvironment()\n"); return 1;} - IScriptEnvironment* env = CreateScriptEnvironment(AVISYNTH_INTERFACE_VERSION); + std::auto_ptr<IScriptEnvironment> env(CreateScriptEnvironment(AVISYNTH_INTERFACE_VERSION)); AVSValue arg(infile); AVSValue res = env->Invoke("Import", AVSValue(&arg, 1)); if(!res.IsClip()) @@ -197,7 +198,7 @@ frm = inf.num_frames-1; } - PVideoFrame f = clip->GetFrame(frm, env); + PVideoFrame f = clip->GetFrame(frm, env.get()); if(out_fhs) { static const int planes[] = {PLANAR_Y, PLANAR_U, PLANAR_V}; |
4th July 2011, 14:39 | #2 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
@PhilR
Thanks! Your patch solved this issue I applied your patch and some cosmetics to original avs2yuv0.24. avs2yuv-0.24m (This binary requires msvcr100.dll) sourcecode *fix crash on Windows7 when closing process. *change the tool for -hfyu from mencoder to ffmpeg.
__________________
my repositories |
4th July 2011, 19:45 | #3 | Link |
Registered User
Join Date: Jul 2007
Posts: 552
|
Some time ago I decided to compile avs2yuv in GCC (didn't want to install MSVS) so I replaced C++ code with C (based on AviSynth input from x264).
May be somebody will find it useful: avs2yuv-0.24-mod.zip.zip |
6th July 2011, 03:58 | #4 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
@MasterNobody
Your code doesn't work at all... Code:
g:\Enctools> echo ColorBars^(^).Trim^(0,999^) > ./in.avs g:\Enctools> .\avs2yuv_ch.exe .\in.avs -o .\out1.y4m .\in.avs: 640x480, 30000/1001 fps, 1000 frames converting RGB -> YV12 g:\Enctools> .\avs2yuv_bm.exe .\in.avs -o .\out2.y4m (null)
__________________
my repositories Last edited by Chikuzen; 6th July 2011 at 04:04. |
6th July 2011, 08:01 | #6 | Link |
Registered User
Join Date: Jul 2007
Posts: 552
|
Try this version avs2yuv-0.24-mod.zip (may be one of the used functions doesn't exist in msvcrt.dll of your OS)
|
6th July 2011, 09:33 | #7 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
In your avisynth.h, AVISYNTH_INTERFACE_VERSION has the value "2". Why did you change that? Also, why don't you remove the dependency to msvcr100.dll by simply linking statically? Edit: Sorry, I just noticed that the original avisynth.h that Loren Merrit included is a very old one. So, you actually didn't change it. I guess I was thrown off by the comment in your code repository that you updated to a more recent version (which you didn't). Last edited by Groucho2004; 6th July 2011 at 09:59. |
|
6th July 2011, 09:40 | #8 | Link | |
typo lover
Join Date: May 2009
Posts: 595
|
Quote:
btw, this is static-link version of mine. http://www.mediafire.com/download.php?zhl0044zbhfaigy
__________________
my repositories |
|
7th July 2011, 16:48 | #9 | Link | |
typo lover
Join Date: May 2009
Posts: 595
|
Quote:
http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspx
__________________
my repositories |
|
7th July 2011, 17:03 | #10 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
|
|
7th July 2011, 17:07 | #11 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
(Sorry to contradict you for the 2nd time today. ) |
|
7th July 2011, 17:16 | #12 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
I'll give you an example: avs2yuv compiled with VC8 (VC2005) and statically linked gives me a file size of 94,208 bytes. If you consider this huge I suggest you look at recent versions of Adobe Reader. |
|
7th July 2011, 18:32 | #13 | Link |
Registered User
Join Date: Jul 2007
Posts: 552
|
Chikuzen
This was really stupid bug (my bad I didn't test it with AviSynth 2.6.0). This time it should work for sure. avs2yuv-0.24-mod-fixed.zip |
29th April 2013, 07:21 | #14 | Link | |
Registered User
Join Date: Dec 2012
Posts: 2
|
Quote:
Please create a new one. http://forum.doom9.org/showthread.php?t=148782 I would like a new version Avisynth 2.6 MT Last edited by verisokin; 29th April 2013 at 07:27. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|