Log in

View Full Version : VirtualDub2


Pages : [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

shekh
12th April 2015, 12:00
I think it is stable now, available for download.

http://sourceforge.net/projects/vdfiltermod/

There isnt currently excessive amount of filters so this feature is of limited use.
If anyone wants to *develop* filters dont hesitate to ask for help, I dont write any SDK/manual until asked.

What can use now:
Open high bit depth formats like tiff, sgi, ffv1, ... whatever supported by ffmpeg.
Apply "rgb levels" filter - this way can inspect what is the quality of image (whether gradients are actually high precision).
Crop, flip, convert format also work.
Export at full precision as tiff sequence.

Eventually I will upgrade some other filters, but I am somewhat stuck with input codec. I wanted to have something like cineform but it doesnt seem it will work in >8bit. So if anyone has idea what format/decoder can be both fast and high accuracy...

shekh
29th November 2015, 23:13
Update:

Export using external encoder now supports these formats: rgb24, rgba, rgba64, yuv 4:2:2, yuv 4:4:4.
Tested with 16 bit tiff sequence as input and encoded to various ffmpeg ffv1 formats: yuva64, rgb14, yuv444, rgba.

Example presets for reference:


{
"description": "VirtualDub external encoder profile collection",
"externalEncoders": {
"sets": {
"ffv1-yuva64": {
"videoEncoder": "ffv1-yuva64",
"audioEncoder": "",
"multiplexer": "",
"description": "",
"extension": "mkv",
"processPartial": false,
"useOutputAsTemp": true
},
"ffv1-rgb14": {
"videoEncoder": "ffv1-rgb14",
"audioEncoder": "",
"multiplexer": "",
"description": "",
"extension": "mkv",
"processPartial": false,
"useOutputAsTemp": true
},
"ffv1-yuv444": {
"videoEncoder": "ffv1-yuv444",
"audioEncoder": "",
"multiplexer": "",
"description": "",
"extension": "mkv",
"processPartial": false,
"useOutputAsTemp": true
},
"ffv1-rgba": {
"videoEncoder": "ffv1-rgba",
"audioEncoder": "",
"multiplexer": "",
"description": "",
"extension": "mkv",
"processPartial": false,
"useOutputAsTemp": true
}
},
"profiles": {
"ffv1-rgb14": {
"name": "ffv1-rgb14",
"program": "E:\\download\\vd\\ffmpeg1\\ffmpeg.exe",
"commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v ffv1 -pix_fmt gbrp14 %(tempvideofile)",
"outputFilename": "",
"type": 0,
"pixelFormat": "bgra64le",
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"ffv1-yuv444": {
"name": "ffv1-yuv444",
"program": "E:\\download\\vd\\ffmpeg1\\ffmpeg.exe",
"commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v ffv1 %(tempvideofile)",
"outputFilename": "",
"type": 0,
"pixelFormat": "yuv444p",
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"ffv1-yuva64": {
"name": "ffv1-yuva64",
"program": "E:\\download\\vd\\ffmpeg1\\ffmpeg.exe",
"commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v ffv1 %(tempvideofile)",
"outputFilename": "",
"type": 0,
"pixelFormat": "bgra64le",
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
},
"ffv1-rgba": {
"name": "ffv1-rgba",
"program": "E:\\download\\vd\\ffmpeg1\\ffmpeg.exe",
"commandArguments": "-f rawvideo -pix_fmt %(pix_fmt) -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v ffv1 %(tempvideofile)",
"outputFilename": "",
"type": 0,
"pixelFormat": "bgra",
"inputFormat": 0,
"checkReturnCode": true,
"logStdout": true,
"logStderr": true,
"bypassCompression": false,
"predeleteOutputFile": true
}
}
}
}

kolak
16th December 2015, 20:28
Cineform definitely can pass v210 to an external app. You may also get other pixel formats like RGB30 etc.
With ffmpeg input driver you should be able to access any high bit depth formats if you do required modifications.

foxyshadis
26th December 2015, 20:50
Split off the codec discussion (https://forum.doom9.org/showthread.php?t=173007) since that deserves a wider audience.

The mod looks really cool! I gave it some paces and it seems to be quite stable, although there aren't yet a lot of filters to take advantage of the bit depth. Nice to have a mod that's also up to date with the current vdub.

shekh
27th December 2015, 11:04
Thanks! I`d like to have some color correction filter but have no schedule for it. Most "classical" filters like brightness/contrast are non-upgradeable because they are based on 8-bit lookup table, and 16-bit lookup tables do not work afaik. If somebody point me a piece of open source which is already working fine somewhere, that could speed up things :)

StainlessS
14th June 2016, 20:09
Hi Shekh,

Just wondering if you have ever considered adding Avisynth script editing source from VDMod to vdfiltermod,
I would find myself using your mod more than any other app if so.
I had considered doing this myself but there is an awful lot of VD source and would be easier for someone
who is already familiar with it.
If you do, then ensure you use the Fizick modded source to fix Insert Trims etc (some versions off by one converting VD to Avisynth range
specifications).

Perhaps you would find it useful yourself, if not then please dont bother, maybe I do it myself in a decade or two.

shekh
14th June 2016, 21:25
I am lazily evaluating whether I am able to approach this.
Right now I am still not doing any avisynth scripting at all so this is the biggest problem.
Also I am overwhelmed by the amount of links.
There is original VDMod (2006), is it the same version you suggest (modded by Fizick)?
There is also more recent Virtualdub+ which already merged script editing part with some newer vdub (but maybe this is of less help)
Also it seemed hard to identify which avisynth implementation is THE avisynth (and why not vapoursynth anyway?).
Also I am afraid VDMod is 32bit only and has dll dependencies (who knows if all of that can compile for x64?)

Anyway if it was simple I would probably find interest to do this :)
I have a couple of questions to evaluate the volume.
Where can I find a feature-by-feature list of what the script support in VDMod is?
I saw references to programs like AVSPmod. What is wrong with them, why vdub is still needed?

From the point of implementing, it might be better for health to move script editor to plugin.

StainlessS
14th June 2016, 22:26
Version of VDubMod that I use (might be later ones, but with off by 1 bug re-installed) 1.5.10.3 build 2550.
I dont have complete source for above version.

Here source for 1.5.10.2 build 2542 (sourceforge):- https://sourceforge.net/projects/virtualdubmod/files/

Here Fizick fix, not sure if any diff to build 2550:- http://www.mediafire.com/download/9ap97df31yicjl9/vdmod15101b2512src_fizick.zip

Executable 1.5.10.3 build 2550 (32 bit):- http://www.mediafire.com/download/3l98odb1mch9a1e/VirtualDubMod_1_5_10_3_b2550.zip

Was not aware of existence of VirtualDub+ (you have a link ?, found some on-line but by unknown sites), this might be just what the doctor ordered.

There are versions of VDMod about v1.7.8, (maybe French I think [EDIT: Actually JAP]), but they are broken, off by 1.

The VD script editor is quite basic, should work OK with AVS or AVS+ (32 bit), basic text editing, allows insert of trim set, range and frame number (from within VD main),
also save & reload script, save & refresh script. Not really much more than that.
(changing TAB setting from 8 to 4 might also be nice, real tedious having to reformat tabs to SPACE before and after VDMod use).
EDIT: Above "basic text editing", really only normal text entry + cursor keys + delete key + TAB key.
There is also some kind of auto comment/uncomment of hilited lines (I could live without that).
CTRL/Z Undo
CTRL/Y Redo
CTRL/P Insert current frame
CTRL/R Insert Range
CTRL/T Insert Trim with range
CTRL/I Import Frameset as Trims (replicate VDub range deletions into script).
CTRL/SHIFT/O Insert filename, never used.
CTRL/SHIFT/C Insert crop, never used.
CTRL/SHIFT/ALT/C Comment selected.
CTRL/SHIFT/ALT/U UnComment selected.
CTRL/F Find (dont work disabled in menu)
F3 Find Next (dont work disabled in menu)
F5 Save and reopen at current frame.
F7 Save and open.

Thats basically it. (Ones I frequently use in BLUE)

Where can I find a feature-by-feature list of what the script support in VDMod is?

See the executable above and see Tools menu [EDIT: The script editor has its own window and little menu].

I saw references to programs like AVSPmod. What is wrong with them, why vdub is still needed?

I do not use AvsPMod because I object to it editing/changing my carefully prepared scripts (I keep having to change them back again).
I guess if you are a script user rather than developer, then it is less grossly annoying.

From the point of implementing, it might be better for health to move script editor to plugin.

WOW, I had considered that but had no idea if possible, t'would be magick

All hail shekh http://www.cosgan.de/images/smilie/musik/k015.gif

GMJCZP
15th June 2016, 01:28
More versions of VDub/VDubMod, by bcn_246:

Here. (http://forum.doom9.org/showthread.php?p=1607607#post1607607)

Posts #595 to 597.

StainlessS
15th June 2016, 04:22
Thanks GMJCZP,
but links are for vdm v1.5.10.2 build 2542 (link to source already given above) but patched to Large Address Aware.
and v1.5.10.3 build 2550 executable only (already linked above) but patched to Large Address Aware.

I was seeking 1.5.10.3 build 2550 source (ie with Fizick patch in-situ).
v1.5.10.2 has broken (off by 1) frame range insertion (huge reason I use vdmod).

EDIT: 'off by 1', Avisynth uses trim(StartFrame,EndFrame), VD sort of Trim(StartFrame,EndFramePlusOne)
ie Avisynth EndFrame is Inclusive, VD Exclusive.

shekh
15th June 2016, 11:13
This is from 2008, VirtualDub-1.7 + VirtualDubMod + patch
https://github.com/chattama/modplus
Found it by looking at some videohelp threads.
The fixes list (google translated from japanese) looks quite considerable.

I am sure I came across another fork of something but don't remember what :)

shekh
17th June 2016, 21:46
After inspecting the sources, editor related stuff is rather small and simple. Mission possible.

shekh
21st June 2016, 22:11
Need some testing!
(url deleted)
Archive contains main executables and script editor plugin for both 32 and x64.
I tested it against VapourSynth (I also enabled python parsing).
The new script editor is compiled with latest scintilla (text editor component) and its avs parser, therefore some styling changed. I fixed some obvious mismatches.
Also I completely dropped "Insert crop" feature: it is too hacky and I am not sure of its purpose.
Also I did not bother with hotkey editing. Editor hotkeys are only available as predefined.

update:
script editor is included with version 11 and up.

StainlessS
22nd June 2016, 00:03
Oooh lovely. I'll have a bit of a play :)

wiseant
23rd June 2016, 00:54
@shekh

Thanks - will be testing this over the next week

@StainlessS

I do not use AvsPMod because I object to it editing/changing my carefully prepared scripts (I keep having to change them back again).

What changes was AvsPMod making to your script?

StainlessS
24th June 2016, 04:49
What changes was AvsPMod making to your script?

Well amongst other things, when I used RT_FselOpen(), it inserts the filename itself into the script making the fileselector dialog box non functional on subsequent uses of the script.
No idea how AvsPMod does that, but wish it did not.

Made quite a few other changes to my scripts too (cant remember what).

EDIT: Perhaps wrapping the function call in an Eval would fix that, dont know.

StainlessS
27th June 2016, 21:13
OK Shekh, I've had a little bit of a play and here some comments.

TAB space of 4 works, GREAT LOVE THAT !

Scrip Editor, Menu/Help/Avisynth Information/ Crashes, maybe because I have a LOT of plugs in my auto plugs directory (AVS standard v2.6).

Plugin (32bit only tried) crashes VD if put in VDub v1.10.4 Plugins32.

Fizick Fixes do not work, must be non implemented in the source you used.


Avisource("Cabaret.avi")
trim(10000,-100) # 100 Frames, frames 0 -> 99
ShowFrameNumber

# Go to Frame 20, Press HOME, Go to frame 31 Press END, Press DELETE (deletes frames 20 -> 30 inclusive).
# Open Script Editor,
# Press CTRL/I, should insert "Trim(0,19) ++ Trim(31,99)"
# Actually inserts "Trim(0,20) ++ Trim(31,100)" # NOTE Frame 100 does not exist



/* Fizick Fix, AVSViewer.cpp

case WM_VDM_SENDFRAMESET:
{
string buffer;
char buf[50];
VDM_FRAMESET *fs = (PVDM_FRAMESET) lParam;
//SETTEXTEX st;
//st.flags = ST_SELECTION;
//st.codepage = CP_ACP;
VDM_BASIC_RANGE range;
for(int i = 0; i<fs->count; i++) {
//range = (fs->ranges + (i*sizeof(VDM_BASIC_RANGE)));
range = fs->ranges[i];
// wsprintf(buf, "Trim(%d,%d)", range.from, range.to);
// Fixed bug with TRIM position for Avisynth - code changed by Fizick:
if (range.from == 0 && range.to == 1)
wsprintf(buf, "Trim(%d,%d)", 0, -1); // special case of one very first frame
else
wsprintf(buf, "Trim(%d,%d)", range.from, range.to - 1); // -1 corrected by Fizick
if (i>0) buffer += " ++ ";
buffer += buf;
}
SendMessage(pcd->hwndView, SCI_REPLACESEL, 0, (LPARAM) buffer.c_str());
if (fs->count==0) guiMessageBox(hwnd, IDS_ERR_AVS_NOFRAMESET, IDS_ERR_CAPTION, MB_OK|MB_ICONERROR);
delete [] fs->ranges;
delete [] fs;
}
return 0;
*/

# Send Range CTRL/R, mark 20 -> 31 should insert "20,30" but instead inserts "20,31"
# Same for Send Trim CTRL/T, mark 20 -> 31 should insert "Trim(20,30)" but instead inserts "Trim(20,31)"
/*
case WM_VDM_SENDRANGE:
{
char buf[50];
VDM_RANGE *range = (PVDM_RANGE) lParam;
//SETTEXTEX st;
//st.flags = ST_SELECTION;
//st.codepage = CP_ACP;
if (pcd->scriptType == SCRIPTTYPE_NONE)
// wsprintf(buf, "%d-%d", range->range.from, range->range.to);
wsprintf(buf, "%d-%d", range->range.from, range->range.to - 1); // -1 corrected by Fizick
else
// wsprintf(buf, (range->tag)?"Trim(%d,%d)":"%d,%d", range->range.from, range->range.to);
// Fixed bug with TRIM position for Avisynth - code changed by Fizick:
if (range->range.from == 0 && range->range.to == 1)
wsprintf(buf, (range->tag)?"Trim(%d,%d)":"%d,%d", 0, -1);// special case of very first frame
else
wsprintf(buf, (range->tag)?"Trim(%d,%d)":"%d,%d", range->range.from, range->range.to -1);// -1 corrected by Fizick
SendMessage(pcd->hwndView, SCI_REPLACESEL, 0, (LPARAM) &buf);
delete [] range;
}
return 0;
*/


Is very promising, can probably get rid of VDubMod very soon :)

EDIT:
From gui.cpp, perhaps related to Avisynth Information crash

// *******************************************************************
// *** VirtualDubMod ***
// *** Tobias Minich, Apr 2003 ***
// BEGIN *************************************************************
int guiMessageBox(HWND hwnd, UINT idText, UINT idCaption, UINT uType) {
char caption[256];
// char text[1024];
char text[4096]; // increased by Fizick (for Avisynth functions list)
bool error = false;

// get caption
if (LoadString(g_hInst, idCaption, (LPTSTR)caption, sizeof caption) == 0)
error = true;

// get message body
if (LoadString(g_hInst, idText, (LPTSTR)text, sizeof text) == 0)
error = true;

if (error) {
return MessageBox(hwnd, "Can't retrieve message!", "Internal Error", MB_OK);
}

return MessageBox(hwnd, text, caption, uType);
}

int guiMessageBoxF(HWND hwnd, UINT idFormat, UINT idCaption, UINT uType, ...) {
// char buf[1024];
char buf[40096];// increased by Fizick (for Avisynth functions list)
char caption[256];
// char format[1024];
char format[4096];// increased by Fizick (for Avisynth functions list)
bool error = false;
va_list val;

// get caption
if (LoadString(g_hInst, idCaption, (LPTSTR)caption, sizeof caption) == 0)
error = true;

// get format string
if (LoadString(g_hInst, idFormat, (LPTSTR)format, sizeof format) == 0)
error = true;

if (error) {
return MessageBox(hwnd, "Can't retrieve message!", "Internal Error", MB_OK);
}

va_start(val, uType);
vsprintf(buf, format, val);
va_end(val);

return MessageBox(hwnd, buf, caption, uType);
}

EDIT: Maybe that second from last one should be 40960 rather than 40096.

shekh
27th June 2016, 21:47
There is a lot of lines with "-1 corrected by Fizick" but seems it still needs some cleanup, I will check now.
Btw if you want to play with source I pushed it here: https://sourceforge.net/p/vdfiltermod/scripted/ci/master/tree/

Looks like "4 tabs" option comes from chattama fixes as I picked his source for porting.
Anyway it is a trivial scintilla config command, you can make loads of such changes.

There is no point to put it in VDub v1.10.4, this is brand new plugin type.
However it is strange that VDub crashes.

"Avisynth Information Crashes"
Works for me, do you think I can install yours avisynth environment to compare?

StainlessS
27th June 2016, 21:54
My Avisynth information normally completely overflows the screen,
RT_Stats alone has in excess of 160 functions in it, probably the reason.
Also, see the above edit.
I'll check later with (nearly) empty plugs directory, but got to go out soon.

shekh
27th June 2016, 22:17
What is the issue with this:


if (range->range.from == 0 && range->range.to == 1)
wsprintf(buf, (range->tag)?"Trim(%d,%d)":"%d,%d", 0, -1);// special case of very first frame


As I understand, Trim(0,0) is not supported so it has to select nothing? And Trim(3,3) etc is allright?

Updated

Fixed Trim range for Avisynth (no idea for "decomb")
Fixed VDub compatibility
Fixed Avisynth info crash
Added edit->goto command (frame/line)
Reloading in filter preview now works

Concerning Avisynth information, it is probably better to not show "external commands" at all?
I can understand one would want to see Avisynth name, version, and probably loaded path.
But when commands are several screens it is useless to see them in the same place.

StainlessS
27th June 2016, 23:11
That issue is because changing trim(0,1) in vub format (meaning single frame 0) would convert to trim(0,0) (entire clip).
So, is a 'special Case of trim(0,-1) which means 1 frame startiing at frame 0.

Edit, issue arises because 0 as end frame, means 'all the way to the very last frame.

Edit, having trouble with autocorrect.

shekh
27th June 2016, 23:27
OfThat issue is because changing trim(0,1) in vub format (meaning single frame 0) would convert to trim(0,0) (entire clip).
So, is a 'special Case of trim(0,-1) which means 1 frame startiing at frame 0.

Edit, issue arises because 0 as end frame, means 'all the way to the very last frame.

In that case it works.
But there is another special case now: when I select frames 0-0 (0 frames) it creates the same Trim(0,-1) which is not good. Should it be Trim(0,0)? :)

btw I edited msg 20

StainlessS
27th June 2016, 23:32
In vd, 0-0 (0 frames) should be ignored, there is no range.

shekh
27th June 2016, 23:43
In that case I will display a message.

Another question: I set a limit for importing frameset to 1024 chunks. Is it enough for all practical purposes or there exist a valid use case for importing more?

StainlessS
27th June 2016, 23:50
I'm sure that I would be more than happy with that :)

Edit having quite bad problems, mo!bile.

StainlessS
28th June 2016, 00:17
I'm probably gonna dump vdubmod, it's kinda sad, really.

My auto correct keeps converting 'shekh' to 'enemy', is there something that you are not telling me :)

Also corrects 'vdubmod' to 'crumble' for some strange reason.

raffriff42
28th June 2016, 14:45
Can it read Stack16 (http://avisynth.nl/index.php/Stack16)? That would be handy for importing high bit depth Avisynth.

StainlessS
28th June 2016, 14:48
OK, tried new version, no problems that I can think of :)
Tried copy plugin to vdub 1.10.4 plugins32, no crash (does not appear anywhere, presume its not supposed to).

Avisynth Information, now does not crash, I dont really use that anyway, but nice it dont crash now (with no change in my Avs plugs dir).

Fixed Trim range for Avisynth (no idea for "decomb")

I was not even aware that VDMod had a Decomb mode, no idea what kind of scripts that uses.

Added edit->goto command (frame/line)
That might be handy.

Reloading in filter preview now works
Lovely.

Concerning Avisynth information, it is probably better to not show "external commands" at all?
I'm not bothered either way, but dont crash anyway now.

Perhaps the disabled Crop() insertion could be of use (but I've never used it), it just allows user to set up crop
inside VDub, then insert into script, user would then need to remove crop (usually attached to "Null transform filter"),
and then refresh script. (add it or not, I'm happy either way).
Thanks for posting the plugin source link, quite interesting. [EDIT: Project opened just fine in VS2008, have not tried to compile, yet]

Can you remove the initial posted plugin link, you dont want people downloading that.

Also, you perhaps want to shout a bit louder about your having added Vapoursynth script handling, I'm sure some will love that.

One very small thing, in "Open With", your mod still shows as "VirtualDub" (same as official one), whereas VDMod shows
as "www.virtualdub-fr.org", dont know where/how this is set but would it be possible to change so as to be able to
select which version of VDub you want to open a file with (I've had to copy your exe into same place as original [and rename orig]
so that I can right click and Open With. I actually now have about 6 or 7 versions of VD on sys, and would be nice if Open With
worked with all of them individually. If I try to add another Open With VirtualDub, by browsing to your mod, it always uses the
original one (hence the temp replacement).

Anyways, I'm a very happy bunny already, thanks very much. All Hail Shekh ... http://www.cosgan.de/images/smilie/musik/k015.gif

StainlessS
28th June 2016, 15:27
Seems that afxres.h is not included with Express versions and so plugin cannot be compiled under VS 2008 Express.

(Part of MFC, is that really necessary ?)


Compiling...
accel.cpp
c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(67) :
fatal error C1083: Cannot open include file: 'afxres.h': No such file or directory

AVSViewer.cpp
c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\avsviewer.cpp(62) :
fatal error C1083: Cannot open include file: 'afxres.h': No such file or directory


Everything else seems to compile OK.

EDIT: For accel.cpp
if I comment out include "afxres.h" I get this


1>c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(80) : error C2065: 'ID_FILE_NEW' : undeclared identifier
1>c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(81) : error C2065: 'ID_FILE_OPEN' : undeclared identifier
1>c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(91) : error C2065: 'ID_EDIT_REDO' : undeclared identifier
1>c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(92) : error C2065: 'ID_EDIT_UNDO' : undeclared identifier
1>c:\temp\vdfiltermod-scripted-d01fa5f6f9aeaf63cb6171347c2cad604e842fe1\accel.cpp(102) : error C2065: 'ID_EDIT_FIND' : undeclared identifier


EDIT: More or less same if compiling AVSViewer.cpp with missing header commented out.
Someone on StackOverFlow, says can replace afxres.h with windows.h if not using MFC.

shekh
28th June 2016, 16:00
Can it read Stack16 (http://avisynth.nl/index.php/Stack16)? That would be handy for importing high bit depth Avisynth.

I was thinking of it.
Best option right now is to add "b64a" output to Avisynth, as I already handle it.
What else is possible?
If its possible to automatically identify Avisynth output as stack16, I will add it (especially if it is rgb).
Handling yuv would need a lot of supporting code which I dont want to implement right now.

shekh
28th June 2016, 16:04
Seems that afxres.h is not included with Express versions and so plugin cannot be compiled under VS 2008 Express.

This is result of hacky porting. Original source was a mess of resource files.
The only reason afxres is included is to have 5 ids like ID_FILE_NEW, better to just redefine them in resource.h.

shekh
28th June 2016, 16:19
Tried copy plugin to vdub 1.10.4 plugins32, no crash (does not appear anywhere, presume its not supposed to).


It should display an error like "plugin requires newer api".


Can you remove the initial posted plugin link, you dont want people downloading that.


In fact it points to a new download too :)


Also, you perhaps want to shout a bit louder about your having added Vapoursynth script handling, I'm sure some will love that.


There is not much handling except python syntax which colorizes comments. Vpy support now is a pleceholder for someone else to take care of :)


One very small thing, in "Open With"...


I think these shell associations are created by some installers?
I am not sure the code is in VirtualDub.

StainlessS
28th June 2016, 16:47
I did copy/paste of FILE and EDIT id's from afxres.h into resource.h,
comment out include of afxres.h in both cpp files (no need to add include for windows.h).

Resource.h has another include of afxres.h, commented out.
resource.rc had another include, commented out, but then other problems,


2>Compiling resources...
2>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
2>Copyright (C) Microsoft Corporation. All rights reserved.
2>.\resource.rc(20) : error RC2144 : PRIMARY LANGUAGE ID not a number
2>.\resource.rc(55) : error RC2135 : file not found: 3
2>.\resource.rc(56) : error RC2135 : file not found: 4
2>.\resource.rc(57) : error RC2135 : file not found: 5
2>.\resource.rc(66) : error RC2135 : file not found: 6
2>.\resource.rc(73) : error RC2135 : file not found: 7


Gave up at this point.

It should display an error like "plugin requires newer api".
Nope, nothing.

In fact it points to a new download too
Smart arse :)

Vpy support now is a placeholder for someone else to take care of
I'm quite sure that will happen, not so difficult when a plugin :)

I think these shell associations are created by some installers?
I am not sure the code is in VirtualDub.

What you said there gave me a clue, when you run VD first time on new system, it asks acceptance of license or something,
before continuing. Bet it's done at that stage.


Dont think that there is any way to tell Stack16 format.
[EDIT: perhaps statistically fewer set bits in low byte].

shekh
28th June 2016, 16:52
update from git, I just fixed it.

Note that there are project configurations for plugin and for standalone exe.
exe is convenient for testing features which do not interact with VirtualDub. Or maybe it can be useful for something?

StainlessS
28th June 2016, 17:18
It's a long time since I installed Vdub, If I remember correctly, the VirtualDub.exe IS THE INSTALLER, and extracts
other stuff from inside itself. (I for years just copy a folder for ALL non-install programs, I can do a
new OS setup and copy my NON-INSTALL folder to C:\ and copy the shortcuts folder into Start Menu\Programs\NON-INSTALL\
so can install all my non-install programs [at least 100], with minimum effort, and hotkeys installed too).

Did registry search on "www.virtualdub-fr.org", and found this (only place in entire registry, except the copy of Current User)

HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache\

C:\NON-INSTALL\VDUB\VDUB_MOD\VirtualDubMod REG_SZ www.virtualdub-fr.org


EDIT: Both copies of VD original and your version are there too with their directories (but same name VirtualDub),
so somewhere in VD source there is a string "VirtualDub" that is installed to that location.

I'll see if I can find the "www.virtualdub-fr.org" in vdmod source.

EDIT: Here all places in vdmod source that have that string ("www.virtualdub-fr.org").

Setup.rc
Changes.txt
VirtualDub.rc
Init.cpp
projectui.cpp
credits_mod.h
Changes_MOD.txt


EDIT: OK, got it sorted, using below "
Install_VDUB_ShellNoRoam.reg"

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]
"C:\\NON-INSTALL\\VDUB\\VDUB_MOD\\VirtualDubMod.exe"="www.virtualdub-fr.org"
"C:\\NON-INSTALL\\VDUB\\VDUB_PLAIN\\VirtualDub.exe"="VirtualDub"
"C:\\NON-INSTALL\\VDUB\\VDUB_DEEP\\VirtualDubDEEP.exe"="VirtualDubDEEP"


So I can install and use now without too much of a problem.

EDIT: Obviously the path to the executables above is for my system only (ie, "C:\\NON-INSTALL\\VDUB\\VDUB_MOD\\" etc)
Above double slashes are totally necessary for the .reg file (real path are only single backslash).

StainlessS
29th June 2016, 01:14
I tried to compile new source from Sourceforge, failed on resource.rc, #include "winres.h".

Winres.h not included in "Windows SDK for Windows 7 with DotNet 3.5 SP1" (one I'm using with vs 2008 Exp).

So had a look at SDK I'm using for VS6(I had copy in VS6 include/mfc but wanted Express only access) and Toolkit 2003,
ie "Windows Server 2003 R2 Platform SDK"
(ISO:- http://download.cnet.com/Windows-Server-2003-R2-Platform-SDK-ISO-Download/3000-10248_4-10731094.html?tag=untagged)
[EDIT: Mar 2006 Last SDK for VS6, despite some saying last is May 2005: See note 9 on wikipedia below
https://en.wikipedia.org/wiki/Microsoft_Windows_SDK#cite_note-9 ]

and that has required header file in include\mfc. [EDIT: Need add that path to include 's]

Compiled debug, and ran scripted.vdplugin OK.

I dont usually do any multi-solution projects (or whatever you call them), but spent some time creating Release project
and copied over a few things from the debug project (probably not all of below is necessary).

Scintilla:-
C/C++/General/Additional Include Directories/ include;lexlib;src
C/C++/Preprocessor/Preprocessor definitions/ WIN32;NDEBUG;_LIB;SCI_LEXER;STATIC_BUILD;_CRT_SECURE_NO_WARNINGS;NO_CXX11_REGEX
Librarian/General/Additional Dependencies/ imm32.lib

Scripted:-
General/Configuration Type/ Dynamic Library(.dll)
C/C++/General/Additional Include Directories/ scintilla\include,VirtualDub
C/C++/Preprocessor/Preprocessor definitions/ WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;PLUGIN
C/C++/Code Generation/Runtime Library/ Multi-threaded (/MT)
Linker/General/Outfile/ $(OutDir)\$(ProjectName).vdplugin
Linker/Input/Additional Dependencies/ comctl32.lib
Linker/Input/Module Definition File/ scripted.def
Linker/System/Subsystem/ Windows (/SUBSYSTEM:WINDOWS)
Linker/Advanced/Target Machine/ MachineX86 (/MACHINE:X86)

Above for those that wanna take a crack at building non debug version plugin.

EDIT: Its lovely not having to exit VDMod and start up VD Official just to run Video Analysis pass,
me loves this, congrats on job well done, and appreciated so very much. http://www.cosgan.de/images/smilie/musik/h025.gif

raffriff42
29th June 2016, 04:52
I was thinking of it ...If its possible to automatically identify Avisynth output as stack16, I will add it (especially if it is rgb).Ah, identifying stack16, that's gonna be a problem. I think it might be better to let the user decide, by setting a "stack16" mode that assumes all incoming video is stack16; it should be persistent, not per-file, so that drag-and-drop can work without a popup dialog.

Handling yuv would need a lot of supporting code which I dont want to implement right now.No need to: stack16 is just a way to transport 16 bits-per-channel over an 8 (or 10) bit path (ie, VfW and DirectShow). It's color format neutral.

Thanks for your good work, VirtualDub FilterMod (http://sourceforge.net/projects/vdfiltermod/) is the best VirtualDub ever.

EDIT "unstack" filter, good idea vvvv

shekh
29th June 2016, 12:30
If stack16 has no special metadata the best thing I can think of is to add stack16 to "alias format filter", or make another "unstack" filter exactly for this. Filter is good explicit way to express the intent and control it.
I`d like to hear who actually wants to use this and for what (simply transferring from avs to ffmpeg?)
My own interest would be to study various denoising filters (in some future).

---------------

Thanks for appreciation. My fork is still ridiculously hard to find and the download rate on sourceforge is vanishing.
I wish I could stick a link onto official vd sourceforge :)

btw would it be appropriate to move part of this thread related to avs editor to Avisynth development subforum?

StainlessS
29th June 2016, 14:06
btw would it be appropriate to move part of this thread related to avs editor to Avisynth development subforum?

Perhaps if you feel it needs that and you want to keep your thread cleaner.

I have posted a notice in New Plugins & Utilities thread in AVS Usage, it should get some attention there as that thread is tracked by many forums and some kind of auto generated RSS or Special Interest feeds (not sure what they are called).

EDIT: Here's the link to New Plugins & Utilities:- http://forum.doom9.org/showthread.php?p=1772115#post1772115
PM me with link if your want me to change link to ScriptEd, to somewhere else (eg 1st post of this thread if you put link there).

LigH
30th June 2016, 15:29
Updated
https://drive.google.com/open?id=0B8BT09xR2LmaNktsVERYcTN0NE0

Hmm, strange; did I miss any intermediate files?

I unpacked VirtualDub.exe and plugins32 over a 32b pack 37200. Started VirtualDub.exe on Windows 7 SP1 Ult. 64b ger. Process stays in the background, does not show a visible window. Need a task manager to kill the process.

I unpacked Veedub64.exe and plugins64 over a 64b pack 37201. Started Veedub64.exe on Windows 7 SP1 Ult. 64b ger. Process stays in the background, does not show a visible window. Need a task manager to kill the process.

StainlessS
30th June 2016, 17:16
Works fine here, and just re-downloaded from your given link above.

I just ran it as it came, without any additional files from original VD in directory.

EDIT: XP32 SP3.

shekh
30th June 2016, 17:32
Hmm, strange; did I miss any intermediate files?

I unpacked VirtualDub.exe and plugins32 over a 32b pack 37200. Started VirtualDub.exe on Windows 7 SP1 Ult. 64b ger. Process stays in the background, does not show a visible window. Need a task manager to kill the process.

I unpacked Veedub64.exe and plugins64 over a 64b pack 37201. Started Veedub64.exe on Windows 7 SP1 Ult. 64b ger. Process stays in the background, does not show a visible window. Need a task manager to kill the process.

This is strange. What if you isolate
1) just VirtualDub.exe without any plugins?
2) just VirtualDub.exe and scripted.vdplugin?

StainlessS
30th June 2016, 18:06
And also try without the scripted.vdplugin.

shekh
30th June 2016, 18:15
Trial version is over, pushing release 11.

Additional fixes: hide editor when leaving main ui, handle "goto frame" in filters preview, fix broken menus in x64 version.

wiseant
1st July 2016, 01:51
@shekh

Hi

I am using Windows 7 Home Premium SP1 32 bit

You first modification, vd_edit [VirtualDub.1.10.5-prerelease(build 37243)] works for me, but when I choose Script Editor / Help / Avisynth Information - it crashes:



Crash details (best guess as to cause)
An out-of-bounds memory access (access Violation) occured in Module 'USER32"..
... reading adress 7365645F

Thread call stack:
Incorrect VirtualDub.vdi file (build 35491) for this version of VirtualDub -- call stack unavailable.


and the error report:


VirtualDub FilterMod crash report -- build 37243 (release)
--------------------------------------

Disassembly:
75f4bfe0: 55 push ebp
75f4bfe1: 8bec mov ebp, esp
75f4bfe3: ff7508 push dword ptr [ebp+08h]
75f4bfe6: 6a08 push 08h
75f4bfe8: ff359090fa75 push dword ptr [75fa9090]
75f4bfee: ff153011f475 call dword ptr [75f41130]
75f4bff4: 5d pop ebp
75f4bff5: c20400 ret 0004
75f4bff8: 6a01 push 01h
75f4bffa: 6aff push 0ffh
75f4bffc: 8d45fc lea eax, [ebp-04h]
75f4bfff: 50 push eax
75f4c000: 6aff push 0ffh
75f4c002: 56 push esi
75f4c003: 53 push ebx
75f4c004: e8bb290100 call 75f5e9c4
75f4c009: 85c0 test eax, eax
75f4c00b: 0f84ca250000 jz 75f4e5db
75f4c011: 8b45fc mov eax, [ebp-04h]
75f4c014: e9ab250000 jmp 75f4e5c4
75f4c019: ff75fc push dword ptr [ebp-04h]
75f4c01c: 53 push ebx
75f4c01d: ff359090fa75 push dword ptr [75fa9090]
75f4c023: ff153411f475 call dword ptr [75f41134]
75f4c029: e9ad250000 jmp 75f4e5db
75f4c02e: ffb67895fa75 push dword ptr [esi+75fa9578]
75f4c034: ff7508 push dword ptr [ebp+08h]
75f4c037: ff15b410f475 call dword ptr [75f410b4]
75f4c03d: e9d4250000 jmp 75f4e616
75f4c042: 8d041b lea eax, [ebx+ebx]
75f4c045: 50 push eax
75f4c046: e893ffffff call 75f4bfde
75f4c04b: 8906 mov [esi], eax
75f4c04d: 85c0 test eax, eax
75f4c04f: 0f85bc290100 jnz 75f5ea11
75f4c055: eb17 jmp 75f4c06e
75f4c057: 837d1c00 cmp dword ptr [ebp+1ch], 00h
75f4c05b: 7411 jz 75f4c06e
75f4c05d: 8bdf mov ebx, edi
75f4c05f: e9a0290100 jmp 75f5ea04
75f4c064: 83fffe cmp edi, 0feh
75f4c067: 7c05 jl 75f4c06e
75f4c069: 8d5001 lea edx, [eax+01h]
75f4c06c: eb07 jmp 75f4c075
75f4c06e: 33c0 xor eax, eax
75f4c070: e9d5290100 jmp 75f5ea4a
75f4c075: 8a08 mov cl, [eax] <-- FAULT
75f4c077: 40 inc eax
75f4c078: 84c9 test cl, cl
75f4c07a: 75f9 jnz 75f4c075
75f4c07c: 2bc2 sub eax, edx
75f4c07e: 8d7c0702 lea edi, [edi+eax+02h]
75f4c082: 85ff test edi, edi
75f4c084: 0f856b290100 jnz 75f5e9f5
75f4c08a: ebe2 jmp 75f4c06e
75f4c08c: 90 nop
75f4c08d: 90 nop
75f4c08e: 90 nop
75f4c08f: 90 nop
75f4c090: 90 nop
75f4c091: 8bff mov edi, edi
75f4c093: 55 push ebp
75f4c094: 8bec mov ebp, esp
75f4c096: 83ec10 sub esp, 10h
75f4c099: 8365fc00 and dword ptr [ebp-04h], 00h
75f4c09d: 56 push esi
75f4c09e: 6a01 push 01h
75f4c0a0: ff7508 push dword ptr [ebp+08h]
75f4c0a3: 8d45f0 lea eax, [ebp-10h]
75f4c0a6: 50 push eax
75f4c0a7: e816fbffff call 75f4bbc2
75f4c0ac: 85c0 test eax, eax
75f4c0ae: 0f84cab20300 jz 75f8737e
75f4c0b4: ff75f8 push dword ptr [ebp-08h]
75f4c0b7: e8bd1e0000 call 75f4df79
75f4c0bc: 8bf0 mov esi, eax
75f4c0be: 837dfc00 cmp dword ptr [ebp-04h], 00h
75f4c0c2: 7411 jz 75f4c0d5
75f4c0c4: ff75f4 push dword ptr [ebp-0ch]
75f4c0c7: 6a00 push 00h
75f4c0c9: ff359090fa75 push dword ptr [75fa9090]
75f4c0cf: ff153411f475 call dword ptr [75f41134]
75f4c0d5: 8bc6 mov eax, esi
75f4c0d7: 5e pop esi
75f4c0d8: c9 leave
75f4c0d9: c20400 ret 0004
75f4c0dc: 90 nop
75f4c0dd: 90 nop
75f4c0de: 90 nop
75f4c0df: 90 nop

Built on Anton3 on Tue Jun 21 20:23:53 2016 using compiler version 1500

Windows 6.1 (Windows 7 x86 build 7601) [Service Pack 1]
Memory status: virtual free 1945M/2048M, commit limit 4078M, physical total 2039M

EAX = 7365645f
EBX = ffffffff
ECX = 7ffb001c
EDX = 73656460
EBP = 0012ad38
ESI = ffffffff
EDI = ffffffff
ESP = 0012ad2c
EIP = 75f4c075
EFLAGS = 00210202
FPUCW = 027f
FPUTW = ffff

Crash reason: Access Violation

Crash context:
An out-of-bounds memory access (access violation) occurred in module 'USER32'...

...reading address 7365645F.

Pointer dumps:

ECX 7ffb0018: 01030000 00010000 00030002 00050004 00070006 00090008 000b000a 000d000c
ESP 0012ad28: 00000000 00000000 ffffffff 00000001 0012ad6c 75f9e7e2 00000000 7365645f
0012ad48: ffffffff 0012ad64 ffffffff 00000001 0012b2a4 0012adc0 00000000 00000000
0012ad68: 0021aa08 0012ad8c 75f9e9e4 68637461 0012ae9c 7365645f 74617263 00000000
0012ad88: ffffffff 0012ada8 75f9ea56 68637461 0012ae9c 7365645f 74617263 00000000
EBP 0012ad38: 0012ad6c 75f9e7e2 00000000 7365645f ffffffff 0012ad64 ffffffff 00000001
0012ad58: 0012b2a4 0012adc0 00000000 00000000 0021aa08 0012ad8c 75f9e9e4 68637461
0012ad78: 0012ae9c 7365645f 74617263 00000000 ffffffff 0012ada8 75f9ea56 68637461
0012ad98: 0012ae9c 7365645f 74617263 00000000 0012b2a4 6caa5160 68637461 0012ae9c

Thread call stack:
Incorrect VirtualDub.vdi file (build 35491) for this version of VirtualDub -- call stack unavailable.

-- End of report


I tried VirtualDub_pack_37200 and 37000 - they only work without the scripted.vdplugin

What is interesting about this, is when I tried to use either version with scripted.vdplugin, I got this message when I tried to delete scripted.vdplugin:


File In Use
The action can't be completed because the file is open in VirtualDub
Close the file and try again.

scripted.vdplugin
Type: VDPLUGIN file
Size: 1.98 MB
Date modified: 6/21/2016 7:24 PM




Do I need a different version of VirtualDub.vdi?

I also tried your latest version of scripted.vdplugin - same problem

Normally I use VirtualDub Version 1.10.4 build 35491 - I recall that one of the latest ffdlls sets of files would not work with this version - the one I use has

avcodec-53.dll
avformat-53.dll
avutil-51.dll
swscale-2.dll

Perhaps there is a conflict on my system with
avcodec-57.dll
avformat-57.dll
avutil-55.dll
swresample-2.dll
swscale-4.dll

Any suggestions?

TIA

LigH
1st July 2016, 07:13
SourceForge is strange. Still offers pack 37200 as "latest" although v11 (https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/version%2011/) contains pack 37277. {x86-64: +1}

VirtualDub 1.10.5-prerelease (build 37277/release) does not appear with a visible window as long as plugins32\scripted.vdplugin is present.

Veedub64 1.10.5-prerelease (build 37278/release-AMD64) does not appear with a visible window as long as plugins64\scripted.vdplugin is present. (Unpacked to a different base directory, of course.)

I hope you did not hyper-optimize your plugin, my CPU is only a Phenom-II X4 (x265 refuses to use SSE3 on it, at most SSE2).

shekh
1st July 2016, 09:53
@wiseant

"when I choose Script Editor / Help / Avisynth Information - it crashes"

This was already fixed.

"Do I need a different version of VirtualDub.vdi?"

You cannot mix and match these files, as I presented debug build without these, the crash report is missing some extra detail, thats it.
Anyway the build 37243 is pointless to debug as I made many fixes already.

"I also tried your latest version of scripted.vdplugin - same problem"

I dont understand, did you download VirtualDub_pack_37277.zip from sourceforge? Please try and report any problem again.

"Normally I use VirtualDub Version 1.10.4 build 35491 - I recall that one of the latest ffdlls sets of files would not work with this version"

I cant do a lot for legacy versions but I dont understand what is the problem you are trying to tell.
Are you using my "caching input driver" with VirtualDub 1.10.4? afaik it is compatible and you can use older or newer plugin.
caching input driver is these files:

cch_input.vdf
cch_input.ini
ffdlls\avcodec-xx.dll
ffdlls\avformat-xx.dll
ffdlls\avutil-xx.dll
ffdlls\swresample-x.dll
ffdlls\swscale-x.dll

You should move it as a whole, not just ffdlls.
What exactly happens when you try to just use latest (version 11) VirtualDub_pack_37277.zip?
What exactly happens when you try to use previous (version 10) VirtualDub_pack_37200.zip?
... and so on, please continue until you find a version that works

shekh
1st July 2016, 10:03
SourceForge is strange. Still offers pack 37200 as "latest" ...

This is expected, I did not flag it as default download because I am afraid of your report.
These questions may help to narrow down the issue
Do you have AviSynth installed? Which version? Which x64 version?
As long as you remove scripted.vdplugin, can you open any .avs?
Can you open old VDMod, open .avs and use its script editor?

"my CPU is only a Phenom-II X4"

Same as mine, but script editor does not have any optimizations anyway (there is nothing to optimize).

LigH
1st July 2016, 18:40
At least you seem to be on the right track now, the test build you sent me worked nicely. So I am confident there will be a version which can completely replace VirtualDubMod "when it's done". ;)

Meanwhile I left the office for weekend. I remember I had installed AviSynth+ 0.1 in a more or less recent pfmod build there (not the latest though, at least 2 weeks old)... At home now, I will try again to test it with one of the latest AviSynth+ builds I can find.
_

P.S.:

Here on my home PC, just installed AviSynth+ r1858-pfmod, both 32 and 64 bit versions of vdfiltermod version 11 (build 37277 / 37278) work immediately.

shekh
1st July 2016, 18:50
Fixes for problem that LigH had are on sourceforge.

Never run VDMod before. "Save as" dialog looks almost as I wanted it to..