View Full Version : VirtualDub2


Pages : [1] 2 3

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..

wiseant
1st July 2016, 20:59
@shekh

Hi

I re-downloaded VirtualDub_pack37277.zip - the scripted.vdplugin is different from the VirtualDub_pack37277.zip that I downloaded yesterday [June 30]:


C:\VirtualDub_pack_37277_old\plugins32
scripted.vdplugin
616 KB (630,784 bytes)
June 30, 2016, 8:05:02 PM


This scripted.vdplugin did not work - VirtualDub failed to open - had to close it with Task Manager


C:\VirtualDub_pack_37277\plugins32
scripted.vdplugin
614 KB (628,736 bytes)
July 01, 2016, 6:32:02 PM


This scripted.vdplugin does work on my system.

Thank you!

StainlessS
10th July 2016, 14:26
Getting an alert box on startup, "Module Failed to load correctly ... plugins32\ffdlls\avutil-55.dll".

Everything else cleared from plugins32 before copying all plugin32 stuff from VirtualDub_pack_37277\plugins32.


XP32 SP3

EDIT: I did get some kind of memory leak alert for colortools, in Debugview (old version of VDFM), but gone now in new version.

shekh
10th July 2016, 14:41
Getting an alert box on startup, "Module Failed to load correctly ... plugins32\ffdlls\avutil-55.dll".

Everything else cleared from plugins32 before copying all plugin32 stuff from VirtualDub_pack_37277\plugins32.


could be a problem with ffmpeg
can you try this ffmpeg build (run ffplay on some movie)
https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20160428-git-78baa45-win32-shared.7z

or any more recent build?

Groucho2004
10th July 2016, 15:16
XP32 SP3
Use a static build. The last (stable) one supported on XP is 3.0 (https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-3.0-win32-static.7z)

StainlessS
10th July 2016, 15:57
Thanks guys.
Linked by Groucho2004 ffplay worked fine, Shekh linked "the procedure entry point _wfopen_s could not be located in dynamic link library msvcrt.dll".
I tried to just move the ffdlls directory somewhere else, and it still throws up the error.
Is there some other way to disable use of that dll (not bothered about ffmpeg stuff, I found that it tended to interfere with ffmpeg proper anyway).

manolito
10th July 2016, 16:06
FWIW there is a patch at the Zeranoe forum which makes the latest FFmpeg versions work under XP. It is a simple search and replace patch, wfopen_s is changed to wfopen.
https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=13&t=3572


Cheers
manolito

StainlessS
10th July 2016, 16:29
Thank you Manolito, very interesting, gonna give it a try.

Does VirtualDub FilterMod use system installed 'standard' ffmpeg, I have to have "FFInputDriver.vdplugin" in plugins32 for it to use those dll's in
standard VD (ie avsutil-55.dll etc).

shekh
10th July 2016, 17:00
Thank you Manolito, very interesting, gonna give it a try.

Does VirtualDub FilterMod use system installed 'standard' ffmpeg, I have to have "FFInputDriver.vdplugin" in plugins32 for it to use those dll's in
standard VD (ie avsutil-55.dll etc).

FilterMod includes cch_input.vdf (caching input driver) if you don't want it remove this file along with ffdlls directory.

"FFInputDriver.vdplugin" why you need it?

shekh
10th July 2016, 18:26
EDIT: I did get some kind of memory leak alert for colortools, in Debugview (old version of VDFM), but gone now in new version.

Thanks for alert but this is too vague.
How did you get the message, did you compile debug build of VirtualDub?
Which old version?
What I can find in commit history, there were fixes to some memory leaks in may.

Reel.Deel
10th July 2016, 18:45
Shekh, any thoughts on incorporating APNG from this mod: http://vdubapngmod.sourceforge.net/

shekh
10th July 2016, 18:55
Shekh, any thoughts on incorporating APNG from this mod: http://vdubapngmod.sourceforge.net/

My thoughts were "lets see if somebody ask" :)
Are you using it? What you do with apng's?

Reel.Deel
10th July 2016, 18:58
My thoughts were "lets see if somebody ask" :)
Are you using it? What you do with apng's?

Yes I use it from time to time. Here's one I made for the AviSynth wiki: http://avisynth.nl/index.php/ChannelMixer#Examples

StainlessS
10th July 2016, 20:40
FilterMod includes cch_input.vdf (caching input driver) if you don't want it remove this file along with ffdlls directory.

"FFInputDriver.vdplugin" why you need it?
FFInputDriver.vdplugin was just some kind of video source plugin, I did not use it at all and removed it from plugin32,
(It used to [I think] conflict with Avisynth FFMpegSource, they changed each others path/path search order, or something like that).

I'll remove cch_Input thing.

I did not keep any record of the error message captured by DebugView, from vd_edit.zip with files internally dated 28/6/2016.
I had not gotten around to install the latest VDFM, so thought it might have been fixed there.

I'll re-install the one that gave the error message and see if I can get it to repeat the message.

StainlessS
10th July 2016, 20:53
Here memory leak messages,


00000012 20:46:48.359 Verifying class: FrameSubset
00000013 20:46:48.375 Plugins: Attempting to load "C:\Z\plugins\clrtools.vdf"
00000014 20:46:48.375 Plugins: Unloading module "C:\Z\plugins\clrtools.vdf"
00000015 20:46:48.375 Plugins: Attempting to load "C:\Z\plugins32\scripted.vdplugin"
00000016 20:46:48.562 RemoveDirt 0.9
00000017 20:46:48.640 SSETools 0.1
00000018 20:46:48.750 FFMS2 avs plugin: Initializing...
00000019 20:46:49.484 Plugins: Unloading module "C:\Z\plugins32\scripted.vdplugin"
00000020 20:46:49.656 RemoveDirt 0.9
00000021 20:46:49.734 SSETools 0.1
00000022 20:46:49.843 FFMS2 avs plugin: Initializing...
00000023 20:46:54.984 RemoveDirt 0.9
00000024 20:46:55.062 SSETools 0.1
00000025 20:46:55.656 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000026 20:46:55.656 VideoDisplay: Using DirectDraw offscreen surface for 508x379 RGB888 display.
00000027 20:46:55.671 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000028 20:46:55.671 VideoDisplay: Using DirectDraw offscreen surface for 508x379 RGB888 display.
00000029 20:47:23.687 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000030 20:47:23.687 VideoDisplay: Using DirectDraw offscreen surface for 360x570 XRGB8888 display.
00000031 20:47:34.593 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000032 20:47:34.593 VideoDisplay: Using DirectDraw offscreen surface for 1x1 XRGB8888 display.
00000033 20:47:34.593 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000034 20:47:34.593 VideoDisplay: Using DirectDraw offscreen surface for 1x1 XRGB8888 display.
00000035 20:47:34.609 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000036 20:47:34.609 VideoDisplay: Using DirectDraw offscreen surface for 508x379 RGB888 display.
00000037 20:47:34.609 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000038 20:47:34.609 VideoDisplay: Using DirectDraw offscreen surface for 360x570 XRGB8888 display.
00000039 20:47:44.343 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000040 20:47:44.343 VideoDisplay: Using DirectDraw offscreen surface for 508x379 RGB888 display.
00000041 20:47:44.343 VideoDisplay/DirectDraw: Display is 32-bit xRGB (8-8-8-8).
00000042 20:47:44.359 VideoDisplay: Using DirectDraw offscreen surface for 360x570 XRGB8888 display.
00000043 20:47:48.187 Plugins: Unloading module "C:\Z\plugins\clrtools.vdf"
00000046 20:47:48.218 ===== MEMORY LEAKS DETECTED =====
00000049 20:47:48.390 Primary leaks:
00000052 20:47:48.390 Secondary leaks:
00000054 20:47:48.390 #3143 018B8BB8 ( 12 bytes)
00000055 20:47:48.390 #2657 018B9358 ( 12 bytes)
00000056 20:47:48.390 #3142 018B9AF0 ( 60 bytes) Allocator: 007D5975
00000057 20:47:48.390 #3148 018C70B8 ( 208 bytes) Allocator: 0092237B
00000058 20:47:48.390 #2662 018C7320 ( 208 bytes) Allocator: 0092237B
00000059 20:47:48.390 #2656 018C81F0 ( 60 bytes) Allocator: 007D5975
00000060 20:47:48.390 #2663 04DD0040 ( 820843 bytes) Allocator: 00B573F9
00000061 20:47:48.390 #3149 04EA0040 ( 820843 bytes) Allocator: 00B573F9
00000063 20:47:48.390 End of leak dump.


Looks like its color Tools v1.4 that has the memory leaks, and presumably debugging switched off in the latest VDFM on SourceForge.

shekh
10th July 2016, 20:55
FFInputDriver.vdplugin was just some kind of video source plugin, I did not use it at all and removed it from plugin32,
(It used to [I think] conflict with Avisynth FFMpegSource, they changed each others path/path search order, or something like that).


Yes it is possible to have conflict if FFMpegSource uses shared ffmpeg too.

shekh
10th July 2016, 21:01
Here memory leak messages,
Looks like its color Tools v1.4 that has the memory leaks, and presumably debugging switched off in the latest VDFM on SourceForge.

Wow, serious leaks, nice catch.
What you do step by step, from starting VD to exit?
ColorTools is unrelated (it does not share memory with VD anyway), the leaks belong to VD.

StainlessS
10th July 2016, 21:15
All I did was load a single frame clip in AVS script [loaded into Avisynth using ImageSource() from jpeg],
Added Colortools filter in VD, played single frame clip with histogram showing (only change to defaults in Colortools
was I ticked the "Accumulate across frames" box [but only one frame source]).
Then play 1 frame clip, then close VDFM.
Up pops error messages in DebugView from System Internals (Microsoft).

shekh
12th July 2016, 22:22
interesting :)

https://trac.ffmpeg.org/ticket/5657

shekh
13th July 2016, 22:28
Leak reported by StainlessS fixed, I reuploaded binaries.
Looks like epic threading race, at least as old as output pane.

StainlessS
14th July 2016, 17:16
OOOooooh, lovely :)

shekh
16th July 2016, 11:25
FWIW there is a patch at the Zeranoe forum which makes the latest FFmpeg versions work under XP. It is a simple search and replace patch, wfopen_s is changed to wfopen.
https://ffmpeg.zeranoe.com/forum/viewtopic.php?f=13&t=3572


Cheers
manolito

The path may seem to solve local problem but this is very ugly patch.
There is no need to replace wfopen_s with wfopen, you can replace it with all zeroes because the function will not work anyway.


FILE *_wfopen(
const wchar_t *filename,
const wchar_t *mode
);

errno_t _wfopen_s(
FILE** pFile,
const wchar_t *filename,
const wchar_t *mode
);

raffriff42
17th July 2016, 17:44
Hi shekh, my File/Export submenu goes away (Export has no [>] showing an expandable menu) after I close a source file and reopen the same file or another one. The commands themselves still work if they have hotkeys assigned, but I can't select them from the menu.

EDIT VirtualDub 1.10.4 does not do this, and I'm pretty sure a previous version of VirtualDub FilterMod (earlier than build 37200, the oldest one I have on hand) did not do it either.

shekh
17th July 2016, 18:13
Thanks, I already have it fixed in source code. Before I upload new binaries the workaround is to enter and exit "capture avi".

Done.

shekh
23rd July 2016, 21:43
New version has different build of "caching input driver" with reduced ffmpeg and is XP compatible. Also it is now single module without ffdlls dependency.
However maybe it lost support of some fancy formats, let me know if something should be added back.
I used this config to build ffmpeg

--enable-gmp
--enable-libmp3lame
--enable-libopus
--enable-libvorbis
--enable-libvpx


And APNG support was merged with help of APNG Mod author.
Enjoy :)

StainlessS
24th July 2016, 01:00
Thank you kind sir :)

raffriff42
24th July 2016, 14:19
...APNG support was merged with help of APNG Mod author. Loading an APNG (via drag and drop; sources from APNG Mod and from ffmpeg), I see the first frame only.
EDIT Build 37341 = all good.

Also, a problem with the built-in Resize filter - it previews OK, but output is frozen.

shekh
24th July 2016, 19:34
The latest build is 37341 which includes APNG support
"Error: no information available" is the old VD behavior before latest version, it had no dialog to display for image.

Checked resize: everything seems ok. If you can repeat it I need more detail: preferences (maybe registry export), source file, filter settings.
Did you press "disable output pane" hotkey?

p.s.
Found some trouble with dx9 display in latest version, considered broken.

raffriff42
24th July 2016, 22:20
Disabling 3D filter acceleration (VDXA) did the trick (Preferences/3D Acceleration)
A video driver issue? (I have NVidia, 365.19, 2016-05)

shekh
24th July 2016, 22:57
Disabling 3D filter acceleration (VDXA) did the trick (Preferences/3D Acceleration)
A video driver issue? (I have NVidia, 365.19, 2016-05)

Now I can repeat it. Looks like something changed in the program, not driver.

Reel.Deel
25th July 2016, 13:22
And APNG support was merged with help of APNG Mod author.
Enjoy :)

Thanks :)

shekh
25th July 2016, 20:56
Disabling 3D filter acceleration (VDXA) did the trick (Preferences/3D Acceleration)
A video driver issue? (I have NVidia, 365.19, 2016-05)

Uploaded build 37357

* fixed dx9 display bug
* fixed VDXA (was broken since version 7)

Thanks raffriff42 for report!

18fps
29th July 2016, 08:19
Thanks for this program! I love the fact that I can open a tiff sequence.
Would it by possible to add support also for dpx format (already supported by ffmpeg, as one of the -image2 image formats)?

shekh
29th July 2016, 11:21
Thanks for this program! I love the fact that I can open a tiff sequence.
Would it by possible to add support also for dpx format (already supported by ffmpeg, as one of the -image2 image formats)?

Do you mean opening or saving?
Opening should be already covered by plugin (cch_input.vdf)
If not, post image sample.

18fps
29th July 2016, 13:49
Thank you for pointing to cch_input. I had to edit the ini to add the extension, after that, it works. Very nice!

Myrsloik
3rd August 2016, 12:09
Two small details that are usually just cosmetic but still bother me:
1. Since VapourSynth reports errors the same way avisynth does you'll actually get an error message saying something like "Avisynth error!
<vapoursynth error message here>" because vdub always adds the "avisynth error" even when it's a .vpy file opened.
2. Also because I use the same interface, vdub assumes the error message string always uses the local encoding (like avisynth), this isn't true for vs which passes an utf8 string which then may or may not display correctly.

Not sure what to do about it. I guess one way would be to simply declare a new error reporting interface and try that first.

shekh
3rd August 2016, 14:09
Two small details that are usually just cosmetic but still bother me:
1. Since VapourSynth reports errors the same way avisynth does you'll actually get an error message saying something like "Avisynth error!


I can rename the message to something like "AVI handler open failure:..."


2. Also because I use the same interface, vdub assumes the error message string always uses the local encoding (like avisynth), this isn't true for vs which passes an utf8 string which then may or may not display correctly.


This is bad. Also I am not happy about error message format, would prefer something parseable like


filename.vpy(linenumber) : error bla-bla-bla


VD has very little code around avisynth, basically


extern "C" const GUID IID_IAvisynthClipInfo // {E6D6B708-124D-11D4-86F3-DB80AFD98778}
= {0xe6d6b708, 0x124d, 0x11d4, {0x86, 0xf3, 0xdb, 0x80, 0xaf, 0xd9, 0x87, 0x78}};

struct IAvisynthClipInfo : IUnknown {
virtual int __stdcall GetError(const char** ppszMessage) = 0;
virtual bool __stdcall GetParity(int n) = 0;
virtual bool __stdcall IsFieldBased() = 0;
};

...

mpAVIFile->QueryInterface(IID_IAvisynthClipInfo, (void **)&mpAvisynthClipInfo);


So if you merely clone the same interface with different GUID then I can put different names AviSynth/VapourSynth and do something about character encodings.

May be a better idea to implement input driver based on native VS API but I dont want to do it myself.

Myrsloik
3rd August 2016, 14:22
I'm not sure you'd gain anything from native api support. You don't do prefetching and I don't think there are any relevant formats you can't already open through vfw. Am I wrong?

If not I'll just create a new interface to save some effort.

shekh
3rd August 2016, 15:07
Ok
I have no idea about new benefits, maybe I can make use of some metadata (full range etc). But this can be included in new interface too. And what is prefetching? :)

shekh
14th August 2016, 13:05
Adding "native" support for x264 encoder.

All these formats are supported: yv12, yv16, yv24, rgb (both 8 and 10 bit).
Colorspace options 601/709 and full/limited range for all yuv formats.

"Video color depth" dialog is discontinued, it never made much sense. Now there is separate "Decode format" dialog and "Output format" inside compression dialog.

https://sourceforge.net/p/vdfiltermod/wiki/compression/attachment/compression.png

Internally there is full support for 16 bit yuv formats but I dont use them for anything but output to x264 (may be expanded later).

What is x264 plugin (actually 2 plugins for each bitdepth): this is basically x264vfw from https://sourceforge.net/projects/x264vfw/ with some cosmetic changes:
VFW API is extended to support format negotiation etc.
File output is removed.
Decode support is removed.
Format conversion is disabled (handled by VD).

In fact some arbitrary vfw codec can be simply renamed as vdplugin, this may be useful to have many portable versions of same codec.

Jamaika
14th August 2016, 16:12
Thanks. Certainly come in handy for beginners.
Whining Jamaika:
Lack Rec. 2020
How is the support for above 8bit color depth and rec 2020 in the preview?
Good and it, but I preferred the appearance codec komisar.gin.by.
It could use a codec VP9vfw at youtube.
And what with support GoPro CineForm YUVA4444 / RGBA 12bit?

shekh
14th August 2016, 17:01
Thanks. Certainly come in handy for beginners.
Whining Jamaika:
Lack Rec. 2020
How is the support for above 8bit color depth and rec 2020 in the preview?
Good and it, but I preferred the appearance codec komisar.gin.by.
It could use a codec VP9vfw at youtube.
And what with support GoPro CineForm YUVA4444 / RGBA 12bit?

> Lack Rec. 2020

I think it`s better to make advanced conversion filter for stuff like this (also proper place to do all kinds of dithering). Supposedly a library like zimg already does all math.
Just a thought, I don`t plan to make it today.

> How is the support for above 8bit color depth and rec 2020 in the preview?

Are you asking to actually output high bit depth to display? I don`t have such display and don`t even think about getting one.

Komisar codec is something I considered to look into, after a while.

> It could use a codec VP9vfw at youtube

Not sure what are you talking about. Does VP9vfw exist? Do you have a link?

> And what with support GoPro CineForm YUVA4444 / RGBA 12bit?

Nothing, since it it does not support such formats with vfw codec and is closed source and devs dont even visit their own showcase forum.
Well in fact it has "enable 4444" option which will upconvert 8bit rgb to 12bit rgb. Pointless, huh?

Jamaika
14th August 2016, 19:06
Not sure what are you talking about. Does VP9vfw exist? Do you have a link?
I realize. I can dream. In the same way as the improvement in VirtualDub container AVI, which is obsolete.
It is only outdated VP8vfw but it has currently container webm.

Is this project still current?
https://sourceforge.net/projects/mpxplay/files/x265vfw/

shekh
14th August 2016, 19:43
Is this project still current?
https://sourceforge.net/projects/mpxplay/files/x265vfw/

I wrote here, will see. link (http://forum.videohelp.com/threads/361092-Are-there-any-programmer-who-can-create-vfw-directshow-based-X265-encoder?p=2456061&viewfull=1#post2456061)

b2kguga
15th August 2016, 16:53
Hi shekh

Can you explain a few things about VDub plugin api ? I wanted to know exactly what functions are called when toggle function is activated.

For example, whenever i use the toggle, if preview is enabled these routines are called (In order)

ParamProc, StartProc, RunProc

When i press again the preview (to disabled it), the function EndProc is called.

So,what are the usage and routines envolved with ? UndoSystem RedoSystem, RedoFrame ?

shekh
15th August 2016, 18:20
Did you read PluginSDK.chm? I advise reading it start to end, it has a lot of answers.

Or if you read but don`t understand something specific, ask again with more detail about your problem. Normally all you need to get started is just grab any existing plugin, so your questions are quite disappointing.

> UndoSystem

Never used it, don`t even imagine why it is needed.

b2kguga
20th August 2016, 22:58
Skeh i read it, but i´m having trouble identifying where some routines starts and ends and preview is enabled and the correct usage of RedoSystem. I mean, after using UndoSystem the program seems to start all routines again, but which functions are passed 1st ?

Sorry for the bad english, but it may be better i explain in examples.

I´m giving a try building a new version of LogoAway. So far, the rebuild is doing well. I´m doing it in assembly and debugging it also with my own assembler. One of the things i´m having difficulties to understand is that inside my ConfigDialog it have a call to the toggle function of Vdub.

Apparently it restarts he execution of other Vdub starter functions such as:
RunProc, EndProc, StartProc etc.

I wanted to know the order that these functions are called. This is because the controls i´m using needs the values to be update and, therefore, needed to reload (and destroy) old memory allocated. This is causing the dialog to flick the preview window.


Proc ConfigDlgProc:
Arguments @Adressee, @Message, @wParam, @lParam
Local @mfd, @fa
Uses ebx, esi, edi, ecx, edx

call 'USER32.GetWindowLongA' D@Adressee, &DWL_USER
mov D@mfd eax
(...)
...If D@Message = &WM_COMMAND ; User action

If D@mfd <> 0
call On_WmCommand D@Adressee, D@wParam, D@lParam, D@mfd
Else
xor eax eax
End_If
(...)EndP

; inside WM_Command the controls are used as:

(...)
...Else_If D@wParam = IDC_EDIT_LOGO_BORDER_WIDTH ; Border Size (Width)

call IFilterPreviewUndoSystem D@fa
; ImgWidth= Pos+BorderWidth
lea eax D@lpTranslated
call 'USER32.GetDlgItemInt' D@hDlg, IDC_EDIT_LOGO_BORDER_WIDTH, eax, &FALSE
(...)
call IFilterPreviewRedoSystem D@fa

...Else_If D@wParam = IDC_EDIT_LOGO_BORDER_HEIGHT
(...)
..Else_if D@wParam = IDC_BTN_SHOW_PREVIEW

call IFilterPreviewToggle D@fa, D@hBtn
xor eax eax
(...)



What is happenning is that when i set the new width or height of the logo, the preview is flickering because the plugin is restarted and the memory is allocated/deallocated.


Proc EndProc:
Arguments @fa, @ff
Uses esi, edi, ebx
(...)
; used to deallocate memory
EndP



Proc StartProc:
Arguments @fa, @ff
Local @BWidth, @BHeight, @TmpMemData, @GradientSize, @MemSize2, @MemSize3, @MemSize4, @MemSize5,
@ErrorMessage
Uses ebx, esi, edi

mov eax D@fa
mov esi D$eax+FilterActivation.filter_dataDis
(...)
; this is where to allocate the memory
EndP



Proc RunProc:
Arguments @fa, @ff
Local @ImgWidth, @WithBorderNorth, @WithBorderEast, @WithBorderSouth, @WithBorderWest, @CurSrcframe, @IsKeyFrameSet, @Counter
Uses ebx, esi, edi
(...)
; this is where the plugin actually works.
EndP


The problem is that, when activating the preview the plugin stops the execution, and starts again on EndProc (To delete the memory), StartProc (to allocate the memory again) and on Runproc (to run the previewed data)

I wanted to know the order of the functions where undosystem uses to reload.

I mnean, undosystem seems to run again on all the functions pointed by the FilterDefinition structure, but i´m not sure the order the pointers are being called once undosystem and RedoSystem are activated.



[FilterDefinition:
FilterDefinition.next: D$ &NULL
FilterDefinition.prev: D$ &NULL
FilterDefinition.module: D$ &NULL
FilterDefinition.name: D$ Sz_PluginName
FilterDefinition.desc: D$ Sz_Description
FilterDefinition.maker: D$ Sz_Author
FilterDefinition.private_data: D$ &NULL
FilterDefinition.inst_data_size: D$ Size_Of_FilterData
FilterDefinition.initProc: D$ InitProc
FilterDefinition.deinitProc: D$ 0;DeInitProc
FilterDefinition.runProc: D$ RunProc
FilterDefinition.paramProc: D$ ParamProc
FilterDefinition.ConfigProc: D$ ConfigProc
FilterDefinition.StringProc: D$ StringProc
FilterDefinition.StartProc: D$ StartProc
FilterDefinition.EndProc: D$ EndProc
FilterDefinition.script_obj: D$ VDXScriptObject
FilterDefinition.fssProc: D$ FssProc
FilterDefinition.stringProc2: D$ StringProc2
FilterDefinition.serializeProc: D$ &NULL
FilterDefinition.deserializeProc: D$ &NULL
FilterDefinition.copyProc: D$ &NULL
FilterDefinition.prefetchProc: D$ &NULL
FilterDefinition.copyProc2: D$ &NULL
FilterDefinition.prefetchProc2: D$ &NULL
FilterDefinition.eventProc: D$ &NULL
FilterDefinition.accelRunProc: D$ &NULL
FilterDefinition.mSourceCountLowMinus1: D$ &NULL
FilterDefinition.mSourceCountHighMinus1: D$ &NULL
FilterDefinition.mpStaticAboutProc: D$ &NULL
FilterDefinition.mpStaticConfigureProc: D$ &NULL]


I´m asking this because i want to avoid the flickering and the only solution i can find is making the allocation and deallocation of memory be inside RunProc function using a flag to check if we are really running the plugin or only using it on preview mode.

The documentation says that the place to allocate and deallocate memory is on StartProc and EndProc and maybe i need to do those allocs/deallocs in other places.

This is what i´ve built so far
http://i67.tinypic.com/4vqvxc.jpg

shekh
26th August 2016, 20:49
Fixed some serious bugs
and just another screenshot for completeness

https://sourceforge.net/p/vdfiltermod/wiki/compression/attachment/compression2.png

shekh
8th September 2016, 19:34
Added FFV1/Huffyuv with simple UI (luckily these codecs do not need difficult setup)
Other options in dropdown are 8 bit rgba, yuv420, yuv422, yuv444 (equal for both codecs)

https://sourceforge.net/p/vdfiltermod/wiki/compression/attachment/compression3.png

StainlessS
9th September 2016, 14:12
Ooooh, lovely :)

kolak
11th September 2016, 22:43
ffv1 got 16bit RGB mode in ffmpeg recently if I remember well.

shekh
12th September 2016, 07:19
Yes, but I am not fast at updating ffmpeg (still at 2016-04-28). Maybe will pull it before declaring this preview version done.

shekh
24th September 2016, 21:59
New version.
Among other fixes, ffmpeg-based input driver can now work with direct stream copy and smart rendering, but only with I-frame formats.
It is hard to tell generic rule, but I expect anything you can put in AVI with all keyframes should work. Actually tried direct copy with utvideo, x264, mjpeg, ffv1, huffyuv, and smart rendering with x264 and maybe something else.

StainlessS
25th September 2016, 09:45
We love this project, thank you Shekh. :thanks:

kolak
25th September 2016, 19:43
Yep!
Latest ffmepg got finally MOV edit list support which is very useful. No more unwanted frames in MOVs with edit list.
I hope this will come to plugin also at some point.

shekh
25th September 2016, 20:20
Yep!
Latest ffmepg got finally MOV edit list support which is very useful. No more unwanted frames in MOVs with edit list.
I hope this will come to plugin also at some point.

Give me a clue (and sample files) how to approach this, I will see if it is easy :)

kolak
30th September 2016, 11:06
I can prepare something.
Simplest way to do is to take any some MOV file open in QT7 on Mac or Qt7 Pro on PC, select some segment at the start and delete it. Then save this MOV (not Save As). This will add some edit metadata. If you open such a file in Qt7 you should see your adjusted start point. If you open in Vdub than it will show original start.
New ffmpeg will respect edited in point.

shekh
30th September 2016, 11:11
Then I think it already works? I saw some code int ffmpeg adjusting index etc. for edit lists.

kolak
30th September 2016, 11:14
Yes, ffmpeg has support for edit list in MOV now, so I hope this will come to Vdub source plugin also.

shekh
30th September 2016, 11:22
Can you make a timecoded video with some edits?
Btw how do you know it was added recently?

kolak
30th September 2016, 23:03
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/ca6cae73db207f17a0d5507609de12842d8f0ca3

I tested it and it does work.

I will prepare something soon.

kolak
5th October 2016, 16:30
Sorry, but I was bit busy.

Here are some files:

https://drive.google.com/file/d/0B5SgcxshyxbKT0t0U0NFd0RhVlU/view?usp=sharing

they have descriptions in the name. Main file is 10 seconds as is. Then there is one which has first 2 sec edited out, last 2 seconds edited out and 2-5sec edited out. If you open them in QT player you will see everything as they have TC and frames burned in.
Latest ffmpeg respects editing, few weeks old won't.

shekh
5th October 2016, 16:53
Everything looks fine
I built last version with 2016-09-22 FFMPEG

kolak
5th October 2016, 22:46
Great, with new ffmpeg it should.
Try old one and you will see that all edits are ignored.

v0lt
11th October 2016, 04:31
MKV(H.264+AC3). Direct copy not worked.
http://imgur.com/a/KqkSr

shekh
14th October 2016, 10:04
MKV(H.264+AC3). Direct copy not worked.
http://imgur.com/a/KqkSr

I was on vacation and could not reply, but you probably already know only I-frame video is currently supported. Btw I put all relevant info here: https://sourceforge.net/p/vdfiltermod/wiki/direct_copy/

Implementing universal support for direct copy mode is of extra low priority for me but with I-frame formats it is really simple so this is why I made it.

v0lt
19th October 2016, 10:43
I figured out after.

Do you plan to support other formats for writing? For example a plug-in that could be mixed strems to MKV with an external ffmpeg.exe.

shekh
30th December 2016, 20:48
Version 14 (https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/version%2014/)

Quick summary: completed YUV 16-bit pixel formats (supported by input and output).
https://sourceforge.net/p/vdfiltermod/wiki/format_changes/attachment/decode_format.png

Display of those formats is now faster, for example:
CFHD decoded as v210 - compared on same fragment and same pc
official VD: throughput about 32fps
FilterMod 14: throughput about 100fps
FilterMod 14, decoding as rgb24: throughput about 135fps (for reference)
(v210 is expanded to friendly YUV422P16)

StainlessS
31st December 2016, 09:00
Lovely, thanx Shekh :)

Reel.Deel
4th January 2017, 15:07
Thanks for the update shekh. Any plans on adding high bit depth support for AviSynth+ scripts?

shekh
4th January 2017, 15:36
Thanks for the update shekh. Any plans on adding high bit depth support for AviSynth+ scripts?

I dont have any todo list about it.
But there is a chance it might already work to some extent, currently accepted bitmap formats:
b64a = packed rgba 4*16-bit
BRA[64] (AV_PIX_FMT_BGRA64) = packed rgba 4*16-bit
P210 = interleaved YUV 422*10-bit
P216 = interleaved YUV 422*16-bit
Y3[10][10] (AV_PIX_FMT_YUV422P10) = planar YUV 422*10-bit
Y3[10][16] (AV_PIX_FMT_YUV422P16) = planar YUV 422*16-bit

BRA[64], P210 and Y3[10][10] actually work with MagicYUV decoder.

dipje
4th January 2017, 17:36
the AVFS utility to create virtual-avi files was changed to support the high bitdepth-support from avs+ and Vapoursynth (and it's the same utility to read .vpy or .avs files to create virtual avi files).

From what I understand from Myrsloik is that he basically merged the VFW module / support or something. So a good chance it might be working or it is a very small change.

shekh
4th January 2017, 18:10
Checked avs+ source, as far as I understand it does not support any high bitdepth with VFW output. AVFS is different piece, can`t be used to open .avs directly.

dipje
4th January 2017, 18:38
True. But if it mounts Avi files with high bitdepth formats and your vdub opens those formats, it can't be a big step I guess to make it directly so I'm guessing.
Or is there no VFW interface at all anymore in AVS+?

shekh
4th January 2017, 19:26
True. But if it mounts Avi files with high bitdepth formats and your vdub opens those formats, it can't be a big step I guess to make it directly so I'm guessing.
Or is there no VFW interface at all anymore in AVS+?

Maybe better to ask this in avs+ thread.
My best understanding:
AVS+ has VFW and native output
AVFS is using native output from AVS
VD is using VFW output from AVS

Meanwhile, it seems VapourSynth can output some compatible formats:
b64a = rgba 4*16-bit (confirmed long ago)
v210 = YUV 422*10-bit
P210 = YUV 422*10-bit
P216 = YUV 422*16-bit

Myrsloik
7th January 2017, 22:36
Maybe better to ask this in avs+ thread.
My best understanding:
AVS+ has VFW and native output
AVFS is using native output from AVS
VD is using VFW output from AVS

Meanwhile, it seems VapourSynth can output some compatible formats:
b64a = rgba 4*16-bit (confirmed long ago)
v210 = YUV 422*10-bit
P210 = YUV 422*10-bit
P216 = YUV 422*16-bit

The output formats I support in both vsvfw and avfs (if you use avs+ with the vapoursynth version of avfs you can also output most of these formats):
b64a
YUY2
YV12
Y800
YV24
YV16
Y41B (may be buggy, still investigating)
YVU9 (not really tested either)
P010
P016
v210
P210
P216
Y416 (in a debate with madvr author and nevcairiel about the actual component order, I think I'm right though)

Which ones do you support for input?

shekh
7th January 2017, 23:03
for input:
I am not sure about old 8-bit formats, have to look in source.
If in doubt it is here: https://github.com/shekh/VirtualDub2/blob/master/src/Riza/source/bitmap.cpp

fourcc formats:
YUVY
YUYV
YUY2
YV24
YV16
YV12
I420
IYUV
YVU9
Y8[32][32] (same as Y800)
Y800
v210
P216
P210
Y3[10][10] (AV_PIX_FMT_YUV422P10)
Y3[10][16] (AV_PIX_FMT_YUV422P16)
Y416
HDYC
NV12
b64a
BRA[64] (AV_PIX_FMT_BGRA64)

those in bold intersect with your list

most of it also works for output, with exception of P210,P216

Myrsloik
7th January 2017, 23:16
Then I request Y416 support for input. That could come in handy later when I test things.

shekh
7th January 2017, 23:24
Then I request Y416 support for input. That could come in handy later when I test things.

Yes, I was thinking of it.

shekh
8th January 2017, 22:22
Then I request Y416 support for input. That could come in handy later when I test things.


in a debate with madvr author and nevcairiel about the actual component order, I think I'm right though

I implemented as in MS spec, and the picture looks correct :)
Current implementation does some not very optimized repacking to convert it to YUV444P16 and drops alpha completely. I assume you don`t expect alpha anyway?

Myrsloik
8th January 2017, 22:36
I implemented as in MS spec, and the picture looks correct :)
Current implementation does some not very optimized repacking to convert it to YUV444P16 and drops alpha completely. I assume you don`t expect alpha anyway?

I never return alpha. Mostly because nobody's requested it.

dipje
8th January 2017, 23:43
@Myrsloik: But in the b64a data I get back from Vapoursynth / AVFS I have to tell After Effects to ignore the alpha channel, otherwise everything is 100% transparent. Is this just random what it's filled with or do you write some filler data somewhere? If you write alpha data, is it you returning 'full transparent' or is After Effects at fault by interpreting everything as transparent? (Like I said, I can tell AE to ignore alpha, so no big issue at all!)

Myrsloik
8th January 2017, 23:46
I think I always write 0 to the alpha. This should probably be changed for some output formats like b64a...

jpsdr
11th January 2017, 00:50
Out of curiosity, is there somewhere an update of the last SDK v1.2 (an 1.2a or even more an 1.3) with this new colors formats and property ? I think i may begin to take an interest with these extended color formats for my plugins.
I was thinking is there at least a new vplugin.h with the new VDXPixmapFormat value for new color formats ?
Maybe some changes are made to the VDXPixmap ?
Otherwise, can we just assume for 10-16bits data, that all the informations on the VDXPixmap for exemple are still the same, except that it's 16 bits data pointers instead of 8 bits ?
Is RGB64 top/bottom memory reversed like the RGB32 is ? (Where first line in memory is bottom of picture, when for all others planar mode first line of memory is top of picture.)

shekh
11th January 2017, 01:15
There is no update for sdk, but since you indicate interest I will prepare something.
Right now the best I can offer is rgb_levels source code, as it implements RGB64 mode https://sourceforge.net/projects/vdfiltermod/files/plugins/rgb%20levels/version%202/

Quick summary
Unfortunately there was no chance to modify VDXPixmap without breaking compatibility (or I was not smart enough) so I had to do some workarounds to access new fields.
Basically yes, for RGB64
format = 57
pitch is doubled
data points to uint16 elements

The rules for memory layout (top or bottom) are valid only for input/output, not for filters.
In a filter you always use data+pitch*y (pitch may be positive or negative)

Also there are some metadata:
alpha_type: alpha may be flagged as present or absent per picture.
value range (ref_r etc): may be 0xFFFF for normalized 16-bit data, or something else.
For example it is 0xFF00 for P210,P216,Y416 sources and 0x03FF for Y3[10][10] sources.
These values are also variable per frame.
A filter may request normalized input for simplicity, to always deal with 0xFFFF.

jpsdr
11th January 2017, 10:00
There is no update for sdk, but since you indicate interest I will prepare something.

Thanks, but take your time, absolutely no rush.
The first and "only" thing i may need in the begining are just the new several values for the new colors format.
As there is 5 new color formats, it means there is 20 new VDXPixmapFormat values (5 x (Rec.709/601 + Full/Limited).

No, error...
RGBA64 has only one value.
4:2:2-10, 4:2:2-16 and 4:4:4-16 have 4 values (Rec.709/601 + Full/Limited).
4:2:0-16 has 16 values (Rec.709/601 + Full/Limited)x("nothing"/i/it/ib)
Resulting in 1+3x4+16=29 new values.

Edit :
I take a more deep look, it seems that you've added even more color data format (like NV12, I8, etc...). So, finaly, the first thing needed may be the list of all these new values. But again, take time, no rush.
It's something i'm just begining to thought about, so taking thinks quietly.
And not touching VDXPixmap may indeed be a good safe thing.

shekh
11th January 2017, 10:50
It is easy to find by yourself, look here https://github.com/shekh/VirtualDub2/tree/master/src/h/vd2/plugin


kPixFormat_XRGB64 = 57,
kPixFormat_YUV444_Planar16 = 58,
kPixFormat_YUV422_Planar16 = 59,
kPixFormat_YUV420_Planar16 = 60,
kPixFormat_Y16 = 61,
kPixFormat_XYUV64 = 62,


I wanted to stop format explosion, so only 1 format for all colorspaces. Colorspace matrix/range identifiers are attached as metadata to Pixmap.
These are not expected to vary per-frame, and I have no clear plan how to communicate with filter about them. Open for ideas.

edit:
not all formats are meant for filter processing.
Currently only
kPixFormat_XRGB64
kPixFormat_YUV444_Planar16
kPixFormat_YUV422_Planar16
kPixFormat_YUV420_Planar16

edit:
NV12, I8, etc were set before me.

jpsdr
11th January 2017, 11:30
Unfortunately it seems you can provide this only with VDXPixmapFormat, so you can't avoid the format explosion for a simple solution.
Otherwise, it seems it involves complex and high risk modifications in VDXFilterActivation or others things like this to be able to provide your FilterModPixmapInfo data to the filter.

It's the easy, and mosf of it, the 100% safe way.

shekh
11th January 2017, 12:44
Yes as you can see in rgb_levels it has additional dll exports: VirtualdubFilterModuleInit2, FilterModModuleInit
Details of activation are hidden by c++ wrapper (VDXFrame), with plain C interface it is a bit complex. In no case it has any risk in it.

But this interface was designed with side-by-side development of official VD in mind, now as official VD RIP I think I can drop unnecessary complexity.
Even format id for kPixFormat_XRGB64 was exposed with a function (not constant), now I dropped that idea (too much trouble for nothing).

shekh
11th January 2017, 12:58
To clarify, I made extra effort to solve this problem:
possible to make single plugin binary which works
1) with all versions of FilterMod (with features enabled based on availability)
2) with backwards compatible versions of official VD (with FM features disabled)
3) with future/imaginary versions of official VD (with FM features disabled)

now (3) seems useless, and it is what creates most interface trouble.

jpsdr
11th January 2017, 14:37
I agree for now for leaving (3).
When i work on updating my plugins, i'll take a look at the code of your plugin, and probably asked you again at this time. Don't need to bother you anymore right now.

jpsdr
13th January 2017, 20:18
enum ColorSpaceMode {
kColorSpaceMode_None,
kColorSpaceMode_601,
kColorSpaceMode_709,
kColorSpaceModeCount
};

With all the UHD and bit depth stuff, i would like to suggest to add kColorSpaceMode_2020.

shekh
13th January 2017, 20:39
This can be implemented at 2 levels:
1) just a tag to carry through with conversions disabled
2) and all the conversions too

I need help where to borrow conversions to/from rgb and other spaces. Afaik 2020 is not just matrix, but also non-linear transfer which makes it important (and computationally expensive)?

dipje
13th January 2017, 21:06
As far as I see it, there is a '2020' that is possible as a regular color matrix, and another one that requires special coding that it can't be easily implemented in the same conversion routines (fmtconv in vapoursynth has a special function for it for instance).
'non constant luminance mode' (ncl) is the simpler one, and you'll encounter it more often. 'constant luminance mode' (cl) is the 'special' one.

The thing is, it's not just the colormatrix. Most 2020 stuff uses different color primaries then bt709 (although 2020ncl with bt709 does exist.. it's not _that_ weird, just not the only stuff out there).
So the correct way to change / convert color primaries is to go to RGB, then to linear RGB (gamma 1.0), convert the color primaries (from bt709 to 2020, or from bt709 to dci-p3 for example).
Then go to gamma-correct 'normal' RGB again then convert to the YUV with the colormatrix you want (or leave it RGB if that suites you).

This all is to convert the colormatrix and/or colorprimaries. The thing to remember is, this does NOT convert HDR to SDR or something. What you end up with is still all the HDR information but in a colorspace-configuration that you know from SDR times. To make the stuff watchable on SDR displays you would still have to do some kind of dynamic-range compression and / or clip some stuff out to get it watchable. I could get stuff looking pretty OK by tweaking the gamma correction but there are better ways (for example, what MadVR does to display HDR content on SDR displays).

So, colorspace conversion is one thing. HDR to SDR conversion is another. And of course stuff like the 2020 colormatrix and 2020 colorprimaries (or dci-p3 color primaries or something else) has a much wider gamut of colors available, so you will be loosing color precision / data somewhere (colors _should_ end up over saturated here and there in bt709, unless you use some smart 'desaturation' filter during the conversion.. again, like MadVR does).

jpsdr
13th January 2017, 22:38
Afaik 2020 is not just matrix, but also non-linear transfer
Hum... It seems that i read thing too quickly and not deep enough, didn't realise it wasn't a simple matrix like the other formats. Non linear is not a real issue with 8 bits using look-up table, but maybe in that case lookup-tables even of... 64k maximum may still be interesting.

shekh
13th January 2017, 23:13
But who needs it in 8 bit? Anyway, it seems the only real way is to connect code which already works (zimg?)

jpsdr
14th January 2017, 12:52
Pinterf added Rec2020 support in avs+, maybe it's also a code which can be checked.

pinterf
14th January 2017, 13:06
Pinterf added Rec2020 support in avs+, maybe it's also a code which can be checked.
Color matrix only.

shekh
14th January 2017, 13:27
So is matrix-only Rec2020 useful in practice? I am confused with transfer functions. They are defined for rec601/rec709 too, but in reality are ignored (so that rgb-yuv conversions are linear and fast).
If the same still works for ldr 2020 then it is basically a matter of adding some new constants (as in avs+)

jpsdr
14th January 2017, 13:41
I've noticed some issue with the last 64bits release.

First, video in output right part is cropped/shifted.
Is it intended ?
VirtualDub :
http://jpsdr.free.fr/XBMC/PB_VDM-3.jpg
VirtualDubMod :
http://jpsdr.free.fr/XBMC/PB_VDM-4.jpg

After, there is issues with a third-party plugin i'm using for a long time :
VirtualDub :
http://jpsdr.free.fr/XBMC/PB_VDM-1.jpg
VirtualDubMod :
http://jpsdr.free.fr/XBMC/PB_VDM-2.jpg
One issue is at least that the slider is no more... :(.
The filter is NeatVideo.

Edit : You can eventualy get the demo version here (https://www.neatvideo.com/download) on their site to check/test.

shekh
14th January 2017, 16:08
> First, video in output right part is cropped/shifted

Yes, you can pan it with mouse (by default centered).

> After, there is issues with a third-party plugin i'm using for a long time

what is the issue?
Time slider is active at the bottom.

jpsdr
14th January 2017, 16:48
All my apologies, my bad again (it's becoming quite an anoying habit), i'm very not used to all these new behaviors...
It never cames to my mind that bottom was still active when it wasn't with original (so i didn't even check), neither that right panel could be moved with mouse.
Finaly nothing wrong, so it's perfect.

LigH
17th January 2017, 09:21
In the good old VirtualDubMod, saving a screenshot of the currently displayed frame was so easy: Video » Snapshot source frame (Shift+1).

Trying the same in VDubFMod r38543 (32b) ... Video menu: No more matching entry. File menu: Export ... a submenu, that costs me precious time, unless there is a keyboard shortcut assigned; Single image ... no shortcut assigned yet, have to try to assign one later; click. Nothing happens?

Well, let's assign the shortcut. To File.SaveImage – seems valid. Test it ... nothing happens.

Let's try in VDubFMod r38544 (64b) ... pressing shortcut (was assigned for both versions, that's nice): OK, a dialog appears. Exporting a single image works. So it appears to be broken only in the 32b version.

Or is it? Trying again ... this time it works there as well?! Strange. A reliable bug could be found and fixed. But unreliable issues are the hardest. :o

StainlessS
17th January 2017, 09:28
Ligh, Menu/File/Export/Save Single Image, for current frame (choice of output formats).

EDIT: Oops sorry, you already saw that, guess I'm in a hurry to get some shut eye and just partially skim read your post.

EDIT: REading a bit more in full
Or is it? Trying again
I think that used to be a problem in earlier versions, thought it got fixed (I'm on 32 bit build 20160407164938).

EDIT:
I've never had that problem for some time, but only just updated to VirtualDub_Pack_38543, I'll keep my eyes open for that problem
re-appearing (used Save Single Image about a half dozen times throughout the night in previous version, no problems).

LigH
17th January 2017, 09:31
Yes. As I wrote, it's in a submenu, so navigating the mouse cursor through it takes a lot of time, unless I assign a keyboard shortcut. Please read it again completely, there is more about it.

shekh
17th January 2017, 11:36
Yes. As I wrote, it's in a submenu, so navigating the mouse cursor through it takes a lot of time, unless I assign a keyboard shortcut. Please read it again completely, there is more about it.

Yes it is supposed to have a shortcut, since it is also accessible from filter preview and there is no menu.
The logic behind File->Export structure is because Image sequence is also there (and it is very similar).

The bug when it suddenly does not work still exists in all versions and is old, btw in the same situation "copy to clipboard" command gets disabled too.

jpsdr
17th January 2017, 13:09
Minor issue i've noticed :
In View->Pane Layout if you select "Auto Size panes" when it's not it's done immediatly. But unselect it has no effect. You have to close VDubMod and restart it unselected to remove the "Auto Size".
And... it's also the case in the original version... Well, i think it's up to you to chose if it's worth fixing or not.

shekh
17th January 2017, 13:16
And what do you think it should do? Instead you can begin changing zoom right away.

jpsdr
17th January 2017, 17:55
I thought it should go back to what it was previously, but, it's just my thought.

StainlessS
17th January 2017, 21:59
Request for change back to VD standard behaviour:

Dont like that VDFM drops display of frames [EDIT: contents] whilst user stepping through the timeline via keyboard [EDIT: right cursor key], you have to stop timeline traversal to see the current frame. (I can see that it is quicker to not display frames during such time, but not if you have to stop to view every frame).

EDIT: Perhaps its an option, if so then make it (standard mode) default.
EDIT: Only happens in heavy filtering scripts that do not play anywhere near real time.

shekh
17th January 2017, 22:55
Request for change back to VD standard behaviour:

Dont like that VDFM drops display of frames whilst user stepping through the timeline via keyboard, you have to stop timeline
traversal to see the current frame. (I can see that it is quicker to not display frames during such time, but not if you have to stop to view every frame).

EDIT: Perhaps its an option, if so then make it (standard mode) default.

Definitely not (planned) behavior. IMO step keys are exactly for viewing each frame, no reason to make it quicker.
So this is a defect (in my test it is even worse with old VD)

StainlessS
17th January 2017, 23:14
In actual fact I was wrong in what I said in PM to Shekh.

This script exhibits different behaviour in all three, VD 1.10.4, VDMod 1.5.10.3, and VirtualDubFilterMod.

Colorbars.Killaudio.ShowFrameNumber
GSCript("""
Function paws() {
x=0
for(n=1,1000000) { # EDIT: Changed 0 to 1 in Blue
x=x+1
}
return x
}
""")
SSS="""
Return Last.Subtitle(string(Paws()+current_frame))
"""
Return Last.ScriptClip(SSS)


EDIT: when press and hold Right cursor key:-

VD standard does not update either frame contents nor frame number/time on timeline.
VDMod, updates frame contents but not timeline frame number/time.
VDFM, updates timeline frame numbers/time, but not contents.

I'm happiest with current VDMod behaviour, seeing frame contents change but would like both contents and timeline numbers to update.

EDIT: Modify 1000000 to bigger number if fast machine.
EDIT: In all 3 VD apps, updates properly when cursor key finally released.

LigH
18th January 2017, 08:52
A beginner in Windows GUI programming would possibly suggest to insert Application->ProcessMessages()/DoEvents() randomly in keyboard event handlers until it works... ;)

But times of "cooperative multitasking" (where threads deliberately idle for others) are probably over.

StainlessS
19th January 2017, 10:22
But times of "cooperative multitasking" (where threads deliberately idle for others) are probably over.

A simple Visual Basic program consisting of a forever loop without any DoEvents() used to bring the entire machine almost to its knees in W2K, wonder if W7, W8.1 W10 still have issues, I'm guessin YES. Windoze has always required cooperation irrespective of whatever M$ has pretended.
(EDIT: that was on a UniProcessor system, never tried on MultiProcessor sys)

LigH
19th January 2017, 11:24
Windows will still use time slices to schedule several tasks per core. And tight loops will probably still hog at least one core to a point where the task scheduler itself hardly gets a slice, despite several priority classes. But hogging a multi-core system to death should be quite improbable now, as long as you don't fill it with real-time class threads.

I would not be surprised about CPU features supporting task scheduling and thread switching in OS kernels, which are now superior to those in times of CPUs with only (80)x86 numbers as name; I just couldn't point at them, not knowing specific names. Cooperative multitasking may not be "necessary to survive" anymore; but I guess it can still support fluid interaction.

StainlessS
19th January 2017, 11:31
I just tried to knock up a VB exe with forever loop, and tried on Multi-Processor system Duel core, 50% CPU hogged on one processor, no seize up problems encountered.
Tried on single physical core P4 with hyper-threading, 50% CPU on one logical core, no seize up.
Tried on P4 with single physical CPU and no hyper-threading, 100% CPU used and again no seizure experienced.
Both P4's used were even over VNC (no monitors nor keyboards attached), and no problems experienced.
Bit of a surprise that we had no problems at all, guess I was totally wrong (all 3 systems XP, so W7+ probably also ok).

EDIT: Just did a reboot, and got alert saying that could not shut down Project1.exe, so I force closed it.
I had forgotten to kill the VB exe after using VNC on P4's (had let it continue whilst using VNC). it was
no problem at all to the point that I forgot that it was running.

LigH
19th January 2017, 11:40
As suspected: user ring (3) processes may not anymore be able to suppress kernel ring (0) processes; task switching will have a superior priority. Somehow. Someone may know its name. But we should stop detrailing this forum thread...

shekh
19th January 2017, 11:43
But we still have plenty of ways to knock the system. Simple example: x64 process can infinitely allocate memory. Try it. Try to kill it.

Jamaika
29th January 2017, 12:47
I wrote here, will see. link (http://forum.videohelp.com/threads/361092-Are-there-any-programmer-who-can-create-vfw-directshow-based-X265-encoder?p=2456061&viewfull=1#post2456061)
New codec vfw X265. ;)

shekh
4th February 2017, 19:06
Uploaded new version (15)
Single-stepping refresh is also fixed, and some other suggestions.

About experimental stuff: it has more trouble than I expected, so leaving in quite unfinished state now.
It is possible to save Utvideo\MagicYUV\FFV1 and the like to mkv, mov.
It is possible to use AAC encoder and save to ffmpeg formats (avi too). Will accept any type of samples.
Using legacy acm codecs with ffmpeg formats is not possible at all (likely will never be).
Using x264 encoder when writing to ffmpeg formats is something I hope to sort later.

v0lt
5th February 2017, 10:07
shekh
Thank you very much for the opportunity to be saved in MKV, MP4 and MOV.
:thanks:

StainlessS
5th February 2017, 13:58
Great stuff, cheers Shekh :)

Reel.Deel
5th February 2017, 17:22
Uploaded new version (15)

Thanks! I like that you combined the 32 and 34-bit versions into 1 package. Make it more convenient. :)

LigH
5th February 2017, 18:41
I don't like that they are mixed in the same directory. Please keep them at least in separate subdirectories; people can umpack as they like, but sorting them out is annoying.

Anyway, thanks for another update. :)

But somehow I do not yet understand how to export a video with x264, if not via "external encoder". The description sounds as if there is some internal support. But I missed it so far.

shekh
5th February 2017, 18:58
I don't like that they are mixed in the same directory. Please keep them at least in separate subdirectories; people can umpack as they like, but sorting them out is annoying.


Damn. Why exactly do you need to divide them? There is one VirtualDub.chm instead of two.
Maybe shared jobs/autosave can make some trouble, is it the case?


But somehow I do not yet understand how to export a video with x264, if not via "external encoder". The description sounds as if there is some internal support. But I missed it so far.

Interesting. Can you follow screenshots on this page: https://sourceforge.net/p/vdfiltermod/wiki/compression/
I deliberately put internal encoders at top to make them easier to find..

shekh
5th February 2017, 19:09
How the name "Veedub64.exe" was invented?
For me it seems ridiculous, why not VirtualDub64.exe? :)

LigH
5th February 2017, 19:25
Veedub64.exe already existed this way when made by Avery Lee.

Ah, they are in the same list as the VfW codecs, that's why I did not look there...

v0lt
8th February 2017, 04:32
For me it seems ridiculous, why not VirtualDub64.exe? :)
This is your fork. You can change the name to more clear.

dipje
8th February 2017, 11:44
Neat Video got updated to 4.5, and apparently the Virtualdub version now supports Virtualdub FilterMod. You're getting noticed :P.

shekh
8th February 2017, 12:21
Neat Video got updated to 4.5, and apparently the Virtualdub version now supports Virtualdub FilterMod. You're getting noticed :P.

Does not seem to add anything specific yet, so probably just a declaration of compatibility.

Gromozeka
10th February 2017, 14:27
shekh
Thank you very much.
output mkv forever!

Gromozeka
10th February 2017, 14:32
WNR 0.1 not worked in virtualdub filtermod

shekh
10th February 2017, 15:06
WNR 0.1 not worked in virtualdub filtermod

I tried it with official VD 1.10.5 and it had problems too. Does not crash immediately but the output is not consistent (which is enough indication that the filter is broken).
Unless you find source code there is nothing to do with it.

Gromozeka
10th February 2017, 16:41
Unless you find source code there is nothing to do with it.

Sorry. I don't have the source code WNR 0.1 :(
It's a pity that the wavelet technologies hasn't found the future development

Reel.Deel
11th February 2017, 17:14
@Gromozeka

Don't know how they compare to WNR but there's a couple of wavelet denoising plugins for AviSynth: VagueDenoiser (http://avisynth.org.ru/vague/vaguedenoiser.html) and WaveletReducer (http://forum.doom9.org/showthread.php?t=86081).

Gromozeka
12th February 2017, 07:26
@Gromozeka

Don't know how they compare to WNR but there's a couple of wavelet denoising plugins for AviSynth: VagueDenoiser (http://avisynth.org.ru/vague/vaguedenoiser.html) and WaveletReducer (http://forum.doom9.org/showthread.php?t=86081).

thanks, I know about it

jpsdr
13th February 2017, 21:58
Discorver a big critical issue. I can't open avs file, i have always an ffmpeg error message telling me "unable to open file", when the same avs file opens perfectly with standard VDub.

LigH
13th February 2017, 22:26
AviSynth files should be opened using the AviSynth API, maybe VfW, but not via ffmpeg plugin, I believe ... is it possible to enforce the use of ffmpeg input even when it may not be appropriate?

shekh
13th February 2017, 22:45
Discorver a big critical issue. I can't open avs file, i have always an ffmpeg error message telling me "unable to open file", when the same avs file opens perfectly with standard VDub.

Did you change priority in cch_input.ini? Eg "default = 1" or anything above -5 makes such effect.
Initial config should work (just checked).

Opening avs with ffmpeg is possible in theory, but I disabled avisynth when compiled ffmpeg so it should never work.

jpsdr
14th February 2017, 09:56
I didn't change anything, just updated from 14 to 15. And i don't want ffmpeg to open avisynth, i still want internal VDUb Avisynth API to open it.
I'll do more checks/tests on several PCs later, when i'll have a little time. But saying "I disabled avisynth when compiled ffmpeg so it should never work", do you mean that ffmpeg is "included" within VDubFilterMod, when not in VDub. What plugin is it ? I can check if removing it solve the issue. What's strange, it's that i've opened avs scripts before with version 14.

LigH
14th February 2017, 10:11
Yes, VDubFilterMod includes an ffmpeg based input filter (plugins[32|64]\cch_input.vdf). AviSynth scripts (*.avs) are not included in its file mask. They open fine in my installation of v14. They also open fine in v15 (I separated 32 bit and 64 bit files, but that may not be necessary, as their file names are all distinct).

If you have only a 32 bit version of AviSynth installed, and try to open an AviSynth script in VeeDub64.exe, it may fail, but I would be surprised if it tried to open it "desperately" in the ffmpeg input plugin.

jpsdr
14th February 2017, 10:14
Thanks, i'll do some tests later when back home.

shekh
14th February 2017, 13:48
FFMPEG base input is within avlib-1.vdplugin now, was named cch_input.vdf before.
If AviSynth is not installed, should give this error: AVI Import Filter error: (Unknown) (80040154)
If you delete cch_input.ini or put wrong priority in it: FFMPEG: Unable to open file.
Check if you have cch_input.ini in plugins32 and plugins64 folders.

internal avs/vpy has priority of -4
default for ffmpeg is set to -5 in ini to allow avs before it

jpsdr
14th February 2017, 19:52
I have both... : cch_input.vdf and avlib-1.vdplugin. Removing avlib-1.vdplugin solved the issue.
Keeping cch_input.vdf alone no issue, both issue, only avlib-1.vdplugin issue.
I have the .ini, and priority is -5.

Edit :
Ok...! I put the .vdf in "plugin", and the ".vdplugin" in "plugin32/64".
The cch_input.ini was, and stayed in the "plugin", so probably the avlib-1.vdplugin didn't find it in plugin32/64... I would never found out that the cch_input.ini was for avlib-1.vdplugin...

LigH
14th February 2017, 19:55
But that's the newer plugin. You should have removed the older cch_input.vdf instead.

jpsdr
14th February 2017, 20:04
And if both old an new were present it's because i've overwrited the old files with the new files, not deleted everything before copying...

jpsdr
14th February 2017, 20:44
BTW, isn't finaly this plugin the same as this one (https://sourceforge.net/projects/virtualdubffmpeginputplugin/files/?source=navbar) ?

shekh
14th February 2017, 22:50
BTW, isn't finaly this plugin the same as this one (https://sourceforge.net/projects/virtualdubffmpeginputplugin/files/?source=navbar) ?

Are you asking about features or ...?
Apparently my plugin is developed by me and the quoted one is not. They have some common history long ago.

jpsdr
15th February 2017, 09:45
Yes, just about features. I have the feeling that both are doing (or are for) the same thing, meaning it would probably be useseless to have both installed, so having to choose which one i install.

LigH
15th February 2017, 09:58
In general, you may be right. VirtualDub originally could only handle AVI files. The demand to at least import, if not even export different formats, grew in the last years. Modifications appeared. Then Avery Lee implemented plugin interfaces and support for external encoders. shekh will surely have adapted a previous simple ffmpeg all-purpose input plugin to a central feature, supporting the extended color models and filter modes of the core application as well.

jpsdr
15th February 2017, 10:01
That's what i've thought just afterward. The "other" plugin may probably output allways 8bits even if the input is an mkv or a mov with a 10bits video/codec, when shekh's codec may output 10bits supporting the extended color models he added.

shekh
15th February 2017, 10:34
In general my plugin is more rich on features, especially modded features (support for new formats, alpha channel, stream copy, image sequences, append segments, ...)
The virtualdubffmpeginputplugin implements many options for tweaking (which I do not want to do) and the code is completely different so YMMV.
There is no technical problem to use both, any and none.

shekh
15th February 2017, 15:40
WNR 0.1 not worked in virtualdub filtermod

In fact it works with "Force single framebuffer" option
(Video->Filters...->Options...)

Gromozeka
26th February 2017, 20:01
In fact it works with "Force single framebuffer" option
(Video->Filters...->Options...)

Thanks, shekh

kolpotoru
26th February 2017, 20:34
Thank you for VirtualDub FilterMod. Please implement the duel audio support like the old VirtualDubMod.

LigH
26th February 2017, 21:40
Indeed, a "Stream list" management would be useful to support more than a low fixed number of streams in parallel to video.

shekh
27th February 2017, 12:11
Extra streams: not planning yet.
Also this part interferes with audio filters which seem in desperate state. Any opinions for audio filters? Worth keeping around? :)

TlatoSMD
1st March 2017, 03:50
First off, it's great people are still developing VDub close to 20 years after its first release. I'd have two suggestions regardings things that have always bugged me about VDub although I'm still using it on a daily basis.

I'd like to be able to assign a fixed aspect ratio to the output AVI. Many people claim it would be impossible, but a.) Tmpgenc can when I'm using it for transcoding to an x264 AVI, and b.) so can Adobe Premiere Pro when I'm outputting a 4:3 or 16:9 DV AVI. Oh, and my old Canopus ADVC-100 also encodes to a 720x576 DV stream with an assigned aspect ratio of 4:3 so that when I'm playing the captured file in VLC, the display ratio is actually 768x576 (or maybe it's what my capture tool VirtualVCR does).

And speaking of audio filters, please greatly simplify VDub's audio interface! If all I wanna do is normalize the audio, what VDub is giving me is something like a set of lego bricks that I have to stack in the right way and order, and then I also have to somehow tie them all together with wires or strings. Why does it even need an "input" lego brick and an "output" lego brick? It would be much simpler if it was just like with the video filters: Choose "Normalize" from a set of pre-defined filters, set it to "max", "-1dB of max", or "-3dB of max" (and offer a seperate or integrated simple "boost" or "cut" volume filter), and you're done.

shekh
1st March 2017, 17:36
I'd like to be able to assign a fixed aspect ratio to the output AVI.


If all you need is x264 the encoder has "sar width/height" options and it works.
Can't see what else to do about it.


And speaking of audio filters, please greatly simplify VDub's audio interface! If all I wanna do is normalize the audio, what VDub is giving me is something like a set of lego bricks that I have to stack in the right way and order, and then I also have to somehow tie them all together with wires or strings. Why does it even need an "input" lego brick and an "output" lego brick? It would be much simpler if it was just like with the video filters: Choose "Normalize" from a set of pre-defined filters, set it to "max", "-1dB of max", or "-3dB of max" (and offer a seperate or integrated simple "boost" or "cut" volume filter), and you're done.

It's exactly my thoughts :)

StainlessS
2nd March 2017, 01:59
First off, it's great people are still developing VDub close to 20 years after its first release.

No.

Shekh, is doin' his damdest to make it the new greatest thing in the world, and pretty much succeeding.

Methinks, Shekh, should be voted king, me would lick his feet :)

(Dont hold me to that, please).

TlatoSMD
2nd March 2017, 06:20
Oh, and since this seems an all-over VDub-related suggestion thread, I'd like to quote myself from another thread:

somebody really needs to at last write the cross-color and cross-luma PAL filter for VDub that Tacosalad has announced already more than a decade ago. I've mailed him about it around 2005 and he said he has "all the math in his head" for a genuine PAL version of his Dotcrawl filter with that, but nothing doing so far. MSU has been faster and implemented the thing in their commercial MSU Tuner TV Restore filter: http://www.compression.ru/video/tuner_tv_restore/index_en.html (look at the guy's shirt to see what I mean). Well, we need either that, or a proper GUI for Avisynth at least. After all, I'm just a button clicker, not a programmer, which is why I've never gotten a single AVIsiynth script to work within the last ten years that I've been trying.

The outmost I've ever managed to do in this vein of using an abstract video-processing programming language like AVIsinth was to use Mencoder (with lots of help every single time when they'd brought out a new version and seemingly all former commands had been blacklisted again) for what I'm now much more easily and more conveniently using Xmedia Recode for: Simply transcoding stuff into readable files for VDub and PPro before there were all those many codec and container plug-ins for VDub. And even just using Mencoder for that was really pushing the limits of my abilities to use one of those darn programming languages to write "scripts".

So you see, that's why I'm so desperate for either a genuine PAL cross-color and cross-luma filter for VDub...*OR* a clickable GUI like VDub for AVIsinyth. AVIsynth seems to have all the hot filters but the programming language to use them is just gobledegook to me. Besides a genuine PAL cross-color and cross-luma filter, AVIsnyth also seems to have an effective filter to remove those black and white lines from analogue satellite TV recordings, whereas I've never gotten the VDub version called "Processing the linear hindrances" to do anything at all to my footage, and I have lots of tapes recorded from analogue satellite TV. And let's not forget about AVIsynth's awesome filters to turn regular 25 or 30fps videos into extreme slo-mos, with a quality only equalled by Apple Motion so you can forget about cheap and crappy tools like Twixtor.

shekh
2nd March 2017, 11:20
Methinks, Shekh, should be voted king, me would lick his feet :)


I just got motivation to make a project web page: imagine how this quote would look in "what users say" section!

StainlessS
2nd March 2017, 19:30
Yeh, go for it :)

jpsdr
10th March 2017, 09:55
Would it be possible, to have in the next release (no hurry, take your time), the two following things :

First, change the default value alignment (and so also the modulo pitch value) from 16 to 64.
And also, change this :

/// Filter requests 16 byte alignment for source and destination buffers. This guarantees that:
///
/// - data and pitch fields are multiples of 16 bytes (aligned)
/// - an integral number of 16 byte vectors may be read, even if the last vector includes
/// some bytes beyond the end of the scanline (their values are undefined)
/// - an integral number of 16 byte vectors may be written, even if the last vector includes
/// some bytes beyong the end of the scanline (their values are ignored)
///
FILTERPARAM_ALIGN_SCANLINES = 0x00000008L,

to this :

/// Filter requests 64 byte alignment for source and destination buffers. This guarantees that:
///
/// - data and pitch fields are multiples of 64 bytes (aligned)
/// - an integral number of 64 byte vectors may be read, even if the last vector includes
/// some bytes beyond the end of the scanline (their values are undefined)
/// - an integral number of 64 byte vectors may be written, even if the last vector includes
/// some bytes beyong the end of the scanline (their values are ignored)
///
FILTERPARAM_ALIGN_SCANLINES = 0x00000008L,

As the "why 64" ? Just to see for the future, and don't have to touch it again for a long time.

The second change, would be to add CPU mode.
The first step would just be to add these :

// AVS+
CPUF_AVX2 = 0x2000, // Haswell
CPUF_FMA3 = 0x4000,
CPUF_F16C = 0x8000,
CPUF_MOVBE = 0x10000, // Big Endian move
CPUF_POPCNT = 0x20000,
CPUF_AES = 0x40000,
CPUF_FMA4 = 0x80000,

CPUF_AVX512F = 0x100000, // AVX-512 Foundation.
CPUF_AVX512DQ = 0x200000, // AVX-512 DQ (Double/Quad granular) Instructions
CPUF_AVX512PF = 0x400000, // AVX-512 Prefetch
CPUF_AVX512ER = 0x800000, // AVX-512 Exponential and Reciprocal
CPUF_AVX512CD = 0x1000000, // AVX-512 Conflict Detection
CPUF_AVX512BW = 0x2000000, // AVX-512 BW (Byte/Word granular) Instructions
CPUF_AVX512VL = 0x4000000, // AVX-512 VL (128/256 Vector Length) Extensions
CPUF_AVX512IFMA = 0x8000000, // AVX-512 IFMA integer 52 bit
CPUF_AVX512VBMI = 0x10000000,// AVX-512 VBMI

to made them avaible for plugin.
I don't know how it's made within VDub, my humble suggestion would be to take a look at the avs+ cpuid.cpp code, it's now "very easy"...;)
The second step, could be done later in a second time, would be to add these in the "Option->Preference->CPU" menu.

I think these improvements could be very usefull in your spirit of upgrade or continue to make live VirtualDub.

LigH
10th March 2017, 10:24
If 0x00000008L is equal to a 16 byte alignment, I would assume that a 64 byte alignment needs a different value?

jpsdr
10th March 2017, 12:06
It's not like this it's to be seen. Setting FILTERPARAM_ALIGN_SCANLINES in your filter means your require alignment. Actualy the alignment is on 16, i asked if it can be changed to 64. If you're aligned on 64, you're on 16, so it's backward compatible, no need to introduce more complexity with another parameter.

shekh
31st March 2017, 12:54
Sorry for long reply, was on vacation :)

> change the default value alignment

This feature is already sort of scheduled. I will make a new flag value to be able to tell the difference later.

> add CPU mode

I cant see how this can be helped from VirtualDub. If you want to write code using FMA4 or whatever, IMO just do it and make your own compatibility check.

shekh
4th April 2017, 13:00
jpsdr

What do you think if I make 64-byte alignment for buffers in x64 build, and in x86 build it will be forced for specific filter only (it will do inefficient reallocation)?
I am afraid that x86 process may run out of memory merely because of the increased alignment.

Unfortunately there is no already implemented way to enforce only useful alignment, and this seems difficult.

edit: nevermind, have better idea.

yup
4th April 2017, 14:31
shekh!
:thanks: for Your effort.
I install Your version VirtualDub on two PC, both under Windows 10 64, on one all O'k and I see 16 bit video (after command Converts(16)), when I see file information I see decoder name, on other I see split image and at file information not name for decoder.
Please advice.
yup.

jpsdr
6th April 2017, 09:00
I am afraid that x86 process may run out of memory merely because of the increased alignment.

You'll at worst increase the size of each line of 48 bytes of memory allocation... I don't think it will be a critical issue.

About CPU extenstion, all the stuff is tested in cpuaccel.cpp, maybe it could be updated using the cpuid.cpp from avisynth+, and offer the others detection parameters ?

Myrsloik
6th April 2017, 10:07
I added Y410 support, maybe you want to add it too now?

shekh
6th April 2017, 10:21
I added Y410 support, maybe you want to add it too now?

What it helps to do? You can send 10 bit wrapped in Y416, same result less pain.
Does any vfw codec support it?

Myrsloik
6th April 2017, 10:30
What it helps to do? You can send 10 bit wrapped in Y416, same result less pain.
Does any vfw codec support it?

I added it for madvr support mostly. Don't know of any specific vfw thing.

jpsdr
6th April 2017, 11:31
I don't realy know the exact labels format, the codecs i know which support more than 8 bits are :
UT Video : Support 10 bits RGB, RGBA, YUV422.
Magic YUV : Support 10 bits RGB, RGBA, YUV400, YUV422; 12 bits RGB, RGBA; 14 bits RGB, RGBA.
I don't know if this can help.
Of course, there is probably more of them.

shekh
6th April 2017, 13:28
Yes I watch UTVideo & MagicYUV. All their output supported afaik.

shekh
16th April 2017, 11:16
New version and cleaned some SDK/API changes, brief documentation available: https://sourceforge.net/p/vdfiltermod/wiki/sdk/

Flags controlling frame alignment:


FILTERPARAM_ALIGN_SCANLINES_16 = 0x00000008L,
FILTERPARAM_ALIGN_SCANLINES = FILTERPARAM_ALIGN_SCANLINES_16,
FILTERPARAM_ALIGN_SCANLINES_32 = 0x00000048L, // v19
FILTERPARAM_ALIGN_SCANLINES_64 = 0x00000040L, // v19


It is difficult to prove align guarantee but I believe it works :) Passed some tests too.
Request as much as you actually use.

And some filters illustrating how to deal with new modes:
https://sourceforge.net/projects/vdfiltermod/files/plugins/owdenoise/
https://sourceforge.net/projects/vdfiltermod/files/plugins/crossfade/

These filters are "strange" so I don`t include them in the pack.

owdenoise is adaptation of wavelet denoise filter from FFMPEG. It is very slow.

crossfade is more like experiment. If you put it on scene change it will shift future frames backward and interpolate with past frames, creating linear transition.

WorBry
17th April 2017, 02:00
Testing VirtualDub FilterMod release 39005 on Win10 x64 I keep getting this error when attempting to encode to x264.mp4 (8 or 10 bit) with the integrated x264 compressors:

http://i.imgur.com/j4ZmH6j.png

No problem encoding to other formats, only x264.

Edit: Same with version 39148 released today.
Edit: But no such issue with the 64-bit VeeDub64.exe

shekh
17th April 2017, 09:02
Testing VirtualDub FilterMod release 39005 on Win10 x64 I keep getting this error when attempting to encode to x264.mp4 (8 or 10 bit) with the integrated x264 compressors:

http://i.imgur.com/j4ZmH6j.png

No problem encoding to other formats, only x264.

Edit: Same with version 39148 released today.
Edit: But no such issue with the 64-bit VeeDub64.exe

Cannot repeat immediately, maybe something with settings.
Please repeat it with "test video->rgb color cube" and then use "file->save project", and send it to me.

WorBry
17th April 2017, 16:41
UHD/4K - maybe an issue with Auto Level selection ?

I'm sending you the Test Video > RGB Color Cube project file. This was simple test case.

Input file: Native UHD/24p XAVC.mp4 clip from Sony A6300. Rec709
Full Processing mode
Decode Format: Default (Auto) YUV420-709
Compressor: 8-bit x264 - Default settings.
Compressor pixel format: Default YUV420
No Audio
Saved as mp4 file

sneaker_ger
17th April 2017, 16:43
UHD/4K
Running into the memory limit of 32 bit? The executables aren't even large address aware as far as I can tell.

shekh
17th April 2017, 17:15
UHD/4K - maybe an issue with Auto Level selection ?

I'm sending you the Test Video > RGB Color Cube project file. This was simple test case.

Input file: Native UHD/24p XAVC.mp4 clip from Sony A6300. Rec709
Full Processing mode
Decode Format: Default (Auto) YUV420-709
Compressor: 8-bit x264 - Default settings.
Compressor pixel format: Default YUV420
No Audio
Saved as mp4 file

Are you sending attachments? While they wait for moderation I can`t see, please use https://justpaste.it/ or dropbox, or anything but attachments :)

So did the cube work or failed?

p.s. the idea about memory seems correct, maybe it cannot allocate enough buffers, may work with preset "ultrafast".

WorBry
17th April 2017, 17:15
Running into the memory limit of 32 bit? The executables aren't even large address aware as far as I can tell.

I missed the first part of the sentence copy-pasting the text. Should have read - "BTW - the error only occurs with UHD/4K".

But maybe you're right - running into the memory limit of 32 bit.
Still, I've sent Shekh the file.

WorBry
17th April 2017, 17:29
Are you sending attachments? While they wait for moderation I can`t see, please use https://justpaste.it/ or dropbox, or anything but attachments :)

DataFileHost misbehaving. Here's the vdf file opened in Notepad > justpaste.it link:

https://justpaste.it/15mfi

And the source file MediaInfo:

https://justpaste.it/15mfm

Edit: The DataFileHost link:

https://www.datafilehost.com/d/8f369081



So did the cube work or failed?

Worked

shekh
17th April 2017, 18:44
Can you share your source too?
Tried to reproduce with same settings and similar source, but I get different message:
x264vfw [error]: x264_encoder_encode failed

What I can say now: it makes sense to add some meaning to error messages.

WorBry
17th April 2017, 20:26
Can you share your source too?

https://www.datafilehost.com/d/fa0a18f7


What I can say now: it makes sense to add some meaning to error messages.

Sounds like the wife :)

LigH
18th April 2017, 07:04
If you used the CLI x264 encoder, I would guess that it printed a few more meaningful error messages to STDERR before failing. The included "x264vfw" encoder instead only shows you the final result. I hope there is a way to inspect its error log in another window, or whatever...

WorBry
19th April 2017, 15:09
Can you share your source too?
Tried to reproduce with same settings and similar source, but I get different message:
x264vfw [error]: x264_encoder_encode failed


I'm fine using the x64 version, but did you come to a conclusion on the encode error I reported with the x32 exe ? Is it likely just a memory limit thing or something else going on ?

Cheers.

shekh
19th April 2017, 15:33
It is suspicious because I cannot repeat same error. It fails later anyway with "out of memory".
LigH is correct, some messages are emitted to stderr (read:nowhere), with next update will be possible to see them.
Also I suspect the input driver is too hungry for memory, maybe I can do something about it.

jpsdr
28th April 2017, 09:30
I have a suggestion. It's not a need for me, just something which may be usefull. I take a look, and unless i'm mistaken, didn't see it.
In your FilterModPixmapInfo struct, adding HDR metadata information of the current frame (or somewhere else if it's not the right place).
I understand this may be possible only on very specific case : If the video is read with one of your new high mode video plugin, and if the plugin is able to retrieve such information. This may provide necessary information to handle HDR video, if someone wants to work/handle such frames. Of course, if this information is not avaible, put a specific "not avaible" value.
It's just a pure suggestion, based on what i can see sometimes of information being possibly missing for doing some process, and in the thought of "what can be improved/added with the new things coming".

shekh
28th April 2017, 10:36
Thanks but it is no go unless someone demands it for real purpose.

Yanak
30th April 2017, 23:42
Hello,
First let me say thank you for working on this and adding more possibilities to this great tool, only noticed it few days ago and still regularly using the old Vdub.

I have few questions l'd like to ask please ( feel free to say it's silly ones if they are ) :

- Do you plan to add some kind of 3D LUT support so we could apply .cube or .3dl profiles directly to the videos ?

- Will there be a way to import curve profiles from external programs a bit like the "Gradation Curves" plug-in used to do ( sadly i mostly use Gimp for curve and this format is not supported in this old plugin tho ).

- Will it be possible to add an option in the script editor to have an automatic return to the line so the stuff typed stays inside the window without the need to use the horizontal scroll to see the end of the line ?



More particular :

- Will it be easy for you to extend the insert option in the script editor ?
For example adding a few filters to our project and then saving the project we will see those lines for the filter in the saved project file :

VirtualDub.video.filters.Add("MSU Old cinema 2.0 ");
VirtualDub.video.filters.instance[0].Config(247, 223, 181, 0, 1, 0, 30, 70, 15, 3, 30, 10, 30, 150, 0, 1, 100);

Let's say we have a new "Insert Filters parameters" , it could return something like this ( with comment at the start ) :

#"MSU Old cinema 2.0" (247, 223, 181, 0, 1, 0, 30, 70, 15, 3, 30, 10, 30, 150, 0, 1, 100)

and so on for all filters applied following the same scheme #"FilterName" (parameters)
Asking this to use those more easily in avisynth when using "LoadVirtualDubPlugin", will still need a bit of edit after this but passing all settings directly into the script will be a really nice thing.

- Maybe also the right click contextual menu adding the "edit " options, like "insert position etc " accessible directly from a right click.

Thank you very much for the work you are doing on this tool and long live to VirtualDub :)

StainlessS
1st May 2017, 00:19
Yanak, as you mention MSU Old Cinema, I thought I would point something out, here:- https://forum.doom9.org/showthread.php?p=1371376

Not good news I'm afraid, unless they have updated it.

Yanak
1st May 2017, 01:51
Hi,
Took this example from the filters list but i have not tested through avisynth if it works or not, too late to make some tests now as it's almost 3am here but will give some tries tomorrow, thank you for pointing this.

It isn't the type of filter i use the most in virtualdub but still annoying if limited like you discovered, beside doing manually a lot of stuff in avisynth or using overlays there isn't really easy solutions to make footage look old and dirt in avisynth, more the contrary :p (even worse when it comes to import and apply easily some externally created or 3D LUT in some ways into avisynth, complete headache for those, when it could bring some really neat stuff )

Thanks for pointing this, will try a bit tomorrow but I'm afraid it have not changed since all those years, at least i will have time to elaborate a plan B for the next time i will need this :).

StainlessS
1st May 2017, 02:01
You can if necessary set up VDub as a frameserver and feed it into Avs.

Also, never used it but there is T3DLut:- https://www.google.co.uk/?gfe_rd=cr&ei=KRd1VKG6N5HCVND3gGA&gws_rd=ssl#q=avisynth+t3dlut

EDIT: I have a version of the plugin, if you cant find it.

EDIT: Old cinema is not so atypical of MSU filters, there is more than one that suffers from similar problems.

Yanak
1st May 2017, 02:13
I could never get the vdub frameserver to work under windows seven, this is another thing that could be updated and be very helpful ;).

Will check tomorrow for the plugin, quickly saw there was even a 64 bit version of it on the link but nothing to download there, will research tomorrow when my eyes won't be half close and if i have no luck i'll pm you about it, this gave me good hope, hopefully it will work.

Thank you very much for the help.

StainlessS
1st May 2017, 02:26
Yanak, I was looking at your profile, to see what you were doing and clicked on what you were looking at, got this alert

No idea what that means but seems VERY suspicious to me, do not give any password, and change your password if you did give it,

by the way, if you just click the close box, nothing happens and you can view the pages that seem to be on Doom9.

HERE: Image:-

EDIT: SonyBiz.net seems to be SONY, but who knows (and why are they asking for Password) !!!


#################################################


https://s20.postimg.org/qod3wnlvh/untitled_zps4zzkaymu.jpg (https://postimg.org/image/5rgvrznuh/)

raffriff42
1st May 2017, 02:49
StainlessS, it does the same thing for me. It's the link below "this thing:" in the text. I reported it. (It ain't Yanak's fault!)
Safe "printable" view: https://forum.doom9.org/printthread.php?t=139389

StainlessS
1st May 2017, 02:57
Cheers Raff, have seen that before and had no idea what the cause was. :)

EDIT: So, it seems that it is just because someone inserted a link to a jpeg that happens to be on sony server.

shekh
1st May 2017, 08:06
- Do you plan to add some kind of 3D LUT support so we could apply .cube or .3dl profiles directly to the videos ?


No plan


- Will there be a way to import curve profiles from external programs a bit like the "Gradation Curves" plug-in used to do ( sadly i mostly use Gimp for curve and this format is not supported in this old plugin tho ).


To import where, into curves plugin? Again, no plan.


- Will it be possible to add an option in the script editor to have an automatic return to the line so the stuff typed stays inside the window without the need to use the horizontal scroll to see the end of the line ?


This is really simple, probably.


...
Let's say we have a new "Insert Filters parameters" , it could return something like this ( with comment at the start ) :
#"MSU Old cinema 2.0" (247, 223, 181, 0, 1, 0, 30, 70, 15, 3, 30, 10, 30, 150, 0, 1, 100)
...


I don't really want to mess with script editor, but what I may do is support copy and paste of filters, then this will allow to paste filters in any text editor.
(looking similar to vdscript commands)

Yanak
1st May 2017, 15:00
@StainlessS :,
saw that just now, really weird, answered to your PM too but seems like my messages don't work, tried a few times but not sure if you gonna get it , sorry if it worked and comes in duplicates.

Found T3DLut plugin in x86 an x64 but this won't work as it supports only a very specific format ( sent more infos on this by PM but i don't know if you will receive it or not )

@raffriff42 : i think i recall you from encodingtalk forum unless it's another similar name, i am the guy who had issues with your frametime checker first versions as it wasn't French language aware :)


@shekh :
Thanks for the reply,

Import curves into the curves plugin yes, that was the idea, import external programs curves directly, well not gonna happen, but thanks for replying.

The changes to the text editor return to the line and possibility to copy the filter codes will be great already.

Thanks again.

StainlessS
1st May 2017, 16:25
Yup, I got all three of your PM's Yanak. PM'ed response.

sneaker_ger
7th May 2017, 20:18
When setting x264 SAR and exporting to mkv the mkv video display width/height headers are not set appropriately.

shekh
7th May 2017, 20:28
When setting x264 SAR and exporting to mkv the mkv video display width/height headers are not set appropriately.

Thanks. How do you know, from MediaInfo?

sneaker_ger
7th May 2017, 20:41
MkvToolNix GUI Header editor or mkvinfo.

sneaker_ger
7th May 2017, 20:44
On second look it's even worse:
1.) no mkv CodecPrivate written for integrated x264
2.) "DisplayUnit" is set to 4. Legal range is 0 to 3.

Same problem with MP4:
3.) Invalid AVCConfigurationBox.

nevcairiel
7th May 2017, 23:25
2.) "DisplayUnit" is set to 4. Legal range is 0 to 3.

Actually, 4 is a valid value for "unknown", it was added in the recent standardization efforts of the Matroska specification.

https://github.com/Matroska-Org/matroska-specification/blob/master/ebml_matroska.xml#L388

... couldn't find a page where the recent spec is properly rendered on. <.<

sneaker_ger
8th May 2017, 08:22
I see.
This part of the spec is interesting. The DAR when using DisplayUnit != 0 and DisplayWidth and DisplayHeight not set seems to be undefined.

shekh
8th May 2017, 11:18
I guess there is probably some imperfection at stream level too, like avcc/annexb stuff or unnecessary headers... never planned to dig deep into specifications :)

shekh
14th May 2017, 20:57
On second look it's even worse:
1.) no mkv CodecPrivate written for integrated x264
2.) "DisplayUnit" is set to 4. Legal range is 0 to 3.

Same problem with MP4:
3.) Invalid AVCConfigurationBox.

Should be much better with the new build 39460: aspect ratio certainly works, filled some missing headers.


In the good old VirtualDubMod, saving a screenshot of the currently displayed frame was so easy: Video » Snapshot source frame (Shift+1).

Trying the same in VDubFMod r38543 (32b) ... Video menu: No more matching entry. File menu: Export ... a submenu, that costs me precious time, unless there is a keyboard shortcut assigned; Single image ... no shortcut assigned yet, have to try to assign one later; click. Nothing happens?

Well, let's assign the shortcut. To File.SaveImage – seems valid. Test it ... nothing happens.

Let's try in VDubFMod r38544 (64b) ... pressing shortcut (was assigned for both versions, that's nice): OK, a dialog appears. Exporting a single image works. So it appears to be broken only in the 32b version.

Or is it? Trying again ... this time it works there as well?! Strange. A reliable bug could be found and fixed. But unreliable issues are the hardest. :o

Mystery solved! The picture was disappearing with most any command: just go to "frame rate" for example, press cancel and now you have "copy output" disabled.
I cant believe it was so simple :)

LigH
14th May 2017, 21:22
I am impressed!

:thanks:

raffriff42
14th May 2017, 21:30
Hi shekh! When viewing a deep color image via AvisynthPlus, "copy output frame to clipboard" returns nothing but a black rectangle. Adding a ConvertFormat: RGB32 filter solves the problem.

sneaker_ger
14th May 2017, 21:47
@shekh
Thx, looking good for CodecPrivate, AVCConfigurationBox and MKV AR.

I see it sets H.264 matrix coefficients flag. How does it decide which one is set?

LigH
14th May 2017, 21:53
... "copy output frame to clipboard" returns nothing but a black rectangle. Adding a ConvertFormat: RGB32 filter solves the problem.

This feature will probably only work with DIB compatible formats...

shekh
14th May 2017, 22:08
@shekh
Thx, looking good for CodecPrivate, AVCConfigurationBox and MKV AR.

I see it sets H.264 matrix coefficients flag. How does it decide which one is set?

Colorspace matrix? Virtualdub understands 2 types of matrix 601/709. So it is set to one of these when encoding.

raffriff42
14th May 2017, 22:09
This feature will probably only work with DIB compatible formats...
I know, but it's probably easy to downconvert. But, now that you mention it, maybe silent downconversion should not be done. OK, how about either (a) disabling the copy function when it can't succeed and changing (grayed-out) menu text to "(cannot copy this format)" or (b) a popup message when copying fails.

Copying any non-standard format to the clipboard is probably complicated. IIRC you have to render multiple versions of your data so each client application gets the best version it can accept (see: Photoshop etc). I can understand if shekh gives a very low priority to something like that.

sneaker_ger
14th May 2017, 22:36
Colorspace matrix? Virtualdub understands 2 types of matrix 601/709. So it is set to one of these when encoding.
So only "Video">"Decoder format"? "Alias format" filter seems to be ignored.

shekh
15th May 2017, 10:21
I know, but it's probably easy to downconvert. But, now that you mention it, maybe silent downconversion should not be done. OK, how about either (a) disabling the copy function when it can't succeed and changing (grayed-out) menu text to "(cannot copy this format)" or (b) a popup message when copying fails.

Copying any non-standard format to the clipboard is probably complicated. IIRC you have to render multiple versions of your data so each client application gets the best version it can accept (see: Photoshop etc). I can understand if shekh gives a very low priority to something like that.

"Copy to clipboard" is supposed to always convert to rgb24.
Afaik no other clipboard picture format is widely supported; I tried to support alpha channel and gave up.

Why it does not work with some formats should be fixed, for some (historical?) reasons VD implemented 2 picture conversion routines: one is normal and the other (used for clipboard copy) covers only subset of formats.

shekh
15th May 2017, 11:29
So only "Video">"Decoder format"? "Alias format" filter seems to be ignored.

When you setup output codec there are 2 possible ways:

1) explicit - navigate to compression -> pixel format, set colorspace to rec 709

2) auto - when compression->pixel format is set to auto, it will match source file format/colorspace (not last filter!)
However "auto" is disabled with x264 codec.

"no change" option for colorspace seems ill-defined for output (in most cases it means default=601).

If you want to keep filter output as is, you need to repeat same settings as the filter.
For example:
If your last filter is alias format "709-FR"
Select "709-FR" in compression->pixel format dialog (it will be indicated in "save video" too).
In this setup there will be no colorspace change between filters and compression.

jpsdr
23rd May 2017, 09:55
SDK evolution suggestion.

I'm still using "standard" SDK, didn't make the leap to use yours yet (but intend to in a not too far future), but i've made a small change, maybe you can do the same in your next release.

The VDXVideoFilter class offers a "constructor" with the Init function, but doesn't offer a "destructor".
So, i've added a DeInit function (because i needed it).

The following change in the code are:

VideoFilter.h

virtual bool Init();
virtual void DeInit();
virtual uint32 GetParams()=0;

VideoFilter.cpp

bool VDXVideoFilter::Init() {
return true;
}

void VDXVideoFilter::DeInit() {
}

void VDXVideoFilter::Start() {
}
....

void __cdecl VDXVideoFilter::FilterDeinit (VDXFilterActivation *fa, const VDXFilterFunctions *ff) {
VDXVideoFilter *pThis = *reinterpret_cast<VDXVideoFilter **>(fa->filter_data);

pThis->fa=fa;
pThis->DeInit();
pThis->~VDXVideoFilter();
}



Do you think it's something you can add in your next release ?

shekh
23rd May 2017, 10:10
Just checked, this is not necessary.

There is virtual destructor:


class VDXVideoFilter {
public:
VDXVideoFilter();
virtual ~VDXVideoFilter();


And it is called exactly from DeinitProc wrapper:


void __cdecl VDXVideoFilter::FilterDeinit (VDXFilterActivation *fa, const VDXFilterFunctions *ff) {
(*reinterpret_cast<VDXVideoFilter **>(fa->filter_data))->~VDXVideoFilter();
}


virtual DeInit does not add any value here

jpsdr
23rd May 2017, 10:25
Yes, but how do i put the code i need to run on "destructor" if i don't create the DeInit function ?
Because you musn't create your own constructor/destructor in your filter, because of the copy there is sometimes, so if you want a specific code to be run on constructor, you have to put it on Init function, but it's missing actualy a DeInit function to do the same thing.
Because of the interface, there is "copy constructor" operations on the instance filter, when you call the interface menu, etc. The existance of the Init function ensure that a specific constructor code will be run only once, and not several times, and the same with the DeInit.
You can't create/change the destructor (and also the constructor), to put your code, otherwise it will be called each time a copy of the object will be created.
There is the Init function for that for the constructor, but there is not such function for the destructor.
The value added by DeInit is to ensure that your code wil be runned only when the system will call FilterDeinit.
The same way Init ensure that your code wil be runned only when the system will call FilterInit.

shekh
23rd May 2017, 11:25
I say DeInit has no value because it does not do anything differently.
You can see in your code:


void __cdecl VDXVideoFilter::FilterDeinit (VDXFilterActivation *fa, const VDXFilterFunctions *ff) {
VDXVideoFilter *pThis = *reinterpret_cast<VDXVideoFilter **>(fa->filter_data);

pThis->fa=fa;
pThis->DeInit();
pThis->~VDXVideoFilter();
}


DeInit and destructor are called in a row. There is no other entry point to either one! So you can just move code from DeInit to destructor and it will be the same.

you musn't create your own constructor/destructor in your filter

Wrong, you must create them!

I understand the idea of Init-Deinit symmetry, but it is impossible. The instance can be created differently, but is must always destroy itself the same way, no matter how it was created. There is no way you can run a complete destructor for "initial" object and partial destructor for cloned object. This cannot work.

I remember the copy-constructor issue.

The proper filter example:


class Filter: public VDXVideoFilter {
public:
Param param;
void* buf;

Filter(){ init(); }
Filter(const Filter& a){ init(); param=a.param; }
void init(){ buf=0; }
~Filter(){ free(buf); }
};


Here I have:
default constructor "Filter(){ init(); }"
copy constructor "Filter(const Filter& a){ init(); param=a.param; }"
helper function to avoid typing the same shit in both constructors "void init(){ buf=0; }"
destructor "~Filter(){ free(buf); }"

This is bare generic minimum to implement/think of.

What If instead I write something like this:


class Filter: public VDXVideoFilter {
public:
Param param;
void* buf;

virtual Init(){ buf=0; }
virtual DeInit(){ free(buf); }
};


Because I do not declare copy constructor it defaults to something like this:

Filter(const Filter& a){ param=a.param; buf=a.buf; }


So when the clone object is created it will share the same memory block pointed by buf, eventually this will result in double-free memory corruption.
How do you plan to sort this with virtual DeInit? It does not help at all. Only copy constructor can decide what to do.

jpsdr
23rd May 2017, 12:19
There is no way you can run a complete destructor for "initial" object and partial destructor for cloned object.
It think it's possible if the system call FilterInit and FilterDeinit only on "initial" object, and not the cloned.
This way, on cloned objet, "partial" constructor/destructor, without the specific code put in Init/DeInit will not be called.
And if "buff" is not allocated in constructor, but in Start, it must be freed in End, not DeInit or destructor.
The exemple code you put is not compatible with the filter SDK way. You de-allocate things on FilterDeinit (or deinitProc) only if they have been allocated on FilterInit (or initProc).

When you look at the SDK 1.2 help, in "Reference -> Video filter functions", there is initProc and deinitProc. All the "constructor stuff" must be put on initProc, and all the "destructor stuff" in deinitProc, they are "symmetrical", that what the SDK help says (well... not fully, because you can throw exceptions on initProc but not on deinitProc, but if we leave this appart). The Init in VDXVideoFilter class is somhow a wrapper to initProc (the same there is for Start/startProc, etc...), but there is actualy no wrapper for deinitProc, this is what i intended to do with DeInit.

Of course, SDK said also to put maximum allocation/buffer in Start and free of these in End, but there is things i have to do in initProc and deinitProc, and not in Start and End.

raffriff42
23rd May 2017, 12:57
2) auto - when compression->pixel format is set to auto, it will match source file format/colorspace (not last filter!)What do you think of showing the current format, alongside the auto-selected output format, where they are different? Maybe something like this:
https://www.dropbox.com/s/82eljrzx9qoc5iq/vdubfm-dlg-compress-pixfmt-04.png?raw=1


.

shekh
23rd May 2017, 13:16
The part you probably misread in the sdk:


With copyProc, it becomes possible to map the allocation and deallocation hooks onto traditional C++ object semantics, which makes filter data management much easier. In particular, the three hooks can be mapped as follows:

Filter API entry point Equivalent C++ method
initProc Constructor
deinitProc Destructor
copyProc Copy constructor


It think it's possible if the system call FilterInit and FilterDeinit only on "initial" object, and not the cloned.

But it is not, as soon as clone object is created both objects are equal in rights. FilterDeinit/destructor is called equally for both.

And if "buff" is not allocated in constructor, but in Start, it must be freed in End, not DeInit or destructor.

You can allocate stuff in constructor, init, start, run, config or anywhere else. There is no rule against this.
The only sane rule is: everything you allocate must be reasonably freed.
Where exactly to put something can only be advice, not rule.

btw can you share sdk 1.2? It seems I have lost it (only 1.1 is still on virtualdub.org)

If you want to read help to the letter:


initProc
Initializes a filter's per-instance data.

int initProc(VDXFilterActivation *fa, const VDXFilterFunctions *ff);

Remarks
This function is called whenever a filter instance is created, and is usually used to initialize variables in the private data structure. Regardless of whether it is provided, VirtualDub will initialize the data structure to zeroes, so most filters will not need this function.


ok except it does not mention that it is NOT called when copy instance is created, which somewhat changes the game.


copyProc
Creates a clone of the filter instance.

int copyProc(VDXFilterActivation *fa, const VDXFilterFunctions *ff, void *dst);

Remarks
This function allows you to implement a copy constructor for your filter, which then allows you to store pointers to allocated and destructable objects in your filter structure. To do this, you must tie copyProc to your class's copy constructor, initProc to your regular constructor, and deinitProc to your destructor. See using a class object for your filter for more details.


again (translating)
initProc = Constructor (constructor is wrapper for initProc)
deinitProc = Destructor (destructor is wrapper for deinitProc)
copyProc = Copy constructor (copy constructor is wrapper for copyProc)

Do you still insist to ignore copy constructor?

Why there exists virtual VDXVideoFilter::Init? IMO you are supposed to ignore it unless you want to return error to deny filter usage (maybe it cannot find required library).
Init is called anyway after constructor is called but there is no way to return error from a constructor.

shekh
23rd May 2017, 13:31
What do you think of showing the current format, alongside the auto-selected output format, where they are different? Maybe something like this:
https://www.dropbox.com/s/82eljrzx9qoc5iq/vdubfm-dlg-compress-pixfmt-04.png?raw=1


.

Do you mean "current" = whatever is coming to output pane?
I think it is good idea to show all steps

"source (YUV420) -> filters (RGB24) -> compression (YUV420)"

jpsdr
23rd May 2017, 13:39
I'll send you by mail the SDK when back home. So, according what you said, the "only" purpose of VDXVideoFilter::Init is to be able to return value and throw exception.
If i don't want to do either of them, i could just create a constructor (and also a destructor if needed) of my filter class, and it will also do the trick.
Ok.
I'll restore to the original, and add a destructor to my filter created from VDXVideoFilter instead do to the DeInit job, and keep Init, as it's allready implemented.

raffriff42
24th May 2017, 07:40
I think it is good idea to show all steps

"source (YUV420) -> filters (RGB24) -> compression (YUV420)"Sure, that would be even better.

StainlessS
24th May 2017, 11:40
I'll send you by mail the SDK

Posting link would be nicer and available to anyone :)

EDIT: VDub Filter SDK versions v1.00, v1.05, and v1.10
EDIT: LINK DELETED

shekh
24th May 2017, 12:03
Posting link would be nicer and available to anyone :)

Added here (https://sourceforge.net/p/vdfiltermod/wiki/sdk/) so hopefully I dont lose it again.
Anyone has source code for these chm docs? :)

StainlessS
24th May 2017, 12:09
All versions in one package, VDUB_FiltSDK_1-00_1-05_1-10_1-20.zip
http://www.mediafire.com/file/axfipba2p8pg4uj/VDUB_FiltSDK_1-00_1-05_1-10_1-20.zip

shekh
24th May 2017, 12:17
All versions in one package, VDUB_FiltSDK_1-00_1-05_1-10_1-20.zip
http://www.mediafire.com/file/axfipba2p8pg4uj/VDUB_FiltSDK_1-00_1-05_1-10_1-20.zip

Thanks, already downloaded from previous edit, but all of these are old versions. 1.2 is better

StainlessS
24th May 2017, 12:20
Yep, just so all versions available if required for whatever reason.

I thought that VirtualDub.org was down some time ago, but is now up:- http://www.virtualdub.org/
(I'm sure that you already knew that).

and all pre v1.20 filter SDK's also available here:- http://www.virtualdub.org/filtersdk.html

EDIT: Arh, forums are down though.

StainlessS
24th May 2017, 17:06
Anyone has source code for these chm docs? :)

Have had a go at creating a project for Compile/Decompile of the SDK helpfile.

http://www.mediafire.com/file/gu79u53eq9ec6x8/PluginSDK_TEM.7z

Best I can do at the moment, and gotta leave in a minute.

Produces error:

HHC5003: Error: Compilation failed while compiling Docs\index.htm.


which is said to be problem in help compiler where referenced file is missing.

See Readme.txt
(Still produces chm file, just that it opens wrongly).
Also, linkchecker-out.html show real missing targets "pad.gif" and "caution.gif".

Bye for now :)

(hope of some use).

EDIT: readme.txt

linkchecker-out.html output produced by Linkchecker on path

C:\TEM\ROOT\athelp_table.html

Which is a table of all source files produced by DirHTML as noted in athelp.txt
(paths ARE case dependant in linkchecker).

shows errors on pad.gif and caution.gif


On CHM compilation, produces error HHC5003
http://www.google.co.uk/search?site=&source=hp&q=HHC5003&oq=HHC5003&gs_l=hp.3..0j0i30k1l3.1552.1552.0.1822.1.1.0.0.0.0.204.204.2-1.1.0....0...1.1.64.hp..0.1.203.NA3wjvViVOc


athelp.log, compiler log

Microsoft HTML Help Compiler 4.74.8702

Compiling c:\TEM\ROOT\PluginSDK.chm

athelp.hhp
athelp.hhc
athelp.hhk
athelp_stoplist.txt
athelp_table.html
Copying.txt
athelp.txt
publish\directtest.script
publish\edittest.script
publish\filters.txt
publish\FilterTest.cmd
publish\filtertest.script
publish\languagetest.script
Docs\general_conventions.html
Docs\general_cpuextensions.html
Docs\general_devenv.html
Docs\general_dynamicloading.html
Docs\general_init.html
Docs\general_refcounting.html
Docs\index.html
Docs\inputdrv_autodetect.html
Docs\inputdrv_directmode.html
Docs\inputdrv_introduction.html
Docs\inputdrv_videodecoder.html
Docs\inputdrv_videodecodingmodel.html
Docs\inputdrv_videoframesvssamples.html
Docs\inputdrv_whatsnew.html
Docs\layout.css
Docs\legalinfo.html
Docs\pics\vdxa-border.png
Docs\pics\vdxa-overview.png
Docs\pics\vfbitmap.png
Docs\pics\vfframetiming.png
Docs\pics\vfframetiming2.png
Docs\ref_enum_VDXPixmapFormat.html
Docs\ref_iface_IVDXAContext__summary.html
Docs\ref_iface_IVDXAContext_CreateFragmentProgram.html
Docs\ref_iface_IVDXAContext_CreateRenderTexture.html
Docs\ref_iface_IVDXAContext_CreateTexture2D.html
Docs\ref_iface_IVDXAContext_DestroyObject.html
Docs\ref_iface_IVDXAContext_DrawRect.html
Docs\ref_iface_IVDXAContext_FillRects.html
Docs\ref_iface_IVDXAContext_GetTextureDesc.html
Docs\ref_iface_IVDXAContext_SetFragmentProgramConstF.html
Docs\ref_iface_IVDXAContext_SetSampler.html
Docs\ref_iface_IVDXAContext_SetTextureMatrix.html
Docs\ref_iface_IVDXAContext_SetTextureMatrixDual.html
Docs\ref_iface_IVDXAudioSource_GetAudioSourceInfo.html
Docs\ref_iface_IVDXFilterPreview__summary.html
Docs\ref_iface_IVDXFilterPreview_Close.html
Docs\ref_iface_IVDXFilterPreview_InitButton.html
Docs\ref_iface_IVDXFilterPreview_isPreviewEnabled.html
Docs\ref_iface_IVDXFilterPreview_RedoFrame.html
Docs\ref_iface_IVDXFilterPreview_RedoSystem.html
Docs\ref_iface_IVDXFilterPreview_SampleCurrentFrame.html
Docs\ref_iface_IVDXFilterPreview_SampleFrames.html
Docs\ref_iface_IVDXFilterPreview_SetButtonCallback.html
Docs\ref_iface_IVDXFilterPreview_SetSampleCallback.html
Docs\ref_iface_IVDXFilterPreview_Toggle.html
Docs\ref_iface_IVDXFilterPreview_UndoSystem.html
Docs\ref_iface_IVDXFilterPreview2__summary.html
Docs\ref_iface_IVDXFilterPreview2_IsPreviewDisplayed.html
Docs\ref_iface_IVDXInputDriver_CreateInputFile.html
Docs\ref_iface_IVDXInputDriver_DetectBySignature.html
Docs\ref_iface_IVDXInputFile_Append.html
Docs\ref_iface_IVDXInputFile_CreateOptions.html
Docs\ref_iface_IVDXInputFile_DisplayInfo.html
Docs\ref_iface_IVDXInputFile_GetAudioSource.html
Docs\ref_iface_IVDXInputFile_GetVideoSource.html
Docs\ref_iface_IVDXInputFile_Init.html
Docs\ref_iface_IVDXInputFile_PromptForOptions.html
Docs\ref_iface_IVDXInputOptions_Write.html
Docs\ref_iface_IVDXPluginCallbacks_GetCPUFeatureFlags.html
Docs\ref_iface_IVDXPluginCallbacks_SetError.html
Docs\ref_iface_IVDXPluginCallbacks_SetErrorOutOfMemory.html
Docs\ref_iface_IVDXStreamSource_GetDecodeErrorMode.html
Docs\ref_iface_IVDXStreamSource_GetDirectFormat.html
Docs\ref_iface_IVDXStreamSource_GetDirectFormatLen.html
Docs\ref_iface_IVDXStreamSource_GetStreamSourceInfo.html
Docs\ref_iface_IVDXStreamSource_IsDecodeErrorModeSupported.html
Docs\ref_iface_IVDXStreamSource_IsVBR.html
Docs\ref_iface_IVDXStreamSource_PositionToTimeVBR.html
Docs\ref_iface_IVDXStreamSource_Read.html
Docs\ref_iface_IVDXStreamSource_SetDecodeErrorMode.html
Docs\ref_iface_IVDXStreamSource_TimeToPositionVBR.html
Docs\ref_iface_IVDXStreamSourceV3_GetStreamSourceInfoV3.html
Docs\ref_iface_IVDXUnknown_AddRef.html
Docs\ref_iface_IVDXUnknown_AsInterface.html
Docs\ref_iface_IVDXUnknown_Release.html
Docs\ref_iface_IVDXVideoDecoder_DecodeFrame.html
Docs\ref_iface_IVDXVideoDecoder_GetDecodePadding.html
Docs\ref_iface_IVDXVideoDecoder_GetFrameBuffer_1.html
Docs\ref_iface_IVDXVideoDecoder_GetFrameBuffer_2.html
Docs\ref_iface_IVDXVideoDecoder_IsDecodable.html
Docs\ref_iface_IVDXVideoDecoder_IsFrameBufferValid.html
Docs\ref_iface_IVDXVideoDecoder_Reset.html
Docs\ref_iface_IVDXVideoDecoder_SetDecompressedFormat.html
Docs\ref_iface_IVDXVideoDecoder_SetTargetFormat.html
Docs\ref_iface_IVDXVideoDecoderModel_GetNextRequiredSample.html
Docs\ref_iface_IVDXVideoDecoderModel_GetRequiredCount.html
Docs\ref_iface_IVDXVideoDecoderModel_Reset.html
Docs\ref_iface_IVDXVideoDecoderModel_SetDesiredFrame.html
Docs\ref_iface_IVDXVideoPrefetcher_PrefetchFrame.html
Docs\ref_iface_IVDXVideoPrefetcher_PrefetchFrameDirect.html
Docs\ref_iface_IVDXVideoPrefetcher_PrefetchFrameSymbolic.html
Docs\ref_iface_IVDXVideoSource_CreateVideoDecoder.html
Docs\ref_iface_IVDXVideoSource_CreateVideoDecoderModel.html
Docs\ref_iface_IVDXVideoSource_GetFrameNumberForSample.html
Docs\ref_iface_IVDXVideoSource_GetRealFrame.html
Docs\ref_iface_IVDXVideoSource_GetSampleBytePosition.html
Docs\ref_iface_IVDXVideoSource_GetSampleInfo.html
Docs\ref_iface_IVDXVideoSource_GetSampleNumberForFrame.html
Docs\ref_iface_IVDXVideoSource_GetVideoSourceInfo.html
Docs\ref_iface_IVDXVideoSource_IsKey.html
Docs\ref_struct_VDXBitmap.html
Docs\ref_struct_VDXFBitmap.html
Docs\ref_struct_VDXFilterStateInfo.html
Docs\ref_struct_VDXFraction.html
Docs\ref_struct_VDXInputDriverDefinition.html
Docs\ref_struct_VDXPixmap.html
Docs\ref_struct_VDXStreamSourceInfoV3.html
Docs\ref_struct_VDXVideoFrameInfo.html
Docs\ref_vfcallback_addFilter.html
Docs\ref_vfcallback_Except.html
Docs\ref_vfcallback_ExceptOutOfMemory.html
Docs\ref_vfcallback_getCPUFlags.html
Docs\ref_vfcallback_getHostVersionInfo.html
Docs\ref_vfcallback_InitVTables.html
Docs\ref_vfcallback_isFPUEnabled.html
Docs\ref_vfcallback_isMMXEnabled.html
Docs\ref_vfcallback_removeFilter.html
Docs\ref_vfmethod_accelRunProc.html
Docs\ref_vfmethod_configProc.html
Docs\ref_vfmethod_copyProc.html
Docs\ref_vfmethod_copyProc2.html
Docs\ref_vfmethod_deinitProc.html
Docs\ref_vfmethod_endProc.html
Docs\ref_vfmethod_eventProc.html
Docs\ref_vfmethod_fssProc.html
Docs\ref_vfmethod_initProc.html
Docs\ref_vfmethod_paramProc.html
Docs\ref_vfmethod_prefetchProc.html
Docs\ref_vfmethod_prefetchProc2.html
Docs\ref_vfmethod_runProc.html
Docs\ref_vfmethod_startProc.html
Docs\ref_vfmethod_stringProc.html
Docs\ref_vfmethod_stringProc2.html
Docs\vdxa_3dbasics.html
Docs\vdxa_addingvdxasupport.html
Docs\vdxa_borderhandling.html
Docs\vdxa_drawingaquad.html
Docs\vdxa_fragmentprograms.html
Docs\vdxa_purpose.html
Docs\videofilt_aspectratio.html
Docs\videofilt_breakingchanges.html
Docs\videofilt_cpudependentoptimization.html
Docs\videofilt_creatingavideofilter.html
Docs\videofilt_creatingtimevaryingfilters.html
Docs\videofilt_deprecatedfeatures.html
Docs\videofilt_gotchas.html
Docs\videofilt_handlingbitmaps.html
Docs\videofilt_handlingmultiplesources.html
Docs\videofilt_introduction.html
Docs\videofilt_makingafilterconfigurable.html
Docs\videofilt_managingfilterdata.html
Docs\videofilt_migratingfromfiltersdk.html
Docs\videofilt_prefetchingmultiplesourceframes.html
Docs\videofilt_processingvideoframes.html
Docs\videofilt_programmingmodel.html
Docs\videofilt_scriptingsupport.html
Docs\videofilt_settingfilterparameters.html
Docs\videofilt_vdxframe_addingconfigurability.html
Docs\videofilt_vdxframe_addingscriptsupport.html
Docs\videofilt_vdxframe_creatingavideofilter.html
Docs\videofilt_vdxframe_gettingstarted.html
Docs\videofilt_vdxframe_writingthemoduleentrypoint.html
Docs\videofilt_whatsnew.html
Docs\whatsnew.html
HHC5003: Error: Compilation failed while compiling Docs\index.htm.


The following files were not compiled:
Docs\index.htm



EDIT: NOTE, I dont think the publish folder or contents are referenced in the help file.
If the project can be properley compiled, then should also carry with it all files necessary for decompile and recompile.

yup
29th May 2017, 14:29
Hi all!
I am loading in avisynth script grey image 16 bit (thanks pinterf last release).
Which colorspace I could choose in script for properly show in Virtualdub? Y16 show me colour image. ConvertToRGB64 excessive, especially if export from Virtualdub to tif.

yup.

shekh
29th May 2017, 15:09
Hi all!
I am loading in avisynth script grey image 16 bit (thanks pinterf last release).
Which colorspace I could choose in script for properly show in Virtualdub? Y16 show me colour image. ConvertToRGB64 excessive, especially if export from Virtualdub to tif.

yup.

Why excessive? Which method of export, external encoder to 16-bit grey?

Not many options anyway: ConvertToRGB64 or ConvertToYV24 or ConvertToYV12.

yup
29th May 2017, 15:14
shekh!
export to tiff.
In my case work only ConvertToRGB64.
yup.

shekh
29th May 2017, 15:26
Builtin export to 48bit tiff begins from rgb64 image anyway.

yup
29th May 2017, 17:18
shekh!
Thanks for explanation.
yup.

lansing
7th June 2017, 02:45
Hi I just tried out this version today, I want to report that you forgot to add a seek bar in the filter's preview window

raffriff42
7th June 2017, 02:56
>forgot to add a seek bar in the filter's preview window
The main seek bar continues to work in the filter preview.

lansing
7th June 2017, 04:10
>forgot to add a seek bar in the filter's preview window
The main seek bar continues to work in the filter preview.

Ok I see it now.

To OP,

I played around with the color correction filter, I still don't think it's practical for anything without monitors like the RGB parade, vectorscope and the waveform monitor.

Also in the filter chain, can there be an option to disable the auto conversion to RGB32 when the video entered the filter chain? Because I have filter that can read higher bit depth input, and I would feel like losing out with any unnecessary conversion in between.

shekh
7th June 2017, 08:33
I played around with the color correction filter, I still don't think it's practical for anything without monitors like the RGB parade, vectorscope and the waveform monitor.


The last advance in this area was this filter / filter box: https://sourceforge.net/p/vdfiltermod/wiki/MasterBlend/


Also in the filter chain, can there be an option to disable the auto conversion to RGB32 when the video entered the filter chain? Because I have filter that can read higher bit depth input, and I would feel like losing out with any unnecessary conversion in between.

What filter? Do you develop it? There is no auto conversion to RGB32. Only filter tells which format it can work in.

lansing
7th June 2017, 15:10
The last advance in this area was this filter / filter box: https://sourceforge.net/p/vdfiltermod/wiki/MasterBlend/

People who're doing color correction needed those monitors I mentioned, because they need to know what is too much on their color corrections. For example, I have a video that has a red color cast, I need the RGB parade to tell me how much I need to adjust on each channel. And right now, the histogram isn't helping much.

The new filter UI is kind of buggy too. If I open a filter and move the filter control window to the right side of the main program window, and click "show preview", the preview window will not show up.


What filter? Do you develop it? There is no auto conversion to RGB32. Only filter tells which format it can work in.

I'm using neat video. iirc the original Virtualdub will convert the source to RGB32 when passing into the filter chain. Now I load in a 10 bit h264 video and opened the filter chain and checked the "show image format", it then reads RGB32 on any filter I tried.

shekh
7th June 2017, 15:33
The new filter UI is kind of buggy too. If I open a filter and move the filter control window to the right side of the main program window, and click "show preview", the preview window will not show up.


It is how I attempt to manage screen space. Afaik preview always appeared to the right of filter GUI.
For me, it does not help when preview window overlaps other active windows, it does not help when preview extends beyond active monitor, and it does not help when I must move it manually each time over and over.
So these are problems I tried to solve. If you keep filter GUI on the left everything should be as planned.
Describe your idea, I will take it into account next time.


I'm using neat video. iirc the original Virtualdub will convert the source to RGB32 when passing into the filter chain. Now I load in a 10 bit h264 video and opened the filter chain and checked the "show image format", it then reads RGB32 on any filter I tried.

VD 1.9 series and older was capable of RGB32 filters only. Many old filters do not support anything else.
Not many filters in the wild support YUV, let alone 10 bit.
Some examples that work:
crop (null transform)
resize
flip vertical/horizontal

StainlessS
7th June 2017, 17:10
Shekh,

Can you confirm/deny that what I provided as chm help file source is what you required (I know it did not work fully successfully),
dont wanna waste further time (when I have some) if I misinterpreted your requirement.

Thanx.

shekh
7th June 2017, 17:36
Shekh,

Can you confirm/deny that what I provided as chm help file source is what you required (I know it did not work fully successfully),
dont wanna waste further time (when I have some) if I misinterpreted your requirement.

Thanx.

Yes please don't waste time on it.
VirtualDub.chm is compiled from plain text sources with a special utility, so I thought maybe sdk.chm was prepared the same way. Just wanted to take a look and archive it.

jpsdr
7th June 2017, 19:02
@lansing
The VirtualDub version of Neatvideo can do only 8 bits for now.

StainlessS
7th June 2017, 20:41
Yes please don't waste time on it.
VirtualDub.chm is compiled from plain text sources with a special utility, so I thought maybe sdk.chm was prepared the same way. Just wanted to take a look and archive it.

You can find html -> text converters, I assume that would not be sufficient.

No reply necessary.

lansing
7th June 2017, 20:43
It is how I attempt to manage screen space. Afaik preview always appeared to the right of filter GUI.
For me, it does not help when preview window overlaps other active windows, it does not help when preview extends beyond active monitor, and it does not help when I must move it manually each time over and over.
So these are problems I tried to solve. If you keep filter GUI on the left everything should be as planned.
Describe your idea, I will take it into account next time.


The whole auto resize on the preview window now is based on the position and size of the main window, which creates problems. What happen if my main window was docked on the left side of the screen? And my video resolution is 1920x1080? What happen if I shrink the main window so that it only shows the "input" screen? In all 3 cases the previewing method now will fail, the window will either look out of proportion or not show up at all.


VD 1.9 series and older was capable of RGB32 filters only. Many old filters do not support anything else.
Not many filters in the wild support YUV, let alone 10 bit.
Some examples that work:
crop (null transform)
resize
flip vertical/horizontal
Ok I see, so this new version support higher bit in the filter chain, my 10 bit video stays at 10 bit input/output with "resize" and "flip vertical" filters, not "flip horizontal" though. And I found out that neatvideo haven't support higher bit depth on virtualdub yet.

Another question, I don't know if it has to do with Vdub. In the older version, if I was to load a vdub filter in Avisynth, I will need to convert the video to RGB32 before adding the filter, obviously this step won't be mandatory now with this newer version. So has the VDubfilter.dll in AVS+ updated to work with this newer version?

shekh
7th June 2017, 21:27
What happen if my main window was docked on the left side of the screen?


Docked - what does it mean? Some screenshots may help.


What happen if I shrink the main window so that it only shows the "input" screen?


And why you do that? Because right side is for browser to assist with drag-n-drop or something?

Just to explain my decisions:
- I never use shrinked main window except for testing. I made "maximize" option to get rid of title bar, and plan to acquire some remaining non-client space eventually.
- I assume if someone moved/shrinked main window, they want dependent windows be positioned/shrinked the same way.


Another question, I don't know if it has to do with Vdub. In the older version, if I was to load a vdub filter in Avisynth, I will need to convert the video to RGB32 before adding the filter, obviously this step won't be mandatory now with this newer version. So has the VDubfilter.dll in AVS+ updated to work with this newer version?

Last time I checked (year ago?) it wasn't working.

lansing
7th June 2017, 22:58
Docked - what does it mean? Some screenshots may help.
In windows 7 or later, when you drag a window to the left/right edge of the screen, the window will auto maximize and take up half the size of the screen. Well that was just an example, basically, the filter preview window will not show up if you move the main window anywhere to the left side of the screen.



And why you do that? Because right side is for browser to assist with drag-n-drop or something?

Just to explain my decisions:
- I never use shrinked main window except for testing. I made "maximize" option to get rid of title bar, and plan to acquire some remaining non-client space eventually.
- I assume if someone moved/shrinked main window, they want dependent windows be positioned/shrinked the same way.


um...because I multitask and sometime I don't need it. If I wanted to see a before/after effect, I would set a hotkey for toggle screen and tap it when I needed it.


Last time I checked (year ago?) it wasn't working.
Ok so I'm not going to bother with AVS+ then, it's giving me a headache.

lansing
12th June 2017, 15:53
I tried to open a vapoursynth script with 10 bit video output and I got an error "couldn't locate decompressor for format 'P010' (unknown)"

shekh
12th June 2017, 16:11
I tried to open a vapoursynth script with 10 bit video output and I got an error "couldn't locate decompressor for format 'P010' (unknown)"

https://sourceforge.net/p/vdfiltermod/wiki/format_changes/#deep-color-input-options
not implemented yet

lansing
12th June 2017, 16:17
https://sourceforge.net/p/vdfiltermod/wiki/format_changes/#deep-color-input-options
not implemented yet

ok thanks

lansing
19th June 2017, 23:51
Hi, there's a bug in the capture mode. Every time I go to video->levels, the white balance will always reset to the far left of the bar, and a new ui window will come up each time

shekh
20th June 2017, 00:16
Hi, there's a bug in the capture mode. Every time I go to video->levels, the white balance will always reset to the far left of the bar, and a new ui window will come up each time

Hi. It can help understanding if you make a screen recording of what is going on. However I don't remember myself touching that, do you see the same problem with classic vd? Also probably this is driver specific and hopeless. What is the capture device anyway?

p.s. Ok, the part with multiple windows is clear now, very simple :)

lansing
20th June 2017, 05:11
Hi. It can help understanding if you make a screen recording of what is going on. However I don't remember myself touching that, do you see the same problem with classic vd? Also probably this is driver specific and hopeless. What is the capture device anyway?

p.s. Ok, the part with multiple windows is clear now, very simple :)

Yeah this problem exist for a long time. I'm using a Logitech webcam, I can adjust the camera level through either Logitech's own "capture filter" or the level setting in Virtualdub, I like the latter one better because it has more controls. Every time I opened the levels window, the white balance will reset, it doesn't remember my previous setting, and my whole screen will turn blue-ish.

http://i.imgur.com/JVjPA74.jpg

lansing
21st June 2017, 03:41
Hi I have seeking problem with version 16. On a 1080p mkv, memory usage spiked to 100% and the program hangs when I tried to seek. On a blu-ray TS file, seeking will sometime give me an error "error reading source frame xxxx: requested frame not found"

shekh
21st June 2017, 09:10
Hi I have seeking problem with version 16. On a 1080p mkv, memory usage spiked to 100% and the program hangs when I tried to seek.


Can you share the sample?


On a blu-ray TS file, seeking will sometime give me an error "error reading source frame xxxx: requested frame not found"

This is planned behavior with some unlucky files. AFAIK TS lacks information for simple seeking, and I use just simple seeking as implemented in ffmpeg. Other possible reason: no keyframes in the file (intra refresh). Same story, simple seeking is not able to reach exact frame.

lansing
21st June 2017, 16:34
Can you share the sample?



Oh I make a wrong description, the one that spikes up on seek is the cpu usage. Sample here, it's 720x546, seeking seems to work fine for the first 1:52, then any seek after that will spike cpu usage to 100%

sample (http://www.mediafire.com/file/dpv1cthi146a5q6/vd_test.mkv)

This is planned behavior with some unlucky files. AFAIK TS lacks information for simple seeking, and I use just simple seeking as implemented in ffmpeg. Other possible reason: no keyframes in the file (intra refresh). Same story, simple seeking is not able to reach exact frame.

This happens to all my TS files, it either gives me this error or it just shows like 5 frames.


Another problem I saw, on a 1920x1080 x264 10 bit mkv, memory jumps to 3.2G on a few random seeks and capped there.

With a 1920x1080 x264 8 bit mkv, memory usage will cap at 1.6G on the same procedure.

And for both type above, clicking the play0 button will kind of froze the program. It didn't hangs but the program didn't respond to any command after.

shekh
21st June 2017, 18:22
Oh I make a wrong description, the one that spikes up on seek is the cpu usage. Sample here, it's 720x546, seeking seems to work fine for the first 1:52, then any seek after that will spike cpu usage to 100%


Looks like "hangs" here is wrong too. Yes it takes time to decode but eventually it does finish.
I know one problem which I may try to solve: currently "caching input driver" does not allow to abort decoding. This can make a difference if you request one frame, and immediately request another. With fcchandler mkv driver you can do this, gui will appear more responsive, but to get any picture displayed you actually have to wait. It is a 250 frame gop.
Btw it may help if you see keyframes, press edit->markers from keys.


Another problem I saw, on a 1920x1080 x264 10 bit mkv, memory jumps to 3.2G on a few random seeks and capped there.

With a 1920x1080 x264 8 bit mkv, memory usage will cap at 1.6G on the same procedure.

And for both type above, clicking the play0 button will kind of froze the program. It didn't hangs but the program didn't respond to any command after.

Nothing wrong about memory. With long gop and large frames it can take all your memory. You can see about memory use in "file information" dialog.
"didn't respond" is not good, did you have to terminate the process? How much memory you had (total physical)? Maybe OS tried hard to swap out to disk?

lansing
21st June 2017, 23:36
Looks like "hangs" here is wrong too. Yes it takes time to decode but eventually it does finish.
I know one problem which I may try to solve: currently "caching input driver" does not allow to abort decoding. This can make a difference if you request one frame, and immediately request another. With fcchandler mkv driver you can do this, gui will appear more responsive, but to get any picture displayed you actually have to wait. It is a 250 frame gop.
Btw it may help if you see keyframes, press edit->markers from keys.



Nothing wrong about memory. With long gop and large frames it can take all your memory. You can see about memory use in "file information" dialog.


The sample is only 3 minutes out of a 2 hours long video. On the full video, one random seek will hangs the program for 3+ minutes, I lost patient after the 3 minute count, so the actual decoding time could be double or triple. And this problem only happens to a few of my videos, the rest seeks very fast.

I tried the same video on Avidemux, it only took about 6 seconds to create the index, and after that every seek and playback is instant displayed. And in comparison, the memory usage in Avidemux is significantly lower too. With a 1080p video, it needs no more than 170MB.

"didn't respond" is not good, did you have to terminate the process? How much memory you had (total physical)? Maybe OS tried hard to swap out to disk?

I have 16G RAM. I think it has to do with needing more time to decode, the same as the seek problems

LigH
22nd June 2017, 08:12
Having a video without a (valid) keyframe index is a quite probable reason for seeking issues, especially when the video stream has timecode discontinuities. You said it was better after Avidemux reconstructed such an index. Just remultiplexing the MKV might fix it.

TransportStreams don't store such an index at all, here the playback can only rely on video stream timecodes, and when the whole file is concatenated from different "programmes" with individual timecode ranges, then an "accurate" seeking will search the wrong offset forever (a "lazy" seeking would just play the next possible position based on the percentage of the file size).

shekh
22nd June 2017, 10:02
On a second look at "vd test.mkv" I see interesting problem. To reproduce: open, go-to frame 10000, see file information. It shows 10002 frames decoded vs expected ~250.
Now it is clear that when you seek 2 to hours into the video it wants to decode all 2 hours.
So it looks like some index heuristic failure. Maybe possible to fix.

lansing
31st July 2017, 14:36
Hi I found another bug, the "swap input/output pane" function doesn't work if the size of the input pane is bigger than the size of the program window

shekh
13th August 2017, 21:20
Hi I found another bug, the "swap input/output pane" function doesn't work if the size of the input pane is bigger than the size of the program window

fixed

lansing
25th August 2017, 22:41
I got a problem outputting Lagarith RGB compression. In the Lagarith setting, I set it to output RGB, but back at the compression selection window, the autoselect was forcing the output to YUV420.

shekh
25th August 2017, 23:12
"Autoselect" option is based on input format, if you don't want it just select "24 bit RGB" or anything else.

lansing
25th August 2017, 23:34
That autoselect option should also take consideration on what the individual compression codec uses as output, the users shouldn't need to do the same selection twice.

jpsdr
26th August 2017, 10:06
I don't know if a codec has the possibility notify a "prefered" output format, or if you have access to the "internal" native compression format. From what i've understood (if i'm not wrong), you ask a codec if it can output a specific format, and it answer yes or no. So probably autoselect ask for the the format in a specific order, and stop at the first "yes" answer. Setting Lagarith to ouput RGB doesn't mean it forces RGB, it probably means it will answer "yes" if you ask "Can you output RGB".
I think it works like this, but shekh should confirm if i've not said something wrong.

shekh
26th August 2017, 12:36
Yes, entire "output pixel format" selection is a workaround for VFW codecs. VFW defines no protocol to find out what format codec "wants" as the input.
With updated codecs like x264 I move the format decision to codec itself so there is no need and possibility to repeat this selection in vdub gui.
In theory, I could also do it for the lagarith codec, but in reality I don't want to spend time on it. Btw what is the benefit of lagarith vs utvideo?

Maybe good idea to rename "autoselect" to something less misleading. For me "auto" sounds like "smart choice/do not touch".

StainlessS
26th August 2017, 15:36
Btw what is the benefit of lagarith vs utvideo?

Well one is much smaller file size where many duplicates (some kind of repeat frame flags).

lansing
30th August 2017, 20:55
I ran into another problem, I have an old xvid+mp3 avi file, but the program is reporting as a mpeg4 stream and won't let me cut it with direct stream copy. I'm getting the error "The source video stream uses a compression algorithm which is not compatible with AV files". It works fine with the original Virtualdub.

shekh
30th August 2017, 21:13
Just press ctrl+o (file->open) and change input driver to AVI. You will get the original direct copy behavior.

lansing
30th August 2017, 21:26
Just press ctrl+o (file->open) and change input driver to AVI. You will get the original direct copy behavior.

Ok it works now.

angelxesone
3rd September 2017, 02:43
Hi Shekh..hi all..

Is there an option to the caching input driver to limit the amount of RAM to be used, or maybe how many frames it can cache?

I keep reaching my max RAM when doing full encodes, and seeing "out of memory", "thread not cycling", "stuck when trying to abort" and other errors.

It keeps eating RAM even doing full encodes in batch mode, which if I remember reading somewhere, should disable the caching, CMIIW.

Also, using the caching driver, when opening different video files it shows different max RAM / frames to cache for each video. How is this calculated? My guess is it's about the GOP size or something, I don't really understand how it works, sorry. Sometimes it's as small as 100MB with 50 frames, and the largest I've seen is 6GB with 500 frames on UHD videos (on my 16GB RAM machine).

I'm sorry if this is a stupid question, but I've read this thread (albeit speedily) and I cant find an answer to my problem.

BTW I'm doing encodes on a few (old, I know) Windows Server 2008 with 4GB RAM each. And doing 4K UHD encodes is killing the memory after a few minutes.
Right now I'm back using avisynth and it works great on 8bit sources, even UHD ones. When I'm seeing 10bit sources... I'm stuck.
Also with the old Windows Server, compability problems arise when I'm searching for (modern) tools on video encoding. (even using win xp compatible x265 builds)

Thank you for any advice.

shekh
3rd September 2017, 03:12
Actually I also run in trouble with some UHD, and thinking to add this option for max RAM. Currently the limit is based on total physical RAM and there is no way to change it.
It finds the maximum GOP length and assumes twice as much (but not less than 32) as desired cache size. Of course this caching is useless during encoding, but something prevents disabling it, I don't remember. Will look again.

shekh
17th September 2017, 22:41
With new version the RAM used by input driver is much smaller. There is option for cache size (default is 0.5 Gb) and an option to disable cache per file.
Also the cache shrinks automatically during encoding operation.

Other news: DIB format support is expanded with P010, P016, v410, Y410, r210, R10k.
Test modes (Tools->Create test video) can create 16-bit color cube etc. Also with alpha.
New internal filter DrawText works with: RGB 8, RGB 16, YUV 8, YUV 16, 4:4:4, 4:2:2, 4:2:0, full range, limited range, ...

Changed behavior of preview.
Old (wrong) behavior:
1) during preview the time slider runs ahead of actual displayed frame (+2 frames or something).
2) when you stop preview, the displayed frame would catch up the timeline (therefore it never stopped where I wanted).
Now it is all nice.

LigH
18th September 2017, 07:40
:thanks:

Optimization is always useful.

angelxesone
20th September 2017, 23:26
Thank you so much shekh for the caching driver update..
it works perfectly now, no more memory problems on UHD encodes..

lansing
21st September 2017, 17:48
I tried to frameserve a video in vd, I followed the instruction and installed the 64 bit version dll with the frameserver64.reg, I saved the frameserver file as avi. But the only program that can load the avi file is another instance of the vd filtermod itself, I couldn't open it with other programs.

shekh
21st September 2017, 18:16
I had same experience some time ago (with original VD). Also tried vfapi codec.
The target application must use avifile api or at least vfw api. I don't know the list of programs that support it. After effects: no. Vegas: no.
I even thought to ditch frameserving support alltogether, but it seems there is still some way to use it (from VD to Avisynth?)

stax76
21st September 2017, 18:22
in case somebody interested in frameserving from VD to staxrip:

https://github.com/stax76/staxrip/issues/159#issuecomment-299569068

lansing
25th September 2017, 02:42
I had same experience some time ago (with original VD). Also tried vfapi codec.
The target application must use avifile api or at least vfw api. I don't know the list of programs that support it. After effects: no. Vegas: no.
I even thought to ditch frameserving support alltogether, but it seems there is still some way to use it (from VD to Avisynth?)

After more testings, the 32 bit version of avisynth+ and vapoursynth also works, don't know why the 64 bit doesn't.

shekh
25th September 2017, 05:04
After more testings, the 32 bit version of avisynth+ and vapoursynth also works, don't know why the 64 bit doesn't.

Just tried, all works through VapourSynth.
Check your setup procedures (in any order):
1) apply frameserver64.reg
2) copy vdremote64.dll, vdsvrlnk64.dll to system32
3) copy vdremote.dll, vdsvrlnk.dll to syswow64

Step 3 seems already ok for you but 1&2 maybe failed.
You should perform procedures using win64 compatible software. To be sure, try with explorer.

lansing
25th September 2017, 07:31
Ok I figured out my problem, it was caused by the teracopy program I use not copying the file to the system32 folder and giving me wrong feedback about the file existed in the folder already. Now both vapousynth and avs+ 64 bit version works.

lansing
7th October 2017, 21:17
The "filter chain" in capture mode seems to be broken for a long time. I tried to brighten the shadow part of my webcam capture by raising gamma, but there's no gamma slider in the "levels" setting, then I tried to do it with the gamma on the vd's levels filter, but the filter chain doesn't work...

shekh
7th October 2017, 21:47
Are you sure it is different from the original? It works for me, but for some reason I have to
* enable filter
* enable filter chain
* enable preview mode
* set preview acceleration to "something progressive"

I don't know why it is so difficult :)

lansing
7th October 2017, 22:33
Are you sure it is different from the original? It works for me, but for some reason I have to
* enable filter
* enable filter chain
* enable preview mode
* set preview acceleration to "something progressive"

I don't know why it is so difficult :)

Oh it works. I was setting the video mode to "overlay" the whole time. That solved a long time mystery to me. Thanks.

Ben_Nicholls
30th October 2017, 18:26
Been using this for a while. Can safely safely say it is as stable as any other build!

Emulgator
31st October 2017, 17:12
Hi shekh, many thank for your continued work !
While starting your newest 32bit build 40463 on my Win7U64 SP1 a fault window popped up:

"Unable to locate svml_dispmd.dll..."

The main window starts nevertheless with a small delay.
I did not do any further testing, just to let you know...

-----------------------------------------
P.S. Going back in history:
From your available (to me) VD builds:
32bit Build 38098 is the last that does not throw this fault.
32bit Build 38401 starts to introduce that fault.
64bit Builds (Veedub64.exe) are unaffected.
---------------------------------------

I quote from

https://software.intel.com/en-us/forums/intel-c-compiler/topic/285859


alienskinsoftware
Tue, 01/04/2011 - 11:49
Hi, I have building a project on my development machine using the Intel Compiler.
I can run the application fine but when I give a build to someone that doesn't have the development environment,
they get an error locating the dll svml_dispmd.dll.
If I explicitly link with svml_dispmd.lib, the error goes away but I would rather not have to complicate our build.
Also, this error seems to be new. Does anyone have any ideas what might have caused this?

Thanks
[Status Points: 655 (Total Points: 51,185)]

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

Jennifer J. (Intel)
Tue, 01/04/2011 - 13:02

This is expected.

On the non-development machine you need to install the redistributables from here
http://software.intel.com/en-us/articles/redistributable-libraries-for-the-intel-c-and-visual-fortran-composer-xe-for-windows/.
Make sure to test the right version of redistributables.

13 updates listed beside the RTM. ouch...

shekh
31st October 2017, 17:37
Very strange issue. No module links to svml_dispmd.dll and I do not use Intel compiler.
Some ideas:
check that you get archive prepared by me (there are some other which I don't track).
Try deleting plugins.
If there is chance to save advanced error log, post it here.

Emulgator
31st October 2017, 18:00
Now that I have thrown a DV-AVI video on that 32bit VD build 40463 window the fault message did not come back again.
No big changes, just put Gunnar Thalin's Deshaker plugins 32 and 64 into plugin folders 32 and 64
and ran both VD 32 and 64 just for fun.
And I remember now to have used the 32 bit versions above 38401 with success before.
Must be something fishy on my particular system's side.
Will test on 4 more systems.
Sorry for the inconvenience, shekh and: большое спасибо !

P.S: All VD archives were downloaded from sourceforge.

shekh
7th November 2017, 10:24
Did I say in message #1 I wanted CineForm? :)
https://sourceforge.net/p/vdfiltermod/wiki/cineform/

Emulgator
7th November 2017, 19:52
You da man !

BTW, I have a testfile here (.mp4) rendered straight out of Sony Vegas Pro 13
which makes VD preview window exhibit a horizontal pixel shift of x:=(x+2) per line, but only if VD window has focus.

If a different window obtains focus, VD windows shows correct preview. The same source decodes in MPC-HC, MPC-BE under LAV fine.
Win7U64 SP1, nVidia Quadro K5000M, driver 372.95

Affected: 40539, 40463, 40464
Not Affected: 40538...

Eek, thats fishy: The same version can work and not work. I happened to hit F1 and the behaviour changed. Gah.
Maybe my side again ? Unfortunately the other systems are out of reach now. The svml_dispmd.dll window came back.
Interference on my systems side, but by whom ?...

General
Complete name : F:\V13 Wanja Teaser.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/isom)
File size : 16.1 MiB
Duration : 1 min 20 s
Overall bit rate mode : Variable
Overall bit rate : 1 665 kb/s
Encoded date : UTC 2017-05-17 13:57:45
Tagged date : UTC 2017-05-17 13:57:45

Video
ID : 2
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 3 frames
Format settings, GOP : M=4, N=15
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 min 20 s
Bit rate mode : Variable
Bit rate : 1 533 kb/s
Maximum bit rate : 2 000 kb/s
Width : 854 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 24.000 FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.156
Stream size : 14.8 MiB (92%)
Language : English
Encoded date : UTC 2017-05-17 13:57:45
Tagged date : UTC 2017-05-17 13:57:45
Color range : Limited

Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 1 min 20 s
Bit rate mode : Constant
Bit rate : 128 kb/s
Channel(s) : channel0
Channel(s)_Original : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 1.23 MiB (8%)
Language : English
Encoded date : UTC 2017-05-17 13:57:45
Tagged date : UTC 2017-05-17 13:57:45

shekh
7th November 2017, 20:15
Do you have "using overlays" in display options? Overlays often are buggy in drivers/hardware.

Emulgator
7th November 2017, 23:02
Overlays are disabled in VD. Will try soon in WinXP32SP3.

Emulgator
8th November 2017, 22:40
WinXP32SP3: I tested 23 VD 32 bit versions from 35491 to 40538.
All do work properly and preview that 854x480 pixel .mp4 source without skewing.

Back to the infamous Win7U64SP1 system:
With almost all 32 bit VD versions (20 of 23) the testfile triggered that preview-skewing-while-focus by 2 pixels per line
Only the three VD32 versions that throw the missing svml_dispmd.dll fault were exempt from that behaviour:
37277, 37285 and 37341.
(37341 under WinXP32SP3 showed a nice artistic layered memory delay effect when scrubbing through timeline.)

While trying other sources it became obvious that only .mp4 sources that have a width not divisible by 4
would trigger that preview-skewing-while-focus by 2 pixels per line on that particular system in VD.
(854 width :4 = 213,5 This yields 2 pixels overflow)
(630 width :4 = 157,5 This yields 2 pixels overflow)

.mp4 sources with width divisible by 4 do preview-while-focus/play without skewing.

[Your hint regarding overlay seems to hit the nail. There is definitely something going on like this.
Sometimes on focus changes the screen is built up new for a split second.
For instance starting and closing TotalMediaTheatre5 leaves me with a desktop and windows changed.
All occurrences of Tahoma fonts replaced by the Win7 Standard font SegoeUI.]

Soon I will try on a different Win7U64SP1.

shekh: Many thanks for your PM in Russian !
While this is not my native tongue, I only seem to remember some phrases from school,
not sufficient for our technical conversation. But I used Google Translator with good success.

shekh
8th November 2017, 22:55
oops. Thought you are russian because of "большое спасибо" :) Never mind.
Waiting your mp4 sample and settings..

Well I tried different things and saw skewing with OpenGL display. Are you using that?

Emulgator
8th November 2017, 23:29
Updated to nVidia 388.16: No change.

OpenGL: Yes, I had that ticked. Unticked: Fault gone ! Congratulations ! поздравление !
(I had 7 years russian in school, slowly finding that back)

shekh
8th November 2017, 23:49
I recommend using option "Use Direct3D (requires DirectX 9)" - it is most feature complete. Also uncheck "Disable accelerated display when inactive" - this only makes pointless flickering.

Emulgator
9th November 2017, 08:49
Beautiful. Just did that.

Just for confirmation: back to a different long unused WinXP32SP3 system, VD 1.10.4 and 1.10.5:
Ticking OpenGL (was unticked before there) brought the skewing in there as well with non-mod4-widths.
So this is a long-standing bug and has nothing to do with newly introduced faults by your builds.

LigH
17th November 2017, 20:42
Feature request:

Could you imagine creating a kind of AviSynth.vdf which is able to process a filtering script via AviSynth(+) internally, using the source loaded in VirtualDub (analog to ffdshow_source() (http://ffdshow-tryout.sourceforge.net/wiki/video:avisynth))? Some people may enjoy not to think as much about trying different source plugins when your ffmpeg input plugin can handle most of them as well...

(idea of user H264x in the German doom9/Gleitz board)

shekh
17th November 2017, 23:18
I imagine how it should work, but not where to get time for everything :)

Btw, about Full processing/Normal recompress/Fast recompress: there is no straightforward difference. I saw variation in some hidden details which are difficult to observe/explain.
"Fast recompress" tries to set decoding and encoding formats automatically (not very helpful unless at least source or destination is VFW codec).
Normal recompress does not let you setup filters, but also does not disable them. I can't explain this.
IMO only Full processing should remain of these 3 modes.

LigH
18th November 2017, 00:19
Well, now that there are YUV filters, you may. Before, VirtualDub could handle YUV conversions, but only supported RGB filters. In these times it may have made more sense.

StainlessS
29th November 2017, 01:19
Tried update from a few weeks ago, VDFM, build 40501, failed on load simple script (XP32)

Version

Error, "FFMPEG Could not open file" [or words very similar].

Update to build 40639 (current), problem gone.
Dont know what you did but we are fine now. Thanx. :)

shekh
29th November 2017, 01:29
I did nothing, but you are welcome :)

Very long ago FFMPEG was taking over some scripts detecting them as mpegts.

StainlessS
29th November 2017, 01:36
One comment on very short play with current ver$ [a few minutes only], its a bit annoying having to pause scrolling to have display update,
think that there must have been some mod to that since the earlier version I was using (from several months ago).
Guess I could learn to live with it.

EDIT: Scroll via mouse/timeline.

EDIT: Sorry Shekh, false alarm, the script I was using was quite heavy, and caused delay in display,
bypassed heavy processing and is very responsive, just ignore me :stupid:

EDIT: Although Vdubmod does not cause unresponsive display using same heavy processing script, and I think neither did
the previous version VDFM that I was using. As I said, I can live with it. Thanx again.
EDIT: Just scrolled 20 minutes through clip before update occurred, probably paused because my mouse pad is quite small
and ran out of space. (20 mins of 34 minute duration clip, so 2/3 the way through)

shekh
29th November 2017, 01:48
I think you want to disable "Options->Drop frames when seeking".
After initial fix in this story, another user complained about poor seeking performance so I restored default behavior and made this option.
(turns out there is different use case involving very long GOP sources and fcchandler mkv)

StainlessS
29th November 2017, 02:04
Disabled "Drop frame when seeking", no change.
The script I'm using does quite a lot of processing including Autocrop, AutoContrast, MCDegrain, FFT3DFilter, Resize and more.
I just find it a little disconcerting to not know where in the clip I am, will have to get used to using keyboard I guess.
EDIT: Or perfect my Scroll - Stop - Scroll - Stop, technique :)

AKBabel
29th November 2017, 18:03
Hi to all,
I have noticed, that the FFV1 encoder configuration window doesn’t show all possible settings for this codec. You can actually also define an interframe compression by using the GOP argument of ffmpeg:
https://trac.ffmpeg.org/wiki/Encode/FFV1
Why Golomb Rice coding could just be applied to 8Bit Video?

shekh
29th November 2017, 18:16
Hi, to set GOP argument you can use VirtualDub`s "Force keyframes every ... frames" option. It also overrides maximum gop for x264, x265 etc.

Why Golomb Rice coding could just be applied to 8Bit Video
It is limitation of the FFV1 codec itself.

AKBabel
29th November 2017, 19:01
Thank you.
I have tried, now and it works.
But it doesn’t affect file size that much in this case.
So maybe I’ll stay with every frame as keyframe.

shekh
29th November 2017, 19:12
Yes, it does not help with photographic sources. Maybe works better with something like cartoon, I don't know.

AKBabel
4th December 2017, 20:08
Is there any chance to include a flac audio encoder in the VirtualDub modification?

shekh
4th December 2017, 21:01
Is there any chance to include a flac audio encoder in the VirtualDub modification?

Chance is good
I already experimented with it and the good news flac is supported in wav/avi formats. The main difficulty is VirtualDub's AVI interleaving algorithm (there was something missing in it).

sneaker_ger
4th December 2017, 21:12
AVI isn't really build for variable frame length formats. So for FLAC in AVI you should at least use constant frame lengths. (Or better yet: don't implement it at all. Let old containers die ... )

LigH
4th December 2017, 22:16
But VDubFilterMod does not only save AVI. It can also save more modern and flexible containers. — Now I wonder whether it is possible to restrict the content format selection to output containers.

shekh
5th December 2017, 12:48
Now I wonder whether it is possible to restrict the content format selection to output containers.

I'm thinking about this. It is possible (not easy) to find which formats are compatible. Making the UI right is more difficult. There should be single "compression dialog" with file format, video and audio.

SeeMoreDigital
5th December 2017, 15:46
But VDubFilterMod does not only save AVI. It can also save more modern and flexible containers...Is there any particular reason why the default output container is still .AVI. Could it not be say, .MKV?

StainlessS
5th December 2017, 16:28
Is there any particular reason why the default output container is still .AVI. Could it not be say, .MKV?

Should not be changed unless user sets some preference, default should always be AVI.

SeeMoreDigital
5th December 2017, 16:39
Should not be changed unless user sets some preference, default should always be AVI.Any particular or technical reason "why" this has to be the case?

The AVI container is so last millennium. It should have been phased out years ago. :scared:

shekh
5th December 2017, 17:30
The AVI container is so last millennium. It should have been phased out years ago. :scared:

Many things work perfectly in AVI. It is as good as TGA which is also simple and old.
There is long list of very legacy features.
Who will benefit from this changed default?

Things which do not work in MKV now:
Uncompressed video: not tested at all.
Audio offset: not applied (maybe will fix soon).
File comments: maybe not important at all.

Also, technically you can delete any plugin and live without it.
And since MKV output is in the plugin, how can it be the default? :)

AKBabel
6th December 2017, 09:50
Any particular or technical reason "why" this has to be the case?

The AVI container is so last millennium. It should have been phased out years ago. :scared:
Every format has its advantages and disadvantages.
AVI is still alive and it is supported and used, also for archiving.
Things which do not work in MKV now:
Uncompressed video: not tested at all.
Audio offset: not applied (maybe will fix soon).
File comments: maybe not important at all.
Well, mkv is seen as a new free solution for archiving, exactly because of the file comments, its easy editable header structure and its ability to perform a content check via CRC (https://kieranjol.wordpress.com/2016/10/07/introduction-to-ffv1-and-matroska-for-film-scans/).
I saw it also at this year’s IASA conference and that is the reason why I am here, because I consider it as a possible solution beside IMF for our archive.

So, it also would be ideal if there could be a menu inside VirtualDub to edit the metadata of the mkv header (aspect ratio, cropping etc.)

LigH
6th December 2017, 10:07
VDubFilterMod has already come a long way since Avery Lee's original VirtualDub, easily passed VirtualDubMod; and its possible future sounds promising with such an inspiration.

SeeMoreDigital
6th December 2017, 10:41
Things which do not work in MKV now:
Uncompressed video: not tested at all.
Audio offset: not applied (maybe will fix soon).
File comments: maybe not important at all.

Also, technically you can delete any plugin and live without it.
And since MKV output is in the plugin, how can it be the default? :)In the course of my encoding work I receive A/V sources in many different formats. For many years I've been re-encoding them to 4.2.0 8-bit AVC Lossless and muxing them within the .mkv container.

Personally, I've never had a problem with them...

jpsdr
6th December 2017, 10:44
Well, i'm still using a lot AVI, because in my video processing, i have several steps, and i save each steps in lossless avi file (UT Video actualy), which is the easiest way. And it's the final AVI lossless file i feed to my encoder at the end. I absolutely don't want AVI to die, as said, each format as its benefit.

AKBabel
6th December 2017, 18:24
Today have tried to load 6K DPX files (roughly 205MB per file) in VirtualDub.
And it could open the sequence, even 16Bit per channel and with alpha. Seeking failed (that could also be a problem of the low access speed of the workstation).
But as I tried to encode it, VirtualDub crashed because it could’t allocate enough memory (for one frame I guess). I have tried to lower the resolution per resize and the encoding started, but it also ran out of memory after a few frames.

shekh
6th December 2017, 19:19
Today have tried to load 6K DPX files (roughly 205MB per file) in VirtualDub.
And it could open the sequence, even 16Bit per channel and with alpha. Seeking failed (that could also be a problem of the low access speed of the workstation).
But as I tried to encode it, VirtualDub crashed because it could’t allocate enough memory (for one frame I guess). I have tried to lower the resolution per resize and the encoding started, but it also ran out of memory after a few frames.

Encoding to what?
I experimented with 5000*2500@rgb48 converting to FFV1, and it used around 2GB for encoding. Are you trying with 32-bit version?

lansing
7th December 2017, 09:49
I encountered a bug, when I loaded in a 32 bit png, adjust the color using colormill, and then export it as single image out as png, the resulting image became all white.

wonkey_monkey
7th December 2017, 15:00
One comment on very short play with current ver$ [a few minutes only], its a bit annoying having to pause scrolling to have display update,
think that there must have been some mod to that since the earlier version I was using (from several months ago).


This is one of three annoying things that led me to alter and recompile VirtualDub myself (my instructions are still a sticky thread although it's out of date now).

Somewhere there is a condition that causes VirtualDub to give up on displaying a frame if it takes over 100ms, and you have scrolled onward in the meantime.

On the subject of AVI vs. MKV, doesn't MKV lack a frame index?

lansing
7th December 2017, 15:55
I found another bug with image export. When I loaded in a video and export a frame as single image, in the saving location window, the last output format was used as TIFF with its 2 setting "zip compressed" and "lzw compressed" enabled, and then when I clicked on a png file in the directory, the output format auto changed to png, but the settings didn't change.

AKBabel
7th December 2017, 16:06
Encoding to what?
FFV1

I experimented with 5000*2500@rgb48 converting to FFV1, and it used around 2GB for encoding. Are you trying with 32-bit version?
Yes, it was a 32bit version, also a 32bit system, as I found out now.
I’ll later try it with 64bit.

shekh
7th December 2017, 23:47
I found another bug with image export. When I loaded in a video and export a frame as single image, in the saving location window, the last output format was used as TIFF with its 2 setting "zip compressed" and "lzw compressed" enabled, and then when I clicked on a png file in the directory, the output format auto changed to png, but the settings didn't change.

Thanks, this is simple.


I encountered a bug, when I loaded in a 32 bit png, adjust the color using colormill, and then export it as single image out as png, the resulting image became all white.

This is interesting. In fact the image becomes transparent (not white) but you need to select dx9 display driver to be able to see it.

There are at least 3 problems:
1. the filter wipes alpha for no reason.
2. switching decode format to rgb24 does no help (this I will fix).
3. there is still no way to enable/disable alpha (will make something).

shekh
8th December 2017, 00:00
This is one of three annoying things that led me to alter and recompile VirtualDub myself (my instructions are still a sticky thread although it's out of date now).

Somewhere there is a condition that causes VirtualDub to give up on displaying a frame if it takes over 100ms, and you have scrolled onward in the meantime.


As I understand this problem, VD should display the frame when it is 100% decoded anyway as in the case with avisynth.
Display is not that slow to skip it.

wonkey_monkey
8th December 2017, 13:43
If you are on frame x, and use arrow keys or drag the slider to select frame y, it will start to decode frame y - but if, before it has finished, you arrow-key or drag to frame z, VirtualDub won't display frame y at all if the 100ms threshold is exceeded. Which is sort of reasonable, but makes it hard to scrub through the result of an intensive script, as you can't see where you are until stop dragging.

I forget the details, and the VirtualDub forum is now gone so I won't be able to find the post from Phaeron which told me which bit of the source code to change, but I do remember it was a 100ms threshold.

My other bugbear was that during encoding it displayed Time Elapsed, but not Time Remaining, which is by far the more useful number.

poisondeathray
10th December 2017, 17:15
A) (vdfm 40716 x64 and x86) - Video => Decode format for pixel format isn't respected for 10bit 422

e.g
1) load a prores 10bit422 source
2) file => file information will say yuv422p10le using caching input driver (so far so good)
3) video => fast recompress will say using conversion yuv422p16-709 ; so you cannot encode yuv422p10le directly (e.g. you won't be able to export v210 or cineform 10bit422 without other conversions with normal or full recompress ). Video compression menu will also report yuv422p16-709 . This is unexpected because yuv422p10le should be direct from decode => encode . If you select video=> compression => uncompressed I would expect v210 out, but you dont get v210.
4) forcing video=>decode format to v210 doesn't "stick"


B) slight color shift when using cineform . Not a 601/709 issue, but a Cr shift, very slight move away from teal to red. Not sure if it's related to conversion, but it affects both native and gopro implementation when using vdfm . I'll do some more tests and report back.
EDIT: color shift was user error. Inconsistent decoder / viewing method / some dithering differences .

shekh
11th December 2017, 11:09
A) (vdfm 40716 x64 and x86) - Video => Decode format for pixel format isn't respected for 10bit 422

e.g
1) load a prores 10bit422 source
2) file => file information will say yuv422p10le using caching input driver (so far so good)
3) video => fast recompress will say using conversion yuv422p16-709 ; so you cannot encode yuv422p10le directly (e.g. you won't be able to export v210 or cineform 10bit422 without other conversions with normal or full recompress ). Video compression menu will also report yuv422p16-709 . This is unexpected because yuv422p10le should be direct from decode => encode . If you select video=> compression => uncompressed I would expect v210 out, but you dont get v210.
4) forcing video=>decode format to v210 doesn't "stick"


I do not implement formats exactly as in FFMpeg. yuv422p16 in VDFM is perfect match format for everything from yuv422p9le to yuv422p16le with one caveat: instead of locking bitdepth I keep it as a per-frame metadata. If you feed yuv422p10le in and take yuv422p10le out of the pipeline, there is no scaling applied to pixel values. Except when this is needed for some filter. It is also possible to see the YUV values in filter preview through color picker so you can make sure it looks like 10-bit data (crop filter is good to access this feature because crop itself does not change pixels).
yuv422p10le -> yuv422p16 -> yuv422p10le is as direct as possible, there is nothing to worry about in this conversion.

yuv422p10le to uncompressed as v210: if you mean it should be auto-selected/default I agree. Uncompressed output setup needs some improvement. But you can select "v210" manually.

> forcing video=>decode format to v210 doesn't "stick"

This menu only triggers something when the option actually exists in the decoder.
Same if you open png image and select v210 as decoding format: this is not supported.
v210 decoding is implemented by VFW codecs and also by CineForm sdk.

WorBry
6th January 2018, 19:22
@Shekh,

I've been running some tests with VDFM (40716), transcoding native 4K 10-bit 422 clips (from a Panasonic GH5 camera) to various 10-bit 422 formats, including Grass Valley HQX using the GV codecs pack:

https://www.edius.net/hqx.html

Although the codec per se supports 10-bit and 8-bit, 8-bit appears to be the only option with the HQX codec as it presents in the VDFM Compression listing.

https://i.imgur.com/KpARGQq.png

https://i.imgur.com/cPBCFx0.png

Is this a limitation of the VFW codec, as accessible by third-party applications, or is there any possibility of accessing the 10-bit variant ?

shekh
6th January 2018, 20:14
HQX vfw codec does not support 10-bit mode. Don't know why they advertise it. I also tried to get an answer from their support with no luck.

WorBry
6th January 2018, 22:07
OK thanks. No big deal. It's not my preferred intermediate format anyway.

WorBry
7th January 2018, 03:27
Something else I've observed with VDFM (40716 32bit & 40717 64bit) ; when transcoding native 4K and HD AVC (8-bit YV12, Rec709) clips to any YUV format, specular highlights get encoded black. Here's an example:

Source clip: UHD/60p AVC (8-bit, Rec709).mp4 clip shot on a GH5. VDFM frame grabs (resized to 1280x720) - click + cursor to enlarge

Original clip (Decode format YUV420-709):

http://i.imgur.com/jyHc6a7m.png (https://imgur.com/jyHc6a7)

MagicYUV (YUV 420) transcode (Normal Recompress, using conversion YUV420-709 > YUV420, no change in the component range):

http://i.imgur.com/fXlh9CQm.png (https://imgur.com/fXlh9CQ)

Cineform Filmscan 1 transcode (Normal Recompress, using conversion YUV420-709 > YUYV (YUY2), no change in the component range.

http://i.imgur.com/8ujiIVHm.png (https://imgur.com/8ujiIVH)


See how the blown/specular highlights on the light bulbs and coming through the roof skylights are black.

And again, showing the respective AVISynth Histograms:

Original clip (DGDecodeNV > YV12):

http://i.imgur.com/3UnKbL2m.png (https://imgur.com/3UnKbL2)

MagicYUV (YUV 420) transcode:

http://i.imgur.com/qMzRZJ1m.png (https://imgur.com/qMzRZJ1)

Cineform Filmscan1 transcode (ConvertToYV12, interlaced=false):

http://i.imgur.com/MHMuF9qm.png (https://imgur.com/MHMuF9q)

I don't see this aberration (with VDFM 32bit) when the AVS decode script (Decode Format YUV420) is used as the input source for the transcodes. And it doesn't occur with 4K/HD-AVC (8bit) clips recorded with full luma range i.e. decode format YUV420-709-FS.

Sample (2sec) of above clip to test:
http://www21.zippyshare.com/v/77EZFJQ6/file.html

shekh
7th January 2018, 06:47
Now I'm on mobile, will see this in few days.

kolak
8th January 2018, 22:21
HQX vfw codec does not support 10-bit mode. Don't know why they advertise it. I also tried to get an answer from their support with no luck.

It does support 10bit, but it's not exposed in VFW module.
You would need codec SDK which is not publicly available.

dipje
8th January 2018, 23:23
I have a Vapoursynth script outputting RGB48. If I open it in 40716 (x64) it seems to open fine as B64a (as it should IIRC).

Now, I want to try the Cineform encoder, so I set compression to Cineform RGB 12bit (also tried with RGBA 12bit), with the 'input delivery' set to 16bit. The output format selection seems to be RGB64, which is fine.
When I try to save (either to .avi or to .mov) VDFD crashes directly at the start.

Am I doing something wrong or is this a known problem?

poisondeathray
10th January 2018, 04:35
I have a Vapoursynth script outputting RGB48. If I open it in 40716 (x64) it seems to open fine as B64a (as it should IIRC).

Now, I want to try the Cineform encoder, so I set compression to Cineform RGB 12bit (also tried with RGBA 12bit), with the 'input delivery' set to 16bit. The output format selection seems to be RGB64, which is fine.
When I try to save (either to .avi or to .mov) VDFD crashes directly at the start.

Am I doing something wrong or is this a known problem?

This works for me in either MOV, AVI container

I don't have 'input delivery' in my cineform dialog box (I'm using Go Pro Cineform (native) . It says "intermediate bit depth" and it's set to 16

Re-importing the export is correctly identified correctly as rgb 12bit

poisondeathray
10th January 2018, 04:52
Sample (2sec) of above clip to test:
http://www21.zippyshare.com/v/77EZFJQ6/file.html


For me, it just crashes, regardless of export codec. Both x86, x64 versions

But works ok (without highlight issue) when fed through vapoursynth or avisynth

I think it has to do with the caching input driver

dipje
10th January 2018, 09:20
This works for me in either MOV, AVI container

I don't have 'input delivery' in my cineform dialog box (I'm using Go Pro Cineform (native) . It says "intermediate bit depth" and it's set to 16

Re-importing the export is correctly identified correctly as rgb 12bit

Ah crap, so what is broken on my system..
With input delivery I mean the same setting as you, intermediate bitdepth.

Do you have / use an alpha channel in all of this ? I'm feeding it 'dry' non-alpha rgb48 which vapoursynth wraps in b64a for VfW. Maybe I should try with a dummy alpha channel.

Another (very minor) thing. Opening a .vpy file now requires me to explicitly select the avisource reader. Just opening the .vpy gives an ffmpeg error, so I guess the ffmpeg input driver tries to open vapoursynth scripts now. This wasn't always the case.

edit might it even that there is an avx(2) codepath or something enabled in the cineform RGB mode that my old i7 doesn't support?

kolak
10th January 2018, 13:54
This works for me in either MOV, AVI container

I don't have 'input delivery' in my cineform dialog box (I'm using Go Pro Cineform (native) . It says "intermediate bit depth" and it's set to 16

Re-importing the export is correctly identified correctly as rgb 12bit

Cineform requires 16bit data input, but data is stored at 12bit precision. It doesn't support as far as I understand 12bit RGB data, like e.g. ffmpeg. It uses common b64a format. This is most likely why you are seeing 16bit.

dipje
10th January 2018, 15:15
Cineform requires 16bit data input, but data is stored at 12bit precision. It doesn't support as far as I understand 12bit RGB data, like e.g. ffmpeg. It uses common b64a format. This is most likely why you are seeing 16bit.

The problem isn't the 16bit input (which I get, and I am delivering it 16bit RGB).

My problem is VDFM crashing on my system when I render / save it to a file :)

poisondeathray
10th January 2018, 16:34
Ah crap, so what is broken on my system..
With input delivery I mean the same setting as you, intermediate bitdepth.

Do you have / use an alpha channel in all of this ? I'm feeding it 'dry' non-alpha rgb48 which vapoursynth wraps in b64a for VfW. Maybe I should try with a dummy alpha channel.

Another (very minor) thing. Opening a .vpy file now requires me to explicitly select the avisource reader. Just opening the .vpy gives an ffmpeg error, so I guess the ffmpeg input driver tries to open vapoursynth scripts now. This wasn't always the case.

edit might it even that there is an avx(2) codepath or something enabled in the cineform RGB mode that my old i7 doesn't support?


Everything else was exactly the same as your test setup , RGB48 . I tested 1280x720 (maybe you have some weird dimensions causing crash?)

I just dragged the vpy to vdfm , and it automatically chose AVI, with "internal DIB decoder (b64a)" as reported in file=>file information

The CPU I tested on has avx2 . Win8

Was that on XP ? Some ffmpeg changes made XP support more difficult, maybe it has something to do with that ?

WorBry
11th January 2018, 03:12
For me, it just crashes, regardless of export codec. Both x86, x64 versions

But works ok (without highlight issue) when fed through vapoursynth or avisynth

I think it has to do with the caching input driver

No crash here with that sample clip. And like I said, the odd thing is that:

... it (the aberration) doesn't occur with 4K/HD-AVC (8bit) clips recorded with full luma range i.e. decode format YUV420-709-FS.

....and that includes clips recorded on the same camera - a Pana GH5 in this case, which gives the option to select the 'luminance level' (i.e. luma range) - 16-235, 16-255 or 0-255 in 8-bit. As can be seen from the YUV Histogram, the above sample clip was shot in 16-255 range, which is how most camcorders record 8-bit 4K/HD-AVC also - i.e. Rec709 allowing for excursion/overshoot of data values into the super-whites.

Evidently, with these 16-255 range clips something is going on YUV420-709 > YUV420 or YUYV (YUY2) 'conversion' that is preventing transfer of the full data range. Come to that, why does YUV420-709 need to be 'converted' to YUV420 anyway if the decompression format 'interpretation' is set for 'no change' in the component range ? Surely it's just pass-through ?

Anyhow, hopefully Shekh will get to the bottom of it.

shekh
11th January 2018, 08:29
Ah crap, so what is broken on my system..
With input delivery I mean the same setting as you, intermediate bitdepth.

Do you have / use an alpha channel in all of this ? I'm feeding it 'dry' non-alpha rgb48 which vapoursynth wraps in b64a for VfW. Maybe I should try with a dummy alpha channel.

Another (very minor) thing. Opening a .vpy file now requires me to explicitly select the avisource reader. Just opening the .vpy gives an ffmpeg error, so I guess the ffmpeg input driver tries to open vapoursynth scripts now. This wasn't always the case.

edit might it even that there is an avx(2) codepath or something enabled in the cineform RGB mode that my old i7 doesn't support?

I'm returning from vacation tomorrow and will take close look after.

Opening vpy issue: maybe you used driver override feature in error, try to see Open dialog, select vpy file, and then change preferred driver to default one (in dropdown there should be AVIfile, then caching..)

avx in cineform: no I don't think there is such code. And I run some tests on core2.

dipje
11th January 2018, 09:30
Ok.. I am on (Semi-)recent Win10 x64, so no XP related stuff.

If you want me to report more, give more info or make / send dumps let me know (and let me know how :P).

shekh
12th January 2018, 14:12
Something else I've observed with VDFM (40716 32bit & 40717 64bit) ; when transcoding native 4K and HD AVC (8-bit YV12, Rec709) clips to any YUV format, specular highlights get encoded black.
...

Sample (2sec) of above clip to test:
http://www21.zippyshare.com/v/77EZFJQ6/file.html

There is error in color space conversion (it is also in the original VD).
The conversion 709->601 with out-of-range luma values requires clipping which is not applied.
I will replace the procedure.

WorBry
12th January 2018, 15:44
There is error in color space conversion (it is also in the original VD).
The conversion 709->601 with out-of-range luma values requires clipping which is not applied.


I'm not converting 709 > 601 though. Both the Color Space and Component Range interpretations are set as 'No Change' (the default).

shekh
12th January 2018, 16:05
I'm not converting 709 > 601 though. Both the Color Space and Component Range interpretations are set as 'No Change' (the default).

This part of UI is confusing, I want to change it somehow.

Actually "no change" in compression pixel format means nothing.
Currently more informative is the line "Using conversion: YUV420-709 -> YUV420"

To really have no colorspace change, either select "pixel format-> same as decoding" or set colorspace explicitly the same as source (709).

poisondeathray
12th January 2018, 18:01
I did some more testing, and the crash for me was from using video=>fast recompress
(You used to be able to bypass all the other extraneous conversions by using it in classic vdub)

I agree that current part of the UI with color space / component range is confusing

shekh
12th January 2018, 19:10
I have a Vapoursynth script outputting RGB48. If I open it in 40716 (x64) it seems to open fine as B64a (as it should IIRC).

Now, I want to try the Cineform encoder, so I set compression to Cineform RGB 12bit (also tried with RGBA 12bit), with the 'input delivery' set to 16bit. The output format selection seems to be RGB64, which is fine.
When I try to save (either to .avi or to .mov) VDFD crashes directly at the start.

Am I doing something wrong or is this a known problem?

Here is what I need:

- crash report: when you see "Oops - VirtualDub has crashed..." press "Save" button
- also VirtualDub_AutoSave_xxx.vdproject file (created automatically before crash)
- source video. Please save Vapoursynth output as uncompressed avi (1 frame should be enough)

I did some more testing, and the crash for me was from using video=>fast recompress
(You used to be able to bypass all the other extraneous conversions by using it in classic vdub)


Repeated, will be fixed.

WorBry
12th January 2018, 20:44
To really have no colorspace change, either select "pixel format-> same as decoding" or set colorspace explicitly the same as source (709).

OK, I've got it sorted. What confuses matters is the "(?) Format Not Accepted by Codec, YMMV" comment when transcoding to the 'non-native' vfw codec formats, like MagicYUV and the GoPro Cineform codec. I'll post some shots of the config panels to illustrate what I mean, when I have a moment. But yes, when transcoding these 8-bit YUV420-709 sources to Cineform, setting the YUY2 output colorspace explicitly to 'Rec709' resolves the issue with the black-coded specular highlights - the GoPro vfw Cineform codec complains that "(?) Format Not Accepted by Codec, YMMV" but it still works. I guess that's the reason for the 'YMMV' ;>)

shekh
12th January 2018, 21:45
OK, I've got it sorted. What confuses matters is the "(?) Format Not Accepted by Codec, YMMV" comment when transcoding to the 'non-native' vfw codec formats, like MagicYUV and the GoPro Cineform codec. I'll post some shots of the config panels to illustrate what I mean, when I have a moment. But yes, when transcoding these 8-bit YUV420-709 sources to Cineform, setting the YUY2 output colorspace explicitly to 'Rec709' resolves the issue with the black-coded specular highlights - the GoPro vfw Cineform codec complains that "(?) Format Not Accepted by Codec, YMMV" but it still works. I guess that's the reason for the 'YMMV' ;>)

Yes, it is difficult to calculate the actual format applied with vfw codec, there is too much code involved. I chose between showing "YMMV" or nothing.

WorBry
12th January 2018, 22:01
I was editing my last post just as you replied. I was going to add that when using the native Cineform encoder, setting the YUY2 output explicitly for Rec709 is accurately reflected in the comment 'Using conversion YUV420-709 ->YUYV-709'.

On the other hand, transcoding (these YUV420-709 inputs) to MagicYUV-YUV420 (configured for Rec709 YUV420 input) does not require specifying 'Rec709' in the output pixel format. Leaving at default 'Same as Decoding' (YUV420-709) works fine (pass-through with no black-coded highlights) provided you ignore the "(?) Format Not Accepted by Codec, YMMV" comment. Same with UTVideo YUV420. Well that's 'my mileage' at least ;)

I won't bother posting any screen shots.

Cheers.

shekh
13th January 2018, 18:19
New version with many fixes.

I encountered a bug, when I loaded in a 32 bit png, adjust the color using colormill, and then export it as single image out as png, the resulting image became all white.

If you do this again, it is now possible to disable alpha channel with "alias format" filter:

https://sourceforge.net/p/vdfiltermod/wiki/format_changes/attachment/alias_format.png

Also same way to enable alpha when it is not detected (e.g. from AviSynth)

lansing
22nd January 2018, 17:58
I'm requesting an option to chose audio driver on capture mode. I have the ASIO driver installed and I wanted to use that instead of the Windows default.

shekh
22nd January 2018, 18:04
I'm requesting an option to chose audio driver on capture mode. I have the ASIO driver installed and I wanted to use that instead of the Windows default.

Which audio driver, is it source or output?

lansing
22nd January 2018, 18:58
Which audio driver, is it source or output?

Source, the latency of audio recording with the Windows default driver is too long. With ASIO, the latency can be as low as 1 millisecond.

StainlessS
23rd January 2018, 04:23
Hi Shekh,
Build 40898, and my prev 40879, Problem when switch to Free Adjust, image still scrolls around in box (via mouse), you have to screw around with
sizing it to get it to show full image. Ta very much :)

shekh
23rd January 2018, 09:28
Hi Shekh,
Build 40898, and my prev 40879, Problem when switch to Free Adjust, image still scrolls around in box (via mouse), you have to screw around with
sizing it to get it to show full image. Ta very much :)

Do you mean scrolling 1px or something bigger?

StainlessS
23rd January 2018, 11:16
Definitely somewhat bigger (I would not bother too much about 1 pixel, maybe 10, 16 something like that, perhaps bigger).
AVI. EDIT: No, I mean AVS.

Starts out ok, but resize via mouse, then switch to Free Adjust, significant scrolling, even when view area is only a quarter occupied.
Can be way more than 16 pixels.

shekh
23rd January 2018, 11:20
Definitely somewhat bigger (I would not bother too much about 1 pixel, maybe 10, 16 something like that, perhaps bigger).
AVI.

Weird. Pls show your source dimensions and some screenshots

Edit: ok :)

StainlessS
23rd January 2018, 11:31
Well so far, it happens with anything, anysize, AVS, AVI, MP4 (1280x720), and image BMP.
Dont forget to switch to Free Adjust (which, always has resized to whatever size you chose).

I think version from a month or two ago did not do that.

EDIT: BMP that I just tried was scrolling ~40% of the image (horizontal), every thing I've tried does it.
I updated to this version (current) because of the problem, but it obviously still exists.
Free Adjust then resize, or other way around, both same.

EDIT: Dont know if pertinent (probably not) but only scrolls on one axis, up/down or left/right.

shekh
3rd February 2018, 14:20
This is one of three annoying things that led me to alter and recompile VirtualDub myself (my instructions are still a sticky thread although it's out of date now).

Somewhere there is a condition that causes VirtualDub to give up on displaying a frame if it takes over 100ms, and you have scrolled onward in the meantime.

On the subject of AVI vs. MKV, doesn't MKV lack a frame index?

Now if decoder made 100% progress (always the case with *synth) the 100ms limit is ignored.
Happy scrolling )

Hi Shekh,
Build 40898, and my prev 40879, Problem when switch to Free Adjust, image still scrolls around in box (via mouse), you have to screw around with
sizing it to get it to show full image.

Now clicking "free adjust" will immediately stretch image to fit in window.

StainlessS
3rd February 2018, 17:02
Lovely, thanx. :thanks:

Yanak
5th February 2018, 11:36
Hello and thank you for this,

I have a little suggestion please:

When using both versions x86 x64 ( for filters available in one version and not on the other ) or even when we still have the old virtualdub versions on pc, we end up with a bunch of virtualdub in the "Open With" menu.

What i do is that i use ResourceHacker to recompile the .exe with the names changed in the info :

https://s14.postimg.org/8p2ixd6hd/2018-02-05_111901_cr.png

I do this for all new versions of this deep color mod, and have this done for old virtualdub versions on my pc too, when i make a right click into a media file and "Open with" i then see this :

https://s14.postimg.org/436eotibl/2018-02-05_112328.png

Without doing those modifications I end up with 4 " VirtualDub" entries there and have to guess which one is what as it often don't stay in order from one media file extension to another, depends the order you manually selected the "open with program xxx".

I saw you already cleaned up this info part in the last versions released by removing file versions and such, but if you could add a more specific name + plateform for the exes too it will be nice.

Thank you .

StainlessS
5th February 2018, 12:39
I just add this on XP

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"

Yanak
5th February 2018, 13:31
Hi,
I done something similar some years ago when using only the regular virtualdub x86 & x64, not sure if it was exactly this reg edit but it was a registry modification, later started to use the exe re-compile method ( as i also sometimes can change the icons used by the exe's at the same time ), using this last method for various little tools customization since a few years now.

This said i noted it and will keep your method in memory for the next time i will need it :)

Thank you.

wonkey_monkey
5th February 2018, 20:09
Now if decoder made 100% progress (always the case with *synth) the 100ms limit is ignored.
Happy scrolling )

I'm not sure what you mean by "made 100% progress," but thanks!

I have a couple of other suggestions, if I may:

The fact that I can drag around the window contents is awesome, but what would be even awesomer would be a "frameless" mode where the raised border around the display is removed, and the video takes up the whole width/height of the window. This would be especially useful when viewing a 1920 pixel video on a 1920 pixel wide screen.

Some kind of indicator that the video is scrolled and/or not fully displayed would also be great (by the way I see odd/confusing behaviour when clicking Free adjust which I haven't figured out yet).

One thing that I would really love to see is to finally eliminate one very poor GUI choice in VirtualDub. Progress windows will display "Time elapsed" and "Total time (estimated)", but the only really important piece of information would be "Time remaining" - yet the user is left to calculate this for themselves!

Edit: oh and also a playback volume control from 0%-400% :)

shekh
5th February 2018, 22:58
Changing ProductName/InternalName: no problem, I wanted to rename it anyway.

I'm not sure what you mean by "made 100% progress," but thanks!

The simplified process looks like:
1) decode
2) copy to internal buffer
3) apply filters
4) display

After "decoder made 100% progress" means the remaining things are 2 (neglectible) 3 (often empty) and 4 (also quite fast).
There is no reason to terminate right after 1 is done.


The fact that I can drag around the window contents is awesome, but what would be even awesomer would be a "frameless" mode where the raised border around the display is removed, and the video takes up the whole width/height of the window. This would be especially useful when viewing a 1920 pixel video on a 1920 pixel wide screen.


Do you mean like fullscreen mode in video player? I also thought about it. What is stopping me, this would require some on-screen controls to make it actually useful. Don't imagine yet what it should look like.


Some kind of indicator that the video is scrolled and/or not fully displayed would also be great (by the way I see odd/confusing behaviour when clicking Free adjust which I haven't figured out yet).


I also had the idea of indicators.
For odd behavior it is maybe good idea to capture screen.
I didn't think free adjust is so useful.


One thing that I would really love to see is to finally eliminate one very poor GUI choice in VirtualDub. Progress windows will display "Time elapsed" and "Total time (estimated)", but the only really important piece of information would be "Time remaining" - yet the user is left to calculate this for themselves!


Maybe it was interesting as benchmark. If you want to know when same thing runs faster/slower than before...

Btw a question: which buttons on timeline waste the space? I think there are too many, some I never touched once.

wonkey_monkey
5th February 2018, 23:14
So if decoding takes more than 100ms it still might abort and drop the frame? Or is that what "Drop frames when seeking" controls?

Fullscreen is another idea, but I just meant to get rid of the icon border and put the image right against the edge of the window, so when maximised it fills the whole screen width. Great for widescreen video on a 1920x1080 screen - no more missing out a few columns on the right.

I started work on an Avisynth viewer once, a long time ago, so some of my ideas come from there... like a control to select the matrix for the internal conversion to display RGB, and also view-space deinterlacing (so framecounts remain the same, but playback could do a simple deinterlace for viewing purposes - or the option to step like this "10t, 10b, 11t, 11b...").

Maybe it was interesting as benchmark. If you want to know when same thing runs faster/slower than before...

Perhaps... I still think time remaining is far more useful (and FPS is best for benchmarking).

Btw a question: which buttons on timeline waste the space? I think there are too many, some I never touched once.

I only ever use Stop, for when I've pressed Ctrl-Shift-Arrow and Space alone won't stop it and I get confused :D Any reason Escape shouldn't be a shortcut for Stop?

A tool/shortcut I would use is to place markers on the timeline (Shift+M), along with a tool/shortcut to jump between markers (Ctrl-Left, Ctrl-Right) - maybe even with thumbnails recorded. But then you would have to start considering a project-save option...

shekh
5th February 2018, 23:51
So if decoding takes more than 100ms it still might abort and drop the frame?

It might drop in case of progressive decoding. Example: AVI with long-gop and using VFW decoder, because it works by repeatedly decoding intermediate frames.
AviSynth always returns whole final frame.
100ms may still terminate frame if there is long & slow list of VD filters but this can be also disabled by turning off "Drop frames when seeking".


I only ever use Stop, for when I've pressed Ctrl-Shift-Arrow and Space alone won't stop it and I get confused :D

A tool/shortcut I would use is to place markers on the timeline (Shift+M), along with a tool/shortcut to jump between markers (Ctrl-Left, Ctrl-Right) - maybe even with thumbnails recorded. But then you would have to start considering a project-save option...

I think I fixed all confusing key combinations.
Note that you can set hotkeys for commands from Options->Keyboard..

Edit.ToggleMarker (my key: M)
Edit.SeekStop (my key: K) - this is same as "stop" button on timeline
Edit.GoToPrevRange, Edit.GoToNextRange - they also jump between markers not just ranges

What is "with thumbnails recorded"? To save current picture somewhere, why? What is "project-save"?

wonkey_monkey
6th February 2018, 00:55
What is "with thumbnails recorded"? To save current picture somewhere, why?

To give a preview, on the timeline, of what is at each marker. Perhaps on hover.

What is "project-save"?

To save the current state of the project - source script, markers, selection start/end, filters and their parameters, processing settings, etc.

raffriff42
6th February 2018, 01:36
Full screen playback, even with no navigation controls, only Escape, would be fabulously useful for quickly evaluating a scene, an edit or whatever. Any added controls would be great too.

It is possible (but klunky) to view VirtualDub's output full screen in a media player using the built-in Frameserver. Maybe a hotkey macro to quickly set up frameserving and launch a media player..?

shekh
6th February 2018, 13:20
To save the current state of the project - source script, markers, selection start/end, filters and their parameters, processing settings, etc.

This already works through File->Save project.
Also there is add-on data, an example where it is used is DrawText filter. If you put a lot of text in it (does not fit in string parameter) it will be saved as separate file attached to the filter.

wonkey_monkey
14th February 2018, 22:47
Another suggestion for the list: is there a way to work around the fact that using arrow keys to step through frames is limited by the Windows keyboard repeat rate? It would be nice if it could, instead, max out to the display refresh rate, so holding down right arrow would step through frames at 60fps (or whatever it can manage). I have the delay set to "short" which maxes out at only about 40 per second, and also includes the annoying delay on the first keypress.

shekh
14th February 2018, 23:01
I'm using "scan scene forward/backward" commands for something similar. I set it to keys J,L and disable detection thresholds. However, its speed is not controlled at all, with simple videos it becomes too fast.

AKBabel
28th February 2018, 10:29
I have tried to convert linear 64RGBA to sRGB (logarithmic) by “gamma correct” filter.
It works fine, but the result is somehow RGBA32 and not 64RGBA anymore.
Why is it that?

shekh
28th February 2018, 11:29
Most filters are not updated to support high bit depth. GammaCorrect is very simple, I can update it.

shekh
10th March 2018, 17:19
Changing to easy name: VirtualDub2

Full list of changes: https://sourceforge.net/p/vdfiltermod/wiki/changes/

Answering requests made here:


if you could add a more specific name + plateform for the exes too it will be nice.


Done, VersionInfo updated.


even awesomer would be a "frameless" mode where the raised border around the display is removed, and the video takes up the whole width/height of the window. This would be especially useful when viewing a 1920 pixel video on a 1920 pixel wide screen.


If you stretch one pane to its maximum size it becomes borderless. When main window is maximized the pane takes exactly screen width (Unless there is some toolbar).


Full screen playback, even with no navigation controls, only Escape, would be fabulously useful for quickly evaluating a scene, an edit or whatever. Any added controls would be great too.


There is new full screen feature. It is quite nice, I like it :) The "full screen" is a separate window which can be moved to different monitor (using win-shift-arrow keys). All keyboard shortcuts work and most pop-up dialogs are usable. I'm only missing the timeline control and main menu access.


It would be nice if it could, instead, max out to the display refresh rate, so holding down right arrow would step through frames at 60fps (or whatever it can manage).


Added several new commands for fast forward/backward (available in keyboard shortcuts)
What is different compared to old "next/prev scene change" way: no need to mess with scene detection. Also it moves as long as I hold the key (there is also "sticky" version to move continuously). The rate is still unlimited.


I have tried to convert linear 64RGBA to sRGB (logarithmic) by “gamma correct” filter.


Now it should work in RGB64 mode too.

StainlessS
10th March 2018, 18:21
Currently downloading, you are a star shekh, thanx very much :)

SeeMoreDigital
10th March 2018, 19:06
Many thanks shekh. It's getting better and better :D

raffriff42
11th March 2018, 05:18
Beautiful! Thank you!

StainlessS
11th March 2018, 20:17
Thiis is a tremendously important project, methinks that Phaeron (AKA Avery Lee) uses nothing else now (daft if he dont) :)

Avery & Shekh, both terrific work guys, cheers. :thanks:

EDIT: Giants, on the shoulders of other, well Giants.

wonkey_monkey
13th March 2018, 00:41
Fullscreen and borderless mode are absolutely brilliant. Thanks Shekh!

Edit: although there seems to be a slight problem with borderless mode after coming out of fullscreen. The raised border reappears at the left, but after mini- and remaxi-mising it's gone from the left, but can be seen on the right.

shekh
13th March 2018, 01:15
Thanks everyone for your words!

there seems to be a slight problem with borderless mode after coming out of fullscreen

Damn, why I missed this.

SeeMoreDigital
13th March 2018, 10:09
Changing to easy name: VirtualDub2...Is it worth altering this topics title now as well?

shekh
13th March 2018, 11:28
Is it worth altering this topics title now as well?

Why not, done.

wonkey_monkey
13th March 2018, 12:26
I have another suggestion you may or may not enjoy, something (again) which I planned to put in an AviSynth viewer:

A mode where the position of the mouse determines whether input or output is shown - so the image is cut, with input showing to the left of the mouse, output to the right. I'm sure there's a proper term for this, I just can't think what it is...

I personally wouldn't find this too useful, since I do everything in AviSynth, but if you're using VirtualDub filters it might be nice (a hack could be to stackvertical your Avisynth output and use a VD crop filter to put one on top of the other). Just need some consideration on how to handle differently sized input/output.

Another idea: centered mode. Disable the output frame, just show the input frame (or vice versa), centered in the window with no border, and maybe the possibility to change background colour.

Also please could I have the Moon on a stick :)

LigH
13th March 2018, 12:34
A sliding split screen ... possibly not as easy for videos as for still pictures. There may be modulo constraints for supported widths of the split panes.

BTW, the 32b version of VirtualDub2 has a nice modern new application icon. The 64b version should get that as well.

shekh
13th March 2018, 12:50
BTW, the 32b version of VirtualDub2 has a nice modern new application icon. The 64b version should get that as well.

thx, the icon cost me lots of pulled out hair :)
It must be same icon. Did you mix the archive with old version?
The new executable also has different name:
VirtualDub64.exe
vs the old one (weird and confusing)
Veedub64.exe

shekh
13th March 2018, 13:08
A sliding split screen ... possibly not as easy for videos as for still pictures. There may be modulo constraints for supported widths of the split panes.


Something like this already works through filter "Blending..." dialog.
It is possible to restrict filter to rectangle, and there is "fflayer" filter to replace entire video contents. So you may feed .avs as normal source then cover it with original video and finally manipulate Blending rectangle to reveal different parts.

LigH
13th March 2018, 13:19
OK, I still linked veedub64.exe to my desktop... :o

Regarding the sliding split screen, the key of davidhorman's request was to move the slider "live" with the mouse pointer hovering over the video, like in some image-compression comparing websites before with JavaScript (unfortunately I don't remember which).

wonkey_monkey
13th March 2018, 14:22
A sliding split screen ... possibly not as easy for videos as for still pictures. There may be modulo constraints for supported widths of the split panes.


It would be done (I would imagine) as part of the Windows/DirectX painting, by which time everything's already RGB (right?). Instead of painting input on left and output on right, just paint with clipping to the same place.

Regarding the sliding split screen, the key of davidhorman's request was to move the slider "live" with the mouse pointer hovering over the video, like in some image-compression comparing websites before with JavaScript (unfortunately I don't remember which).

Exactly. I tried to make an AviSynth filter like that once, but it always lagged behind because VirtualDub was fetching ahead.

I found the page I was thinking of, maybe the same one:

https://xooyoozoo.github.io/yolo-octo-bugfixes/#swallowtail&jpg=s&bpg=s

StainlessS
13th March 2018, 14:48
Why not, done.

Can we also have "VirtualDub2 Script Editor" window title, thanx :)

EDIT: And for the Hex Editor too.
EDIT: And maybe the help.

EDIT: For SawBones AutoIt utility, have now changed to VirtualDub2 as required main window title, need to know what the
script editor will be called otherwise if future name changed then will cease to function properley, awaiting next release to
see if script editor window renamed.

AKBabel
14th March 2018, 18:38
I have found some new bugs.^^
If a dpx sequence is loaded via “sequence” VirtualDub only loads 1201 files (actually there are more than 11000) and the image stops while encoding at the 1201 frame. The encoding still runs for 11000 images and the final video stops at frame 1201, showing the full timeline of 11000 frames.
Everything seems fine with “linked segments”.
If I try to batch run a job (source rgba64, used filters: resize, gamma correct, levels) it stops with an error message.
Message:
“Error during script execution at line 27 column 47: error in external Sylia linkages
VirtualDub.video.filters.instance[1].Config(0)<!>;
VirtualDub.video.filters.Add(“levels”);Virtua”

If I try to run same project directly, it works fine.

shekh
14th March 2018, 19:51
I have found some new bugs.^^
If a dpx sequence is loaded via “sequence” VirtualDub only loads 1201 files (actually there are more than 11000) and the image stops while encoding at the 1201 frame. The encoding still runs for 11000 images and the final video stops at frame 1201, showing the full timeline of 11000 frames.
Everything seems fine with “linked segments”.


When you click on "Sequence", the number next to it is how much?
After you click "open", what is the timeline length?
If you go to File->File information, what is there? (number of segments, duration etc, screenshot would help too)
Can you navigate through entire sequence?


If I try to batch run a job (source rgba64, used filters: resize, gamma correct, levels) it stops with an error message...


Reproduced.

AKBabel
15th March 2018, 12:19
When you click on "Sequence", the number next to it is how much?
After you click "open", what is the timeline length?
If you go to File->File information, what is there? (number of segments, duration etc, screenshot would help too)
Can you navigate through entire sequence?
The number showing next to "sequence" was also 1201.
I guess I found out. There was a file missing (01201.dpx) in the sequence. But it showed up all 11000 pics in the timeline and I was able to navigate through the sequence.

shekh
15th March 2018, 13:32
The number showing next to "sequence" was also 1201.
I guess I found out. There was a file missing (01201.dpx) in the sequence. But it showed up all 11000 pics in the timeline and I was able to navigate through the sequence.

It is amazing FFMpeg gem.
As extreme example it can detect sequence containing only binary progression, pretending it has all files.

result: duration is 16 frames

test_000.png
test_001.png
test_002.png
test_004.png
test_008.png
test_016.png


result: duration is 1 frame (stops when fails to see test_001.png)

test_000.png
test_002.png
test_003.png
test_004.png


Absolutely irrational imo. Will think what to do with this.

Btw, GammaCorrect Config bug is old (also present in VD 1.10.4)

GMJCZP
15th March 2018, 13:41
Thanks for the program. I ask if this version can coexist with other versions because when I use the "File" menu it opens correctly but when I use the context menu I open VirtualDub 1.10.4, I do not know what I'm doing wrong. I use W7 32b

Of course with this problem this program is not added to the other "Open with"

Edit: I noticed that auxsetup is now apart in a folder called "extras", unlike VirtualDub and VirtualDubMod.

shekh
15th March 2018, 14:06
Thanks for the program. I ask if this version can coexist with other versions because when I use the "File" menu it opens correctly but when I use the context menu I open VirtualDub 1.10.4, I do not know what I'm doing wrong. I use W7 32b

Of course with this problem this program is not added to the other "Open with"

Edit: I noticed that auxsetup is now apart in a folder called "extras", unlike VirtualDub and VirtualDubMod.

AFAIK "Open with" is not part of any VirtualDub itself, maybe it is created manually or some 3rd party setup.
You can simply "Open with", "Choose..", and the new entry will coexist with old one.

auxsetup is only useful to install frameserver driver. Which in fact can be done once using any VD version (the drivers are autonomous and nothing has changed in them). I wanted to remove this because there was too many (barely useful) executables in the main folder.

StainlessS
15th March 2018, 15:17
You can simply "Open with", "Choose..", and the new entry will coexist with old one.

I not so long ago did a reinstall of XP32, I seem to remember that on "Open With", "Choose...", etc, it did not add new coexisting entry,
I had to do something additional to get it to add the "VirtualDub" option to the list of available options.
Not sure what it was that I did, maybe ticked "Always use the selected program to open this kind of file" box, or maybe saved AVI,
or something else.
If you do tick "Always use the selected ... ", you can always go and change back to original setting. (probably what I did).

Midzuki
15th March 2018, 15:56
Changing to easy name: VirtualDub2

But why didn't you change the names of the files themselves? :confused:

I mean:

vdub2.exe
vdub2x64.exe
VirtualDub2.chm
VirtualDub2.exe
VirtualDub2x64.exe
VirtualDub2.vdi
VirtualDub2x64.vdi

GMJCZP
15th March 2018, 16:02
Thank you shekh for answering me, but the new entry is not added because VirtualDub 1.10.4 is opened instead of VirtualDub2. Is more or less what TinMan is trying to say.

Edit: in short, I have VirtualDub 1.10.4 and VirtualDubMod 1.5.10.3 both modded by bcn_246.

shekh
15th March 2018, 16:12
But why didn't you change the names of the files themselves? :confused:

I mean:

vdub2.exe
vdub2x64.exe
VirtualDub2.chm
VirtualDub2.exe
VirtualDub2x64.exe
VirtualDub2.vdi
VirtualDub2x64.vdi

I see the name "VirtualDub" as a shared/inherited namespace. Steering away from it creates some trouble.
Some people use scripts with "virtualdub.exe" or "vdub.exe" name baked in. It is trivial to modify, but why?
Also the registry key for settings is "virtualdub.org".
Inside the chm the word "VirtualDub" is on all pages. I think it is not very good idea to replace it.

StainlessS
15th March 2018, 16:21
Will the script editor title bar name be changed ? (I'm good either way but would be nice to know)

EDIT:
Can we also have "VirtualDub2 Script Editor" window title, thanx :)

EDIT: And for the Hex Editor too.
EDIT: And maybe the help.

EDIT: For SawBones AutoIt utility, have now changed to VirtualDub2 as required main window title, need to know what the
script editor will be called otherwise if future name changed then will cease to function properley, awaiting next release to
see if script editor window renamed.

EDIT: Have now banished 3 versions of VirtualDub from my machine (v1.8MPEG2, v1.9.xx and v1.10.4), am though keeping
VdubMod as I have several templates / scripts that rely upon it and it does not conflict with Vd2 in the same way that VD final does.

EDIT To Below: thanx Shekh, good to know.
Guess I have to mod the VDMod reliant scripts etc to work with VD2, and can then get rid of that one too :)

shekh
15th March 2018, 16:36
Will the script editor title bar name be changed ? (I'm good either way but would be nice to know)


Yes, going to change in next hotfix build. Also in other windows titles (status, log, jobs, ...)

Midzuki
15th March 2018, 16:38
It is trivial to modify, but why?

Because of *consistency*.

Just as an example, in the beginning MPC-HC used an mplayerc.ini as if it were just a newer version of Media Player Classic. Fortunately the developers realized that MPC-HC was greater than the original MPC and started to act accordingly.

GMJCZP
15th March 2018, 19:10
I still do not know why VirtualDub 1.10.4 opens with the context menu instead of VirtualDub2, please help me.

shekh
15th March 2018, 19:47
I still do not know why VirtualDub 1.10.4 opens with the context menu instead of VirtualDub2, please help me.

You are right, this association does not work the way I thought. Need to investigate.

GMJCZP
15th March 2018, 22:20
You are right, this association does not work the way I thought. Need to investigate.

Thanks.

shekh
16th March 2018, 01:27
I still do not know why VirtualDub 1.10.4 opens with the context menu instead of VirtualDub2, please help me.

This .reg template worked for me:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VirtualDub2.media.x86\shell\open\command]
@="\"E:\\vd\\VirtualDub.exe\" \"%1\""

[HKEY_CLASSES_ROOT\VirtualDub2.media.x64\shell\open\command]
@="\"E:\\vd\\VirtualDub64.exe\" \"%1\""

[HKEY_CLASSES_ROOT\.avi\OpenWithProgids]
"VirtualDub2.media.x86"=hex(0):
"VirtualDub2.media.x64"=hex(0):


Looks like the manual method (browse for program) relies on filename.exe, might have worked if I followed Midzuki' suggestion.

GMJCZP
16th March 2018, 21:17
I tried saving it in a .reg file and followed without fixing the problem.

shekh
17th March 2018, 12:01
I tried saving it in a .reg file and followed without fixing the problem.

You did not reply to PM, so have you replaced "e:\\vd..." with the correct path?
I'd prefer to prepare installer instead of massaging reg files, but it needs time.

shekh
17th March 2018, 22:47
New build: bugfix + some renames VirtualDub->VirtualDub2

I have found some new bugs.^^


fixed

there seems to be a slight problem with borderless mode after coming out of fullscreen

After new fixed I tried to push everything: fullscreen on off, maximize on off, layout auto size on off, ...
All works. Let me know if you find something.

shekh
17th March 2018, 22:58
Another idea: centered mode. Disable the output frame, just show the input frame (or vice versa), centered in the window with no border, and maybe the possibility to change background colour.

Do you mean to fit (letterbox) image into window? As opposed to current "Fit Outside" method.
The reason I don't offer more common "Fit Inside" is I am still abusing the display system which is quite restricted. It is also impossible to have large zoom :(

wonkey_monkey
17th March 2018, 23:05
Looks good so far! Although wouldn't you know it, I have a couple more suggestions, I'm afraid...

Could fullscreen maintain aspect ratio? Could there be scaling options in fullscreen mode?

One minor one: would it be possible when zipping up a version to put everything in a directory? It's a bugbear of mine when you have to create a new folder to drag everything into instead of just dragging out a folder :)

shekh
17th March 2018, 23:09
Because of *consistency*.

Just as an example, in the beginning MPC-HC used an mplayerc.ini as if it were just a newer version of Media Player Classic. Fortunately the developers realized that MPC-HC was greater than the original MPC and started to act accordingly.

I thought about this and renaming "VirtualDub.exe" still does not look more appealing. It is 50/50 to me (no go).

In any case, I sorted various occurences of "VirtualDub" which I have to consider. Comments enabled. https://sourceforge.net/p/vdfiltermod/tickets/101/

shekh
17th March 2018, 23:19
Could fullscreen maintain aspect ratio? Could there be scaling options in fullscreen mode?

Why not? It has the same right-click menu. Have you tried?


One minor one: would it be possible when zipping up a version to put everything in a directory? It's a bugbear of mine when you have to create a new folder to drag everything into instead of just dragging out a folder :)

Sorry, I prefer it like it is...

GMJCZP
18th March 2018, 00:54
You did not reply to PM, so have you replaced "e:\\vd..." with the correct path?
I'd prefer to prepare installer instead of massaging reg files, but it needs time.

I have problems with the energy power and the internet connection, sorry.
You're right, is better prepare a robust solution. In the 41489 version the problem continues, open VD 1.10.4 instead of your program.

wonkey_monkey
18th March 2018, 01:19
Why not? It has the same right-click menu. Have you tried?

I did - the zoom options do nothing (the tick doesn't move). The aspect ratio options weren't doing what I had expected, and I hadn't realised what it was doing because of the abstract test video I was using - it seems to be cropping in order to fill the screen completely, instead of adding black bars to show the whole video, which I think would be the most expected and useful behaviour (since there is currently no way to view a full video in the right aspect ratio, unless it happens to match your screen).

Sorry, I prefer it like it is...

Well, okay, but for those who like to copy a single directory it would be useful (VirtualDub2 currently lives in a folder on my desktop); for those who don't, they just have to go down one level and it's the same as before. It is therefore objectively the best way for everybody ;)

shekh
18th March 2018, 01:28
I did - the zoom options do nothing (the tick doesn't move). The aspect ratio options weren't doing what I had expected, and I hadn't realised what it was doing because of the abstract test video I was using - it seems to be cropping in order to fill the screen completely, instead of adding black bars to show the whole video, which I think would be the most expected and useful behaviour (since there is currently no way to view a full video in the right aspect ratio, unless it happens to match your screen).


Have you seen post 474 https://forum.doom9.org/showthread.php?p=1836670#post1836670

Zoom and aspect ratio work the same way as in non-fullscreen state.
You cannot zoom less than to fill entire window and it means with small picture you have no options at all. With 1920 picture on 1920 screen you can zoom 100, 150, 200 etc. Not 75.

Midzuki
18th March 2018, 06:42
I thought about this and renaming "VirtualDub.exe" still does not look more appealing. It is 50/50 to me (no go).

In any case, I sorted various occurences of "VirtualDub" which I have to consider. Comments enabled. https://sourceforge.net/p/vdfiltermod/tickets/101/

That's fine. I will keep NOT using your mod, even though it is better than the original VirtualDub.

</END_OF_DISCUSSION>

wonkey_monkey
18th March 2018, 11:55
You cannot zoom less than to fill entire window and it means with small picture you have no options at all. With 1920 picture on 1920 screen you can zoom 100, 150, 200 etc. Not 75.

Oh... well, that would be a really useful change if it could be possible. Otherwise it's impossible to view all of a video at the right aspect ratio unless it happens to match your screen.

LigH
18th March 2018, 16:13
Is this now officially "Quengelware" (pester power item)? :o

shekh
18th March 2018, 19:24
Oh... well, that would be a really useful change if it could be possible. Otherwise it's impossible to view all of a video at the right aspect ratio unless it happens to match your screen.

I agree but it is quite difficult to do.

wonkey_monkey
18th March 2018, 20:43
I agree but it is quite difficult to do.

Fair enough! Thanks again for your continuing efforts!

GMJCZP
20th March 2018, 03:25
I look forward to this program in the near future can coexist with other versions of VDub and VDubMod (adding to contextual menu), but at this rate I think they will go to eternal rest, lol.

I have a proposal, is it possible to add the "Streams" menu, including "Stream list" command, like the one VirtualDubMod has, this is one of the reasons why I still use it, the other one is for the script editor, which already has VDub 2.

StainlessS
20th March 2018, 04:45
I look forward to this program in the near future can coexist with other versions of VDub and VDubMod

It never proved much of a problem for me (having just banished about 3 versions of Vdub from my machine), only ever problem
may have been context menu opening, and even that was easily solved with a registry fix.
I had about 4 or 5 versions all avialable via hotkeys. just needed to copy the directory, and uninstall, then make shortcuts and
add hotkeys. Easy peasy, but no longer necessary due to the fantabulous fan-dabby-dozy Vdub2 :)

EDIT: I used to rename VirtualDubFilterMod to VirtualDub_DEEP.exe for use with the reg fix
(just so I knew which option to click in open with menu).

SeeMoreDigital
20th March 2018, 09:59
I look forward to this program in the near future can coexist with other versions of VDub and VDubMod...
I'm with StainlessS. Up until this weekend I ran the last version of the original VirtualDub and VirtualDub2 both launched ok from the 'taskbar' and ran without any major issues. Now it's just VirtualDub2 :)

shekh
20th March 2018, 11:27
I have a proposal, is it possible to add the "Streams" menu, including "Stream list" command, like the one VirtualDubMod has, this is one of the reasons why I still use it, the other one is for the script editor, which already has VDub 2.

Currently this feature (multiple streams) is very far.

Revan654
20th March 2018, 19:30
I would Thank anyone who put work into this and picked up where VDub left off. I was hoping someone would pick it up at some point, Didn't even know VDub2 even existed until I came across this while searching for another encoder.

I do have one question if someone could answer this. I couldn't find any subject on the matter. Is there any kind of support for HDR capturing or planned support? I do have a HDR capture card I was wondering if I could use this program to capture a HDR signal.

- Thanks

shekh
20th March 2018, 20:05
I would Thank anyone who put work into this and picked up where VDub left off. I was hoping someone would pick it up at some point, Didn't even know VDub2 even existed until I came across this while searching for another encoder.

I do have one question if someone could answer this. I couldn't find any subject on the matter. Is there any kind of support for HDR capturing or planned support? I do have a HDR capture card I was wondering if I could use this program to capture a HDR signal.

- Thanks

Hi, I am not sure about HDR capture specifics. There is selection for 10 bit and 16 bit input formats (confirmed to work with Magewell and some Decklink drivers). Is this what are you looking for?
Possible formats are v210, P210, P216, P010, P016, v410, Y410, Y416, r210, R10k.
If you need to capture any HDR metadata, this is absent.

GMJCZP
20th March 2018, 20:58
StainlesS, here I have what originally shekh sent me via PM, includes the files .avi and .avs:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VirtualDub2.media.x86\shell\open\command]
@="\"C:\\Program Files\\GordianKnot\\VirtualDub2_41489\\VirtualDub.exe\" \"%1\""

[HKEY_CLASSES_ROOT\.avi\OpenWithProgids]
"VirtualDub2.media.x86"=hex(0):

[HKEY_CLASSES_ROOT\.avs\OpenWithProgids]
"VirtualDub2.media.x86"=hex(0):

It is only defined for 32b.

I have a script that I have that VD 1.10.4 opens very slowly and VDMod opens it in better way, but VD2 opens it up much better. I think it's time to let VD 1.10.4 die in peace.

StainlessS
20th March 2018, 21:28
Good choice mine already gone.

Yanak
21st March 2018, 20:02
Done, VersionInfo updated.

I know i'm a bit late but thank you very much for this and all the rest :)
( did not had time to install yet as not on my machine tho )

Revan654
21st March 2018, 21:07
Hi, I am not sure about HDR capture specifics. There is selection for 10 bit and 16 bit input formats (confirmed to work with Magewell and some Decklink drivers). Is this what are you looking for?
Possible formats are v210, P210, P216, P010, P016, v410, Y410, Y416, r210, R10k.
If you need to capture any HDR metadata, this is absent.

Yes I would need the metadata(Atlease I think I do, not 100% sure). I know shortly Magewell will be releasing there new SDK that has fully HDR support. Maybe that can be added in?

I don't know how the programming works with SDK or how VDub 2 is programmed in general.

I found this from Magewell Maybe you can make sense of it.

"If you have the ability or the experience on how to preview the HDR signal,you do not need to wait for our SDK.
In our SDK,you will know how to capture the HDR singal ,and we will provide a filter to present the recorded video.

We will provide the HDR preview filter,render,and a series of examples in our SDK. We just provide a way to show/record the HDR video.How to integrate HDR fuction into the third-party software is your job.You just provide the filter and render on Microsoft Directshow based software,such as GraphEdit."

^an EDID file must be uploaded to the card first, Which is the easy task. It figuring out how to capture the HDR signal which has been confusing.

shekh
22nd March 2018, 11:50
If you have the ability or the experience on how to preview the HDR signal

Sad part it's exactly what I don't have. I loosely follow various hdr-related threads but I still have no clue how HDR10 metadata is stored in video and what it might look like.
The capture in vd2 is (mostly) based on DirectShow (much like GraphEdit), so the talk about preview filters etc. makes sense to me.

Revan654
22nd March 2018, 19:26
Sad part it's exactly what I don't have. I loosely follow various hdr-related threads but I still have no clue how HDR10 metadata is stored in video and what it might look like.
The capture in vd2 is (mostly) based on DirectShow (much like GraphEdit), so the talk about preview filters etc. makes sense to me.

I think filter can be built for HDR, I'm just not sure how.

I been searching on the subject matter. It gets very confusing at times.

This is what the HDR section of metadatalooks like:

Mastering display color primaries : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance : min: 0.0200 cd/m2, max: 1200.0000 cd/m2

Entire Video Metadata

Video
ID : 256 (0x100)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info? : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
Codec ID : 36
Duration : 2 s 83 ms
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Writing library : ATEME Titan KFE 3.7.0 (4.7.0.2002)
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : SMPTE ST 2084
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance : min: 0.0200 cd/m2, max: 1200.0000 cd/m2

More Here: https://trac.ffmpeg.org/ticket/5831

HDR used by Youtube with MKV looks like this:

+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: webm
|+ Doc type version: 4
|+ Doc type read version: 2
+ Segment, size 29548815
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 45)
|+ Segment information
| + Timecode scale: 1000000
| + Duration: 154.538s (00:02:34.538)
| + Multiplexing application: google
| + Writing application: google
|+ Segment tracks
| + A track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 11717489602804838
| + Track type: video
| + Default duration: 16.683ms (59.940 frames/fields per second for a video track)
| + Codec ID: V_VP9
| + Video track
| + Pixel width: 1280
| + Pixel height: 720
| + Video colour information
| + Colour matrix: 9
| + Colour range: 1
| + Colour transfer: 16
| + Colour primaries: 9
| + Video colour mastering metadata
| + Max luminance: 1000
| + Min luminance: 0.001
| + Red colour coordinate x: 0.68
| + Red colour coordinate y: 0.31996
| + Green colour coordinate x: 0.26494
| + Green colour coordinate y: 0.68996
| + Blue colour coordinate x: 0.15
| + Blue colour coordinate y: 0.05998
| + White colour coordinate x: 0.3127
| + White colour coordinate y: 0.32896
|+ Cues (subentries will be skipped)
|+ Cluster

shekh
23rd March 2018, 00:33
I examined the Exodus_UHD_HDR_Exodus_draft.mp4 with ffprobe. Now I see "side_data_type=Mastering display metadata" attached to each frame, but the parameters are the same through entire demo. Boring example.

kolak
31st March 2018, 09:03
They will be the same as HDR10 uses static matadata for whole stream. It should be repeated every GOP for seeking needs.

HDR10+ uses dynamic metadata but I don't think that you can find any samples yet.
DolbyVision is also dynamic metadata, but it's proprietary, so even if you can extract it, you won't know what to do with it.

shekh
31st March 2018, 11:45
They will be the same as HDR10 uses static matadata for whole stream. It should be repeated every GOP for seeking needs.

HDR10+ uses dynamic metadata but I don't think that you can find any samples yet.
DolbyVision is also dynamic metadata, but it's proprietary, so even if you can extract it, you won't know what to do with it.

Thanks. Following Revan654 question I was thinking what can be done with metadata capture. Because it can be a sequence of unrelated clips it must be possible to preserve variable metadata (per scene) despite its static nature. The fact that it is included per GOP helps this idea.

kolak
31st March 2018, 21:14
When h265 HDR clip is properly encoded then HDR metadata should be present at every GOP. Some old clips made with x265 may not follow this rule. Current (few months old) x265 has this fixed and adds HDR metadata every GOP by default.

Revan654
31st March 2018, 21:46
Thanks. Following Revan654 question I was thinking what can be done with metadata capture. Because it can be a sequence of unrelated clips it must be possible to preserve variable metadata (per scene) despite its static nature. The fact that it is included per GOP helps this idea.


After allot of research, some things I've come up with. This should help. Atlease a starting point.

Shaders looks to be where color space is refined at. Which needs to add BT.2020 to it.


Review source Code(The Original Virtual).

I cam across this: AVIStreamHeader_fixedhdr in the AVIReadHandler.cpp

I have no idea what this means Since I don't understand C Programming.


More noting HDR:


if (hdr.biWidth != mWidth || hdr.biHeight != mHeight)
return false;

const VDAVIBitmapInfoHeader& hdr = *(const VDAVIBitmapInfoHeader *)format;

if (hdr.biWidth != mWidth || hdr.biHeight != mHeight)
return false;

int pxformat = VDBitmapFormatToPixmapFormat(hdr);

return QueryTargetFormat(pxformat);

bool VDVideoDecompressorDIB::SetTargetFormat(const void *format) {
const VDAVIBitmapInfoHeader& hdr = *(const VDAVIBitmapInfoHeader *)format;

if (hdr.biWidth != mWidth || hdr.biHeight != mHeight)
return false;

int variant;
int pxformat = VDBitmapFormatToPixmapFormat(hdr, variant);
if (!pxformat)
return false;

There allot more with HDR in the file, It's all from VideoSource.cpp file.


Also BlackMagic SDK seems to have HDR and Color Space. Maybe that would help speed things up with HDR aspect? Magewell SDK is being released in one to two weeks time.


Some Free Source code Color/ Shaders which has BT.2020 in them already.

Link: https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/MiniEngine/Core/Shaders/ColorSpaceUtility.hlsli

VDub Filter for BT.2020: https://github.com/jpsdr/Filtres_JPSDR/tree/master/ColorSpaceConvert

Here are allot of Links talking about the MetaData and HDR:

https://msdn.microsoft.com/en-us/library/windows/desktop/mt732708(v=vs.85).aspx

Link 2 (Color Space) : https://msdn.microsoft.com/en-us/library/windows/desktop/dn903661(v=vs.85).aspx

Link 3(Setting HDR): https://msdn.microsoft.com/en-us/library/windows/desktop/mt732708(v=vs.85).aspx

Link 3 (Defining HDR) : https://msdn.microsoft.com/en-us/library/windows/desktop/mt732701(v=vs.85).aspx

Link 4(HDR Structure): https://msdn.microsoft.com/en-us/library/windows/desktop/mt732700(v=vs.85).aspx

Link 5 Wide Range: https://msdn.microsoft.com/en-us/library/windows/desktop/mt742103(v=vs.85).aspx

shekh
29th April 2018, 10:22
New update (41768): most effort went to fixing bitdepth scaling errors/inconsistencies.
Using VapourSynth resize as reference, I now confirm bit-to-bit identical results at every sample that I checked.
Previously there were inaccuracies like gray CbCr->0x8080 and inexact scaling of limited range values.

GMJCZP
29th April 2018, 11:19
I still try to open a file with the context menu and start VDub 1.10.4, when could this be fixed?

shekh
29th April 2018, 21:52
I still try to open a file with the context menu and start VDub 1.10.4, when could this be fixed?

All I can do now is keep this in requests list, so it doesn't get lost. https://sourceforge.net/p/vdfiltermod/tickets/125/

I implement things that I select. How else would you expect? Right now, solving context menus is not on top of my wish list. I'm sorry but it can last long.

Asmodian
30th April 2018, 00:16
New update (41768): most effort went to fixing bitdepth scaling errors/inconsistencies.
Using VapourSynth resize as reference, I now confirm bit-to-bit identical results at every sample that I checked.
Previously there were inaccuracies like gray CbCr->0x8080 and inexact scaling of limited range values.

Thanks! Great to see the math getting polished. :)

fAy01
30th April 2018, 12:11
Thanks for fixing the conversion errors. Cheers!

isidroco
9th May 2018, 01:53
I still try to open a file with the context menu and start VDub 1.10.4, when could this be fixed?

You may try renaming Vdub v1.10.4 (ie: VDUB4.EXE) so context menu won't find it.

Stereodude
10th May 2018, 22:07
How about a pie in the sky feature request... An option to use MadVR in a window as the output display for VD2 instead of the standard Windows display API?

LigH
10th May 2018, 22:14
A prerequirement, using DirectX (9 or 11) for output panes, seems to be supported already; now "just" select a renderer?!

shekh
12th May 2018, 10:43
How about a pie in the sky feature request... An option to use MadVR in a window as the output display for VD2 instead of the standard Windows display API?

Sounds great, and a lot of work.
I expect the fact that I'm already using DX9 has zero help with it

ricardo.santos
10th June 2018, 17:22
Hi shekh, thanks for all the work you have put on VirtualDub2/VirtualDubFilterMod, when using VirtualDub2 to only cut/export 1080p videos to cineform i noticed the exported clips are being recognized as being 720p in premiere pro, the exported files are 1080p.

i use the following settings:
SAVE AS: Quicktime

Cineform Configuration:
YUV 4:2:2 10 bit depth
Intermediate Bit Depth: 10
Quality: High

Its not a big problem just wondering if its something im doing wrong
Thanks

ricardo.santos
10th June 2018, 17:42
Here's a small 2 sec sample, if i try to create a "timeline/project" on premiere it sets the timeline as 720p, all the clips are zoomed in not showing 33% of the video, but the videos are 1080p, its just premiere pro "video inspector" showing it as 720p.
https://www.dropbox.com/s/jatdtq15p3tcta5/cineform1080p_2sec.mov?dl=0

Its not a big problem since i manually changed the "timeline/project" settings to 1080p and set each video to a 67% zoom level in order for the videos to fill the 1080p area, im not a "coder" but wondering if virtualdub2 is writting any wrong metadata that could "fool" premiere pro?

Thanks

poisondeathray
10th June 2018, 18:02
Here's a small 2 sec sample, if i try to create a "timeline/project" on premiere it sets the timeline as 720p, all the clips are zoomed in not showing 33% of the video, but the videos are 1080p, its just premiere pro "video inspector" showing it as 720p.
https://www.dropbox.com/s/jatdtq15p3tcta5/cineform1080p_2sec.mov?dl=0

Its not a big problem since i manually changed the "timeline/project" settings to 1080p and set each video to a 67% zoom level in order for the videos to fill the 1080p area, im not a "coder" but wondering if virtualdub2 is writting any wrong metadata that could "fool" premiere pro?

Thanks

This is 1920x1080 in premiere for me.

It might be you are using older PP version ?

If you are on windows, using older PP version, try using cineform AVI instead

ricardo.santos
10th June 2018, 18:18
Thanks a lot poisondeathray!!

created an avi cineform file and premiere recognized it properly, after that i tried some of the MOV videos that were problematic and now they are "tagged" correctly...go figure...im using premiere 2017.

:thanks:

poisondeathray
10th June 2018, 18:26
Thanks a lot poisondeathray!!

created an avi cineform file and premiere recognized it properly, after that i tried some of the MOV videos that were problematic and now they are "tagged" correctly...go figure...im using premiere 2017.

:thanks:

Not sure, I just checked on another computer with CC2015 and it's 1920x1080 too . So both CC2018 and CC2015 are reading the MOV correctly . Might be a system problem or corrupt install on your end ?

ricardo.santos
10th June 2018, 18:49
I recently discovered that by using cineform videos on premiere pro i could preview the fx/titles/transitions etc without stuttering, so i quickly installed old quicktime codecs (quicktime alternative because of the mov format) and installed an old gopro studio version and the latest Quik software from gopro thinking i could do a "speed" course on the format but after a lot of problems i sat down and calmly reading articles online i found out the format is now open source and natively supported by premiere pro, i had installed a lot of stuff that gave me problems without really needing it.

Since Premiere pro slows down my pc a bit when using a lot of clips and editing, i needed a tool that i could use to just cut and export to cineform and then use premiere a lot less and without stuttering while previewing all the edits....thats how i got to virtualdub2 and to here.

I must do a backup and a fresh install of windows...lesson learned...dont try to rush things

Thanks

shekh
10th June 2018, 18:59
Hi,
I'm not attaching any metadata. But the cineform db is quite complex, it has global overrides which may interfere with any cineform file.

Revan654
10th June 2018, 19:30
I believe cineform in VD2 is still listed as experiential.

----------

Any chance we will be seeing x265 (Fully Supported, All Flags and options)? or x265 with Nvidia GPU enabled?

------

Also HDR SDK for Magewell has been Released Publicly: http://www.magewell.com/files/Magewell_Capture_SDK_3.3.1.719.zip

Not sure if you still going to add Rec.2020 and HDR10 Support or not.

shekh
10th June 2018, 20:04
I believe cineform in VD2 is still listed as experiential.


And the reason is?
I have no reports or suggestions about cineform.

> Any chance we will be seeing x265 (Fully Supported, All Flags and options)? or x265 with Nvidia GPU enabled?

Currently I don't plan it. x265 with Nvidia: this thing does not even exist afaik.

> Not sure if you still going to add Rec.2020 and HDR10 Support

I prefer to message when it's done.

Revan654
11th June 2018, 19:38
And the reason is?
I have no reports or suggestions about cineform.

> Any chance we will be seeing x265 (Fully Supported, All Flags and options)? or x265 with Nvidia GPU enabled?

Currently I don't plan it. x265 with Nvidia: this thing does not even exist afaik.

> Not sure if you still going to add Rec.2020 and HDR10 Support

I prefer to message when it's done.

x265 with Nvida does exist. It's just NVEnc, the SDK I uploaded contains examples of it.

If you ever add HDR x265 is required along with certain Flags.

LigH
11th June 2018, 19:53
How many more times? Again and again, over and over...

If you let Nvidia's PureVideo chip encode HEVC video, it is not x265. The point of x265 is the complexity of the calculations PureVideo can never provide. NVEnc may produce HEVC video. But it will never be x265.

wonkey_monkey
11th June 2018, 21:53
Are we talking about x265 as in the specific encoder here, or using it to refer to HEVC/H.265? Just trying to work out what everyone's saying...

LigH
11th June 2018, 22:18
That's the important difference.

There are many HEVC / H.265 encoders out there. But not all of them can be implemented into VirtualDub2, based on libraries available to ffmpeg (e.g. most of them are not available as source code): x265 is one of them, but it will not use any GPU encoding. GPU encoders like NVEnc may be available too, where the hardware supports it, but it won't compete with the efficiency (quality retention per bitrate) of x265.

HEVC encoding in a GPU is way too limiting: less available RAM to store many frames to compare with each other to find similarities; slow uploading of the frames from system RAM into video RAM; limited set of instructions in the GPU, optimized rather for 3D graphics than for video compression ... using SSE, AVX and other modern SIMD instruction sets, and having possibly more than 8 GB RAM available with rather fast access, is much more interesting for video compression with good quality preservation, which requires a higher complexity in the encoding process.

Revan654
18th June 2018, 22:58
That's the important difference.

There are many HEVC / H.265 encoders out there. But not all of them can be implemented into VirtualDub2, based on libraries available to ffmpeg (e.g. most of them are not available as source code): x265 is one of them, but it will not use any GPU encoding. GPU encoders like NVEnc may be available too, where the hardware supports it, but it won't compete with the efficiency (quality retention per bitrate) of x265.

HEVC encoding in a GPU is way too limiting: less available RAM to store many frames to compare with each other to find similarities; slow uploading of the frames from system RAM into video RAM; limited set of instructions in the GPU, optimized rather for 3D graphics than for video compression ... using SSE, AVX and other modern SIMD instruction sets, and having possibly more than 8 GB RAM available with rather fast access, is much more interesting for video compression with good quality preservation, which requires a higher complexity in the encoding process.

There is x265VFW, However it's limited when it comes to pixel type.

Maybe can just use the GPU as acceleration option. Since x265 can be taxing on a system.

Or an option to use external encoder while in capture mode. Right now all the codecs are pretty much useless to me since I need to add additional flags to the codecs and there no option for that (Except for x264).

Are we talking about x265 as in the specific encoder here, or using it to refer to HEVC/H.265? Just trying to work out what everyone's saying...

Just a reference to HEVC.

Yanak
22nd July 2018, 20:10
Hello,

I'm trying to use a mkv containing a .hevc 4.2.0 10bits file inside virtualdub2, and exporting via the frameserver to a .vdr file and then trying to open it in Staxrip.

The .vdr file imports in Staxrip, i can see the length of the file being correct but all the frames are returned black, until now i always used 8bits videos and with those there is no problems using avisource in avisynth+ for .vdr files.

Vdub2 in automatic mode for the decode format sets it to YUV420P16 apparently ( file information in vdub2 says yuv420p10le ), tried to set it manually to YUV420P10 but still black frames returned in avisource, if i set the decode format to RGB24 it returns the frames normally, not black i mean, but at this point i didn't tried to compare colors vs original frames to see if there is some errors.

I saw there is the possibility to set the pixel_type for avisource but trying YUV420P16 or YUV420P10 still return black frames on the .vdr file, tried also to use things like fourCC="Y3[11][10]" in the avisource filter but seems to have no effect, still black frames.

I'm a bit lost in this now and not sure if it comes from avisynth or from the .vdr file exported by the frameserver and possible problems with 10 bits content,

If anyone have an idea about this please,

Thanks a lot.

shekh
22nd July 2018, 20:47
Hello,
I see this problem, investigating.

Frameserving always uses RGBA output format. Currently you can fix it by adding a filter "convert format (RGBA32)". There is nothing to do on avisource side.

edit: actually, frameserver outputs RGB24 but the workaround is good anyway.
edit2: fixed in new build.

Yanak
23rd July 2018, 06:00
Hello,

Thank you very much for the quick reply, (sorry for the late reply, had to go out in emergency just after posting this yesterday), i understand now, will try the new build and use convert to rgb24.

Thanks again for all :)

color
23rd July 2018, 18:35
I did use Virtualdub2 for a few days without any problems, but today, all videos is shown in the left preview window, but the right one is grey. I have not done anything with the codecs or changed any options. Tried to uncheck DirectX and restarted the program and windows without any luck.

shekh
23rd July 2018, 18:50
I did use Virtualdub2 for a few days without any problems, but today, all videos is shown in the left preview window, but the right one is grey. I have not done anything with the codecs or changed any options. Tried to uncheck DirectX and restarted the program and windows without any luck.

Have you unchecked "View->Output video pane"?

color
24th July 2018, 10:14
sekh, oh, haha. Yes it was unchecked. I saw It was "F10" Its the same button to change audio on my keyboard but pressing "fn"-button, I guess that might be why. Thank you. :)

kolak
3rd August 2018, 21:55
Could we have bayer 12bit pixel format added, so after loading CR RAW files we could render them (eg as RGB 12 or 16bit) keeping Bayer pattern? This would need bypass Cineform own debayering, but I know there is such an option in Cineform SDK.

lansing
6th August 2018, 16:38
Hi I want to track down an annoying bug in capture mode myself, I cloned the project and opened the VirtualDub.sln with Microsoft Visual Studio Community 2017. How do I build it for testing? I choose "build solution" but it failed with message about "build tool for v140_xp can not be found". What else do I need?

Update: I found the solution here (https://developercommunity.visualstudio.com/content/problem/48806/cant-find-v140-in-visual-studio-2017.html), I can install it through the visual studio installer, but I don't have 5 GB in my hard drive...is there a way to get around this?

lansing
7th August 2018, 07:38
I filed a ticket (https://sourceforge.net/p/vdfiltermod/tickets/161/)for this issue instead, I just couldn't squeeze out enough hard drive to install all the programs.

shekh
10th August 2018, 09:58
Hi I want to track down an annoying bug in capture mode myself, I cloned the project and opened the VirtualDub.sln with Microsoft Visual Studio Community 2017. How do I build it for testing? I choose "build solution" but it failed with message about "build tool for v140_xp can not be found". What else do I need?


These instructions should work: https://github.com/shekh/VirtualDub2/blob/master/BUILDING.txt

It is not necessary to use v140_xp toolset, you can change it to v140 or whatever is already installed. It will not run on XP but you should not care. See VirtualDub project properties, general, toolset.

Also replied to ticket.

shekh
10th August 2018, 10:03
Could we have bayer 12bit pixel format added, so after loading CR RAW files we could render them (eg as RGB 12 or 16bit) keeping Bayer pattern? This would need bypass Cineform own debayering, but I know there is such an option in Cineform SDK.

It is possible. Can you describe in more detail how would you use this?
Do you want to save it again as bayer format, or apply some custom debayering outside VD?

kolak
10th August 2018, 18:58
Ideally I would like to convert CinemaDNG RAW into CF RAW :)
Converting TIFF with RAW data into CF RAW would be already cool. I can convert CDNG RAW with dcraw tool into "RAW" TIFF.
Decoding CF RAW and exporting as 12bit uncompressed file keeping RAW look for testing purposes should be easy to implement.

wonkey_monkey
11th August 2018, 01:47
This is very minor, but I've noticed that pressing Alt doesn't activate the menu bar as it would in most other Windows software. If I hold Alt and press F, it does open the File menu, but if I separately press Alt, and then F, it doesn't. Is this deliberate?

shekh
11th August 2018, 09:12
This is very minor, but I've noticed that pressing Alt doesn't activate the menu bar as it would in most other Windows software. If I hold Alt and press F, it does open the File menu, but if I separately press Alt, and then F, it doesn't. Is this deliberate?

Mistake in hotkey handling, fixing. Thanks for report.

shekh
11th August 2018, 12:03
Ideally I would like to convert CinemaDNG RAW into CF RAW :)
Converting TIFF with RAW data into CF RAW would be already cool. I can convert CDNG RAW with dcraw tool into "RAW" TIFF.
Decoding CF RAW and exporting as 12bit uncompressed file keeping RAW look for testing purposes should be easy to implement.

After some experimenting:
"dcraw -6 -E" creates non-interpolated bayer image from dng etc that looks quite the same as CFHD_PIXEL_FORMAT_BYR4 image extracted from cineform. So this part is trivial, and likely no problem to compress such image to cineform raw format. But what about metadata, does cineform raw without any relevant metadata make sense? Translating the metadata could be a challenge.
Also not sure about CinemaDNG but to import DNG sequences it would require a new source plugin, as nothing like that seems integrated with FFMpeg already. Such plugin can be derived from dcraw or from gopro/gpr (maybe from both). This needs some effort, not promising now.

kolak
11th August 2018, 13:30
Maybe add -W which should keep RAW untouched (not brightened- not sure).

Metadata is tricky part for sure. Here is some hint:
http://vfx-rants.blogspot.com/2012/08/bmcc-raw-to-cineform-raw.html

I want to use Cineform RAW in Resolve which does bypass Cineform metadata and debayering anyway, so I assume it still make sense.
There are 2 parts in this article:
- make debayered image look LOG, but not green (so you apply inverted embedded color matrix)
- 2nd part is to give it a "final" look for sRGB/REc.709 screen (optional)

Here you have BM Ursa Mini original assets:
http://translate.google.com/translate?sl=de&tl=en&js=n&prev=_t&hl=de&ie=UTF-8&u=http%3A%2F%2Flaufbildkommission.wordpress.com%2F

which represent good source. If you can convert few frames into CF RAW (no metadata) I can have a look.

shekh
11th August 2018, 23:03
Here you have BM Ursa Mini original assets:
http://translate.google.com/translate?sl=de&tl=en&js=n&prev=_t&hl=de&ie=UTF-8&u=http%3A%2F%2Flaufbildkommission.wordpress.com%2F

which represent good source. If you can convert few frames into CF RAW (no metadata) I can have a look.

Hope you can deal with it. Looks not too bad, at least details are present.

https://drive.google.com/open?id=1OBHWIoTvImZkXnF2r6X2Q9fPQy6w-9O1

kolak
12th August 2018, 11:27
Hm... I had similar results. This is not really good. You can't get "proper" look from it after debayering. Something seems to be wrong.

shekh
12th August 2018, 13:43
Hm... I had similar results. This is not really good. You can't get "proper" look from it after debayering. Something seems to be wrong.

How about this one: https://drive.google.com/open?id=1uXbtuI4PZDKKXS41XVI_fRP13i6rq7lV

It seems BM Ursa pattern is GBRG rather than RGGB so I flipped the raw image vertically before encoding. Colors turn legible

shekh
12th August 2018, 17:28
Build 42122, bugfix and very experimental CF raw support.

To encode CF raw: open grayscale 16-bit images (I16), any format like ppm,pgm,tiff is ok. Select "bayer" in codec settings.
To decode CF raw: select decode format->grayscale. This triggers bayer output in I16 format.
It appears that there is conversion error between I16<->RGBA64 (clipped dark values)

kolak
12th August 2018, 19:02
Great! It's fine now, except image is 180 degrees flipped :)
Not sure how, but now if you could just pass to CF RAW this matrix values to bring image into more similar look to DNG.

shekh
12th August 2018, 19:11
Great! It's fine now, except image is 180 degrees flipped :)

It's just to confirm the workflow :) Now it needs some simple filter to change mosaic order instead of flipping.
Another alternative with this source is to crop 1 line off top and bottom.

kolak
12th August 2018, 19:33
I'm playing with it now.
Footage looks quite fine in Resolve. Any colorist can grade from it (even without all those somehow helpful matrixes applied).
Pattern will be different for different camera makers, so this is something to "sort out"- eg. have setting to force specific one.

My method was very convoluted. Save dcraw decoded TIFF with ffmpeg as uncompressed 16bit raw video with BYR4 header (which allowed CF encoder to link to it and switch to RAW mode) and then use diretchsow encoder in grpahedit :) It did work though :)

kolak
12th August 2018, 20:31
Trying to measure CF RAW (to source RAW) PSNR and having issue with levels.

"It appears that there is conversion error between I16<->RGBA64 (clipped dark values)"

I assume this is an issue. I can't at the moment save decoded CF RAW into something which I could compare against original TIFF RAW.

kolak
12th August 2018, 21:13
How about this one: https://drive.google.com/open?id=1uXbtuI4PZDKKXS41XVI_fRP13i6rq7lV

It seems BM Ursa pattern is GBRG rather than RGGB so I flipped the raw image vertically before encoding. Colors turn legible

Yes, dcraw confirms that it's RGRB.

wonkey_monkey
13th August 2018, 22:11
I have another suggestion for you shekh, if I may. One thing I, and hopefully other people, would dearly love in VirtualDub2 is a pop-up magnifier that we could use to zoom in on a particular spot.

I made a mock(ery) (https://i.imgur.com/IbHufxw.jpg) - it could either be directly under the pointer (left) or offset somehow (right). Or perhaps it could be a third pane.

PS The "Input video pane" and "Output video pane" options don't do what I'd expect - I was expecting them to remove the panes entirely rather than simply stop updating them. I guess that's what the Pane Layout submenu is for, but the descriptions for the main menu options (F9/F10) are ambiguous, I think.

shekh
13th August 2018, 22:47
I have another suggestion for you shekh, if I may. One thing I, and hopefully other people, would dearly love in VirtualDub2 is a pop-up magnifier that we could use to zoom in on a particular spot.

I made a mock(ery) (https://i.imgur.com/IbHufxw.jpg) - it could either be directly under the pointer (left) or offset somehow (right). Or perhaps it could be a third pane.


I also want this :) Currently to view some pixels I go to the "crop" filter and use magnifier there (holding shift).
But it is not very convenient. Could be better if I make it available in the main panes too.


PS The "Input video pane" and "Output video pane" options don't do what I'd expect - I was expecting them to remove the panes entirely rather than simply stop updating them. I guess that's what the Pane Layout submenu is for, but the descriptions for the main menu options (F9/F10) are ambiguous, I think.

I don't know why these options exist at all. Maybe "Freeze input pane" will be better name?

shekh
13th August 2018, 23:52
Trying to measure CF RAW (to source RAW) PSNR and having issue with levels.

"It appears that there is conversion error between I16<->RGBA64 (clipped dark values)"

I assume this is an issue. I can't at the moment save decoded CF RAW into something which I could compare against original TIFF RAW.

Here is build from WIP branch with some unconfirmed changes.
Y16 is handled better and there is gray16 tiff export too.
I added bayer options to cineform codec (it adds TAG_BAYER_FORMAT CF metadata). Cineform decoder applies it on debayering.

https://drive.google.com/open?id=11b2oCNfPhp7BQOm_ynMnc6ORW4szTRU1

kolak
14th August 2018, 00:16
:thanks:
Will try.

kolak
14th August 2018, 00:35
All working better now :)
I have to use BG setting for this Ursa shot, which seems to be strange?

shekh
14th August 2018, 00:43
All working better now :)
I have to use BG setting for this Ursa shot, which seems to be strange?

Are you sure? It works for me with GB, and this is what dcraw reports "Filter pattern: GB/RG".

Yanak
14th August 2018, 05:36
Hello,

I don't know if it's normal or not but the setting "Auto-size" for the panels seems to not be remembered from one session to another and one video size to another sometimes.

I open a 1920x1080 video, set auto-size panels, then close vdub2 and reopen the same video and it stays auto sized, but if i open a video of let's says 1440p this time it will display both panels at 100% size and auto-size is unticked in the settings.


One thing that will be nice if possible without much coding work will be to set the auto-size of panels for each one individually, for example, having the output panel maximized at his maximum display capacity while the input panel is at 25% and having this setting remembered from one session to another, saving this as a kind of template.

Let's say that when opening a video the input panel will always be at 25% size ( as long as it fits inside the window, should be no problem on 1080p display and 1080p video, the 25% window will be 480x270px + the panel borders ) and the output will be displayed at his maximum size in the remaining free space while the zoom level being calculated to use a maximum of the remaining free space to stay inside the window, fully visible, in this example the 1080p video will be around 1422x800px in the output panel, 74% of the original 1080p size if i make no errors.

If we have a 720p input on a 1080p display the input panel will be at 25% ( around 320x180px + panel borders in size ) and there is enough free space to display the output at around 123-124%, not sure in this case if the output should be limited to 100% or still use the maximum it can from the remaining space to display at 123-124%, I prefer the second possibility tho, free to me to later use 100% with a simple right click on the panel to see at normal size.

Not sure if i explained myself correctly and if it's clear enough but will be nice to have such possibilities.


Another thing that will be nice is to have a kind of dark theme but this will probably need a ton of work for something that is pure cosmetic and won't ever happen :p

Thank you.

kolak
14th August 2018, 11:11
Are you sure? It works for me with GB, and this is what dcraw reports "Filter pattern: GB/RG".

Your are right. I simply didn't look properly.

kolak
14th August 2018, 11:57
I added bayer options to cineform codec (it adds TAG_BAYER_FORMAT CF metadata). Cineform decoder applies it on debayering.



Are you already passing some metadata? Nothing seems to change.
I can try asking David Newman how to map DNG metadata to CF metadata.

shekh
14th August 2018, 12:32
Are you already passing some metadata? Nothing seems to change.
I can try asking David Newman how to map DNG metadata to CF metadata.

I add bayer type metadata at encoding step only, based on bayer format selected in config dropdown.
Reading dng directly and preserving this info from source needs more effort. Maybe later!

> Nothing seems to change.

What problem do you see exactly? If I save the same source with 4 different bayer patterns they look differently when decoded as rgb. Either with native decoder in vd2 or with vfw decoder in mpc-hc.

It is possible to see the metadata in hex editor, begins with BFMT.
If you are looking at it in resolve, maybe it doesn't pick this flag?

kolak
14th August 2018, 14:52
I mean the look didn't change. Whole encoding and bayer setting are all good :)

With metadata CF own decoder should give us better look for start, but this will be still not available in Resolve (Resolve uses own debayering which is better and GPU based). I'm waiting for BM to add whole RAW control for CF RAW in Resolve.

Thank you for you work- this is already a lot (at leats for testing needs).

Are you aware that Cineform use to provide cmd line tool for transcoding from DNG RAW (and not only) to CF RAW? This tool supports only uncompressed DNG as far as I know. It hasn't been updated for years. Shame this code is not public (it owed be probably not to difficult to adjust it)- we only have exe file.

SeeMoreDigital
14th August 2018, 18:04
Hi all,

I have an AVID source which contains some banding in certain scenes: -

https://i.imgur.com/Zm92yIy.png

Is there a filter in VirtualDub2 that can help reduce this?


Cheers

kolak
14th August 2018, 18:15
Don't think so. You need avisynth or vapoursynth. Filters like:
flash3kyuu_deband or GradFun3.

shekh
14th August 2018, 18:24
I tried to port GradFun filter but didn't like the result. Got stuck mid-way while trying to fix its issues.
edit: this was from ffmpeg version of GradFun, which is probably not the same at all as AviSynth GradFun3.

shekh
14th August 2018, 18:41
One thing that will be nice if possible without much coding work will be to set the auto-size of panels for each one individually, for example, having the output panel maximized at his maximum display capacity while the input panel is at 25% and having this setting remembered from one session to another, saving this as a kind of template.

I thought it already performs that way :) Maybe there is a bug.

Dark theme: unrealistic. Did you try to change entire windows theme?

SeeMoreDigital
16th August 2018, 20:17
Don't think so. You need avisynth or vapoursynth. Filters like:
flash3kyuu_deband or GradFun3.Bummer... That's a shame :(

wonkey_monkey
16th August 2018, 20:19
I know this is a super vague thing to report, but sometimes VirtualDub2 fails to respond to a press of "Page Up" or "Page Down." Unfortunately I can't find a way to repeatedly trigger the issue, so I mention it only in case it triggers a thought.

lansing
16th August 2018, 23:58
I have another problem with the capture mode. My Logitech webcam has an "exposure" parameter, but it's not showing up in the "levels" window. Can you also map this parameter to the window?

wonkey_monkey
19th August 2018, 23:46
Odd behaviour discovered (please make sure you view this at 100%):

https://i.imgur.com/4Yy2KlK.png

The source is an Avisynth script as follows which produces alternating black and white lines. The left hand size is magnified to 150%. I can't think why it would look like this, but it only occurs at exactly 150%, and only with "Use DirectX for display panes" switched off (I forget why I have it switched off, but I'm sure there is a good reason). It can also be seen when DirectX is on but VirtualDub is not the focused window (I assume DirectX gets switched off in that situation).

Source:


blankclip(width=360,height=144)
interleave(last,last.invert).assumefieldbased.weave


When stepping through frames or playing back, the stripes jump around.

At other zooms, or when manually dragged away from 150%, the result is aliased (with DirectX off), but consistent.

Groucho2004
20th August 2018, 07:12
@davidhorman
I can't reproduce any of the problems you describe, neither on XP nor on Win7.
Maybe it's related to your display driver and/or it's configuration. Dunno, just a hunch.

Emulgator
21st August 2018, 18:03
Can not repeat that too. VD2 42087, Win7U64, nVidia 388.16

wonkey_monkey
21st August 2018, 22:10
For what it's worth I'm on Windows 7 with an Nvidia Optimus (Intel/Nvidia graphics cards working together). That might have something to do with it, but it's never caused any other problems. Even if I force VirtualDub to run on the Nvidia card (it usually runs on the Intel) the problem still happens. I tried on another computer with an older version of VirtualDub2 and it didn't happen ¯\_(ツ)_/¯

shekh
23rd August 2018, 14:34
Looks like rounding error in StretchBlt (unbelievable), I can only suggest that this is GPU defect. Is the temperature normal? :|

wonkey_monkey
23rd August 2018, 14:55
Well it's been a bit hot for my liking, but it is Summer after all...

Oh, the computer? Nah, it's as cool as a cucumber. Fan hardly ever blows. I've never seen any other such defects, and it only happens at that specific scale factor (150%), and only if DirectX is disabled (which for most people it won't be, i guess).

wonkey_monkey
24th August 2018, 22:16
Minor bug? When reloading (with F2) an Avisynth script which is now longer than before, a white mark appears on the timeline at the previous endpoint of the video (or sometimes at a different point; I think it may have something to do with changes to the number scale as the numbers get larger):

https://i.imgur.com/pesInkp.png

It compounds with each increase in length:

https://i.imgur.com/PKLHrA5.png

After doing it twice (or more) in succession then reverting back to the original length, it triggers the "The new video has fewer video frames [...] Switching to it will result in changes to the edit list" message (even when there have been no edits). Doing it only once (increasing length then back to original length) doesn't trigger this message. I think this message has always appeared at unpredictable times with old versions of VirtualDub as well.

shekh
26th August 2018, 18:38
White stripes indicate where is discontinuity in timeline (typically created by delete operations). The problem with reloading needs very minor change to fix it. Currently when the source becomes longer, the new piece is added as independent segment with pointless split. Later when source becomes shorter this split is treated as if it is precious information to lose.

MeteorRain
27th August 2018, 10:02
Hi shekh

I haven't been looking for a new version of VD(M) for years. Still using the 1.4.13.2 until today I realize I need some high bit depth support with Vapoursynth x64 and I happen to see this project. I sincerely appreciate all the efforts in improving the functionalities. The new update that natively supports 10 bit rendering really impressed me.

A few concerns during my usage.

A seek jump has always been 50 frames, that is Alt+Left/Right jumps 50 frames at a time. Is it possible to support different units? Eg. sometimes I want to jump 50 frames, but sometimes I want 2000 at a time.

Back in the 1.4-1.5 days, the position bar was the old fashion slider. When I click on the slider bar, the nob slides for a unit (50 frames). It was very handy to glance through a video because it slides only when I move my mouse cursor while pressing the left mouse button on the bar. In 1.6 the behavior changed and the same task that I had been doing became such a hard job. And even worse, I would lose my current position if I accidentally click on the bar. Is there any way to revert back to the old behavior? -- This is actually the primary reason I'm still staying at 1.4.13.2.

Also, any quicker way to zoom in and out? Current behavior needs 2 clicks and mouse moving. I'd hope something like Ctrl+Scroll zooming.

MeteorRain
27th August 2018, 22:18
I also spent a few minutes reading the backlog and doing experiments. Couldn't make the context menu working (in my case, .avs and .vpy). Weird to me that even VDub 1.10.4 didn't want to be added to the list. Maybe we should try some 3rd party tool instead.

shekh
27th August 2018, 22:27
Hi, thanks.

> sometimes I want to jump 50 frames, but sometimes I want 2000 at a time

This needs some new options. Maybe I can squeeze it in preferences dialog.

> When I click on the slider bar, the nob slides for a unit

I didn't use 1.4, you mean it behaved like typical scrollbar? Actually I prefer how it is now but if the option is easy to add, why not.
Note that you can preserve any interesting position using "toggle marker" command (add hotkey for it).

> Also, any quicker way to zoom in and out?

Currently there is no better way.

MeteorRain
27th August 2018, 22:51
https://i.imgur.com/19T0cap.png

I think I got this working.

First I tried to Open with... more application to add both binaries into the candidate list.

Now they refuse to appear inside the context menu.

Then I moved both binaries away, and fill in the VDM binaries with the corresponding names as placeholders. (x86 or x64 does not matter, just duplicate the x86 binaries and fill them in.)

Then I tried first step again. They successfully appear in the list despite that they may show the VDM icon. A reboot or explorer restart should correct the icon but I didn't care about that.

Lastly, moved both binaries back.

Ran a few tests on my desktop. VPY file loads VDM 1.4, VD 1.10-64 and VD2-64 just fine. Please give it a shot.

MeteorRain
27th August 2018, 23:10
Please disregard my last post.

I was poking around the registry and figured out this.

D:\encode\VirtualDubMod\VirtualDubMod.exe.ApplicationCompany
Please suggest one. I haven't come up with a good one yet.

So I went to check the VDM 0.1a source code, and it was there \VirtualDubMod-source_0.1a\VirtualDub.rc, VALUE "CompanyName", "Please suggest one. I haven't come up with a good one yet.\0".

Removing that line broke the context menu.

Then I went back to Google, and found this post (https://superuser.com/questions/1199648/strange-open-with-list-inconsistent-with-registry).

Hope this helps.

shekh
28th August 2018, 10:28
Have you seen this post? https://forum.doom9.org/showthread.php?p=1836511#post1836511
This is how I entered "openwith" association for myself on Win7.
In vdmod VersionInfo there is empty CompanyName. I don't believe this is different from not having CompanyName at all.
From what I see, adding "CompanyName" field provides extra line of information when I open "Choose program" dialog, but nothing else.

MeteorRain
28th August 2018, 21:40
Have you seen this post? https://forum.doom9.org/showthread.php?p=1836511#post1836511
This is how I entered "openwith" association for myself on Win7.
In vdmod VersionInfo there is empty CompanyName. I don't believe this is different from not having CompanyName at all.
From what I see, adding "CompanyName" field provides extra line of information when I open "Choose program" dialog, but nothing else.

I did, and actually I spent quite a few minutes without luck. I even tried both the global config (HKCR) and local config (HKCU IIRC) and no luck.

After I found out the information above, I used a resource hacker tool to inject the CompanyName into the binaries, and immediately (without any restart or reboot of anything) it appeared on the open with list. If you don't believe me, that's fine :) At very least I can inject the field into the binary by myself.

By the way, just saying that I'm using Windows 10, not 7. Things might have changed since.

shekh
28th August 2018, 23:42
After I found out the information above, I used a resource hacker tool to inject the CompanyName into the binaries, and immediately (without any restart or reboot of anything) it appeared on the open with list.

Great, I prepared to ask you to check this, but you already did :)
Is the empty string "" enough for CompanyName? Otherwise I need to decide something meaningful for it

MeteorRain
29th August 2018, 02:36
Empty string or single space does not work. A dot "." works. Still it might be better to put meaningful string like "VD2" or w/e you like.

18fps
31st August 2018, 11:22
Would it be possible to add a dpx option to the Export / Image sequence... form?

shekh
31st August 2018, 11:36
Would it be possible to add a dpx option to the Export / Image sequence... form?

Maybe, don't know much about dpx. Why is it needed? Is there some software which does not like tiff?
Also it is possible to setup external profile to export dpx, did you consider that?

18fps
31st August 2018, 11:44
Mostly because in film it's the standard, so it's useful if you have to give back the work (to the colleagues or the laboratory) after you've modified it in VirtualDub2. How the external profile works?

shekh
31st August 2018, 12:24
https://gist.github.com/shekh/c28db6ed8f826e3dda4e14fbe6c1369b

first you need to modify command line to point to actual ffmpeg.exe
then Options->External encoders->Import...

now you can use File->Export->Using external encoder...

18fps
31st August 2018, 13:04
Thank you!

poisondeathray
31st August 2018, 18:37
For the dpx vprof it should be -pix_fmt gbrp10le . Tested the input/output diff and it matches

You can add -start_number 0 if you want to start at zero (ffmpeg normally starts image sequence exports at "one" )

GillesH
10th September 2018, 08:07
Hello,

How to open a MOV clip in an AVS script with VirtualDub2 ?
I want to test this principle WITHOUT QuickTime installed. Is it possible ?
I give below the characteristics of my MOV Clip. It is not a simple H264/MOV.
This MOV Clip opens very well directly in VirtualDub2, but I want to do the same with an AVS script.
I suppose :

LoadVirtualdubPlugin(" ? .vdplugin", " ? ")
? = "MOV Clip Source"

I tested FFMS2 in script AVS and it works fine with this MOV Clip, but the indexing principle slowed the opening of the clip.
I would just like to use the VirtualDub2 FFMPEG vdplugin(s) in an AVS script to decode this type of MOV Clip.


Here are the MOV Clip MetaData / MediaInfo
General :
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.02 (qt )
Writing application : Lavf57.25.100
IsTruncated : Yes

Video :
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Format settings, GOP : M=3, N=13
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits

Thanks for your advices. Merci.

Groucho2004
10th September 2018, 09:35
How to open a MOV clip in an AVS script with VirtualDub2 ?
I want to test this principle WITHOUT QuickTime installed. Is it possible ?
I'd use LAV Filters and DSS2Mod (https://forum.doom9.org/showpost.php?p=1699301&postcount=33).

LigH
10th September 2018, 10:21
I would use L-SMASH Works (LSMASHSource.dll) as AviSynth native plugin and use LSMASHVideoSource() because MOV is an ISO Media container, and the L-SMASH splitter can use the keyframe index chunk inside the MOV file.

I see no reason why anyone would try to use a VirtualDub2 input plugin in AviSynth, I am not even sure if that is possible at all (LoadVirtualDubPlugin loads video filter plugins = *.vdf, not input plugins).

Groucho2004
10th September 2018, 10:24
I would use L-SMASH Works (LSMASHSource.dll) as AviSynth native plugin and use LSMASHVideoSource() because MOV is an ISO Media container, and the L-SMASH splitter can use the keyframe index chunk inside the MOV file.So would I but the indexing time seems to be an issue so I suggested DSS2 to get around that.

LigH
10th September 2018, 10:52
LwLibavVideoSource creates an index file. LSMASHVideoSource does not, it uses the index inside the MOV, because MOV is an ISO Media container format.

Groucho2004
10th September 2018, 13:10
LwLibavVideoSource creates an index file. LSMASHVideoSource does not, it uses the index inside the MOV, because MOV is an ISO Media container format.Didn't know that. I should have read your post properly. :o

StainlessS
10th September 2018, 14:23
Yep, LSMASHVideoSource works great with ISO media, (in a work-in-progress function), is the first attempted source filter for any clip with below extensions.


Function IsISOFileName(String s) {
s=RT_GetFileExtension(s)
Return(s==".mov"||s==".mp4"||s==".m4v"||s==".3gp"||s==".3g2"||s==".mj2"||s==".dvb"||s==".dcf"||s==".m21")
}



Snippet

if(!c.IsClip) {
if(Prefer<=1) {
If(IsISOFileName(Ext)) {
FLGS=RT_BitSet(FLGS,0)
c = LSMASHVideoSource(vFN) RT_DebugF("LSMASHVideoSource Succeeds:",name=myName)
if(!SepAud) {
FLGS=RT_BitSet(FLGS,1)
try{
c=AudioDubEx(c,LSMASHAudioSource(vFN))
RT_DebugF("LSMASHAudioSource Succeeds:",name=myName)
} catch(msg) {
RT_DebugF("LSMASHAudioSource Fails:- '%s'",msg,name=myName)
}
}
}


EDIT: There is also a Try/Catch around above snippet.

GillesH
10th September 2018, 14:32
Thank you for your ideas. It's very nice!
I knew these possibilities.

With LSMASHVideoSource, I have a Avisynth crash: "Avisynth: breakpoint at 0x005D0E80"
This is probably related to the type of Apple Codec.

But I find it a pity not to use techniques that are always updated, like FFMPEG.
And since VirtualDub2 uses this technique, why not use it for AVS scripts.
When you open a Clip MP4 or MOV/Apple with VirtualDub2, there is no indexing, it's OK and it's fast.
Why not use these plugins for an AVS script ? Especially the avlib-1.vdplugin which must manage the MOV Apple.

I test again FFMS2 WITHOUT indexing. But I have not done all the tests yet. FFMS2 is probably the closest to the FFMPEG decoders.

Thanks again for your advice. Merci.

StainlessS
10th September 2018, 14:36
With LSMASHVideoSource, I have a Avisynth crash: "Avisynth: breakpoint at 0x005D0E80"
This is probably related to the type of Apple Codec.

Groucho, "Breakpoint", does that suggest some kind of debug version LSMash ? (EDIT: or even Avisynth)

EDIT: What versions of LSmash and Avisynth are you using ?

Groucho2004
10th September 2018, 15:10
Groucho, "Breakpoint", does that suggest some kind of debug version LSMash ? (EDIT: or even Avisynth)No idea, sorry. I'm rather sure that it's not Avisynth.

LigH
10th September 2018, 15:48
GillesH:

FFMS2 and L-SMASH Works do the same for AviSynth as the FFmpeg input plugin does for VirtualDub: Using the core of FFmpeg to read media files and provide their content to the plugin's host system.

Building a keyframe index is nothing bad: It happens only once, and it adds another layer of reliability for the case that frames from the source clip are requested in a random order, instead of sequentially; sometimes the internal keyframe index in a container may even be damaged, and a source plugin relying on them would fail. The plugins do that additional indexing for your convenience. And L-SMASH Works offers two different technologies: LwLibav*Source uses an additional index (but supports a lot of containers, even those which do not have an internal index at all), and LSMASH*Source relies on an internal index inside the clip (but supports only a few containers).

GillesH
10th September 2018, 15:54
For LSMASHSource.dll, I use a modified version modified on 9/1/2016. File Size: 9.19 MB
There is no version number indicated.
For Avisynth, I use 2.6 MT and I am of the same opinion as Groucho. It's not Avisynth.

But it does not matter, I will continue with FFMS2 or FFMS2000 that manage to decode this MOV Clip.

Thank you for your help.

LigH
10th September 2018, 16:11
There have been several attempts recently to update both plugins to a newer FFmpeg core, and with better support for AviSynth+ and modern color spaces. You may try l33tmeatwad's test release with SWResample patch (https://github.com/l33tmeatwad/L-SMASH-Works/releases) as one of the latest binaries, you may not use any resampler, but the splitters and decoders should be the most recent available.

shekh
10th September 2018, 16:12
Thank you for your ideas. It's very nice!
I knew these possibilities.

With LSMASHVideoSource, I have a Avisynth crash: "Avisynth: breakpoint at 0x005D0E80"
This is probably related to the type of Apple Codec.

But I find it a pity not to use techniques that are always updated, like FFMPEG.
And since VirtualDub2 uses this technique, why not use it for AVS scripts.
When you open a Clip MP4 or MOV/Apple with VirtualDub2, there is no indexing, it's OK and it's fast.
Why not use these plugins for an AVS script ? Especially the avlib-1.vdplugin which must manage the MOV Apple.

I test again FFMS2 WITHOUT indexing. But I have not done all the tests yet. FFMS2 is probably the closest to the FFMPEG decoders.

Thanks again for your advice. Merci.

Without more context, "breakpoint" could mean anything. Better to report this to whoever could debug LSMASHVideoSource.

I actually do not update FFMPEG too often (last time somewhere before they announced WinXP end of life).
There is no clean way to index files with ffmpeg: my plugin does some guesswork which fails here and there. FFMS2 does something similar but is backed by much more experience.
In theory is is possible to use "vd input" in avisynth for convenience, but I don't have enough time/passion to implement this.

poisondeathray
10th September 2018, 16:17
It probably has more to do with your source


IsTruncated : Yes


This indicates file was not complete or cut incorrectly

Groucho2004
10th September 2018, 16:23
I will continue with FFMS2 or FFMS2000 that manage to decode this MOV Clip.You might still want to try DSS2Mod. LAV Filters are pretty mature and you can offload decoding to the GPU.

GillesH
10th September 2018, 16:24
Hi Shekh,
Congratulations for this VirtualDub2.
We will calmly wait for your passion and your time to have this future "vd input".

For the moment, FFMS2 seems to be suitable. Except for slow start.

All my encouragement for VirtualDub2.

GillesH
10th September 2018, 16:36
Hi poisondeathray,
This clip was given to me for testing. It is possible that it has a defect.
But why VirtualDub2 or FFMS2 in an AVS script manage to open it very well.
Impossible with LSMASH.

poisondeathray
10th September 2018, 16:47
Hi poisondeathray,
This clip was given to me for testing. It is possible that it has a defect.
But why VirtualDub2 or FFMS2 in an AVS script manage to open it very well.
Impossible with LSMASH.

Did you examine the frames for errors ? It might have to do with error correction handling

For lsmash, you can try threads=1, seek_mode=2 and/or changing the seek threshold

seek_mode=2 is aggressive setting and will return last good frame when errors occur

kolak
15th September 2018, 19:21
New RAW format which could be possibly added in in Vdub2.

https://www.blackmagicdesign.com/products/blackmagicursaminipro/blackmagicraw

link to SDK at the bottom. SDK provides everything including debayering.
Can RAW pixels bee accessed through it if wanted?

Sample are also in the link. It uses .braw, but in reality it's MOV container.

shekh
15th September 2018, 20:14
New RAW format which could be possibly added in in Vdub2.

https://www.blackmagicdesign.com/products/blackmagicursaminipro/blackmagicraw

link to SDK at the bottom. SDK provides everything including debayering.
Can RAW pixels bee accessed through it if wanted?

Sample are also in the link. It uses .braw, but in reality it's MOV container.

Interesting. This sounds like full competitor to cineform raw but it is not even mentioned on the page.

shekh
15th September 2018, 20:53
> Can RAW pixels bee accessed through it if wanted?

Just looked through the sdk: it is not very verbose. From what I understood they do not wrap traditional RGGB data at all, so maybe there is no way to interface with related tools/formats.

kolak
15th September 2018, 22:27
It's sort of Cineform competition, but only for RAW.
It's purely RAW codec at least atm. It's also used strictly by BlackMagic. No idea if they will allow for 3rd party recorders to implement it.

They say that some partial debayering is done in camera- so this may be true that data is not anymore typical RAW.
I would like to see this "pseudo RAW" data, how it differs to "real" RAW.

Is it easy to add to Vdub2 or lots of work?

shekh
15th September 2018, 23:27
It looks very easy to add as decoder.
But I don't see any mention of something raw. The minimum decoding is from compressed to RGB and includes some processing which can be controlled (like applying curves, white balance etc).
The mention of partial debayering is quite vague. Just a guess: it means it is actually demosaiced to planar rgb and then compressed (wavelet?), so the rawest raw you can get from it is some rgb.
This sdk is called "beta 1", quite possible things may change.

kolak
16th September 2018, 00:05
It's new, but won't change much.
They can't do full debayering as bitrates are to low.
All descriptions are based on RAW uncompressed as reference. This format is made to replace CinemaDNG RAW (if you know it). It's just developed, so should be decent. CPU/GPU support with CUDA, Metal and OpenCL (also all OSes).

Yes- there is processing possible and you can write simple JSON file which controls it (if you download sample you will see it). It's almost like Cinefrom active metadata, but more limited. It's possible to have different values for different timecodes with frame accuracy.

If there is no access to "RAW" data then we can't see what it exactly is, but this is not that important. If we could decode it then this would be great. They have simple player, but only for Mac atm. Other tool which supports it is Resolve.

You an read about it more here:
https://forum.blackmagicdesign.com/viewtopic.php?f=2&t=79208

It's just new RAW format for BlackMagic cameras. I will make sure BM users know Vdub2 supports it- 1st 3rd party tool :) And it will allow to create h264 preview files directly from RAW.

StainlessS
21st September 2018, 16:00
Mod or option request:-

Could it be possible to have "Run Video Analysis Pass" return when done, on last frame, rather than original start frame,
I always have avoided that function in VDub, as I might want to see accumulated metrics (in AVS) for final frame.

Cheers.

shekh
22nd September 2018, 22:17
New build out.


Could it be possible to have "Run Video Analysis Pass" return when done, on last frame, rather than original start frame,
I always have avoided that function in VDub, as I might want to see accumulated metrics (in AVS) for final frame.

Cheers.

Don't know good reason to protect selected frame, so changed this permanently (no option).


A seek jump has always been 50 frames, that is Alt+Left/Right jumps 50 frames at a time. Is it possible to support different units? Eg. sometimes I want to jump 50 frames, but sometimes I want 2000 at a time...


I added new options to Preferences->Timeline
Also may be useful: in "Go to frame" dialog I can enter offsets. For example, type +5 to move 5 frames forward or -1 to move backward.

Minor bug? When reloading (with F2) an Avisynth script which is now longer than before, a white mark appears on the timeline...


fixed

I have another problem with the capture mode. My Logitech webcam has an "exposure" parameter, but it's not showing up in the "levels" window. Can you also map this parameter to the window?

I have added these parameters but it seems there is a lot of inconsistency (on drivers level?). However, since there is no harm if you don't touch the parameters, I decided to keep it.


One thing that will be nice if possible without much coding work will be to set the auto-size of panels for each one individually, for example, having the output panel maximized at his maximum display capacity while the input panel is at 25% and having this setting remembered from one session to another, saving this as a kind of template...


fixed
The first (left) pane can be set to fixed zoom, the other can still autosize. And this is saved.

wonkey_monkey
22nd September 2018, 23:03
Excellent work, thanks shekh!

I know it's been mentioned before, but I think an option to change the background colour of the window would be really useful. I also think a borderless/centered pane option would be great - it can be really useful, and much easier on the eye, to have a large surrounding area of a solid colour, rather than have the video up against the top left corner and surrounded by a 3D border.

I made a couple of mock-ups:

https://imgur.com/a/N4BaiR9

Direct links:

1. Current (https://i.imgur.com/Wky4vWQ.png)
2. Centered, borderless (https://i.imgur.com/zLvULsP.png)
3. Centered, borderless. custom background colour (https://i.imgur.com/74RUNUD.png)

Tell me you don't find #3 just a little bit sexy...

StainlessS
23rd September 2018, 02:43
Don't know good reason to protect selected frame, so changed this permanently (no option).
Fantastic, thanks muchley, just checked it out, works great.

Excellent work, thanks shekh!
+1 on that :)

shekh
23rd September 2018, 14:15
3. Centered, borderless. custom background colour (https://i.imgur.com/74RUNUD.png)

Tell me you don't find #3 just a little bit sexy...

Mock looks good, I will think :)

imhh11
25th September 2018, 19:49
which one is better ?

MagicYUV or Cineform?

cineform compress a lot more but how is the quality compared to magicYUV and uncompressed ?

shekh
25th September 2018, 20:17
which one is better ?

MagicYUV or Cineform?

cineform compress a lot more but how is the quality compared to magicYUV and uncompressed ?

It seems there better places to compare codecs but at least what do you need it for in VD2?

imhh11
25th September 2018, 20:24
V210 capture

LigH
25th September 2018, 20:59
If any codec compresses "a lot better than" a lossless codec, then it is probably lossy. All lossless codecs will have a similar strength, and compared to uncompressed video with the same color space and depth, the ratio is hardly better than 1:5 in optimal cases, rather around 1:2.5 to 1:3.

The Ut Video Codec Suite is also very efficient and very versatile, supports many sample formats.

shekh
25th September 2018, 21:06
V210 capture

humble suggestions:
If you don't need lossless for some sensitive restoration, you can use near-lossless (cineform)

Also if you have enough cpu power, maybe you can get even better storage-quality ratio using x264-10bit (enable zerolatency)

WorBry
28th September 2018, 14:11
which one is better ?

MagicYUV or Cineform?

cineform compress a lot more but how is the quality compared to magicYUV and uncompressed ?

I've never used VDub(2) for capture per se, but based on my experience transcoding uncompressed 10-bit 422 sources I'm confident that Cineform at 'Film Scan 2' quality would be way, way beyond 'visually lossless' and very close to arithmetically lossless.

What are you planning to do with your captures btw? IMHO, far more important is the compatibility of the capture format with the video systems you use, or are intending to use for subsequent processing. Does the import interface preserve high-bit depth transfer, assuming said system does support high bit depth processing? How does the system handle luminance ranges on import with that particular format - very important to determine the behavior, especially if the system does not have native (SDK implementation) Cineform support ? Process performance in/through said system ? And can you export in the same format, if that is desirable - in which case similar considerations apply with respect to bit-depth transfer and luminance handling at export?

My two cents.

imhh11
29th September 2018, 19:05
thank you guys!!!

I don't think I see a difference in quality between the 2 codecs. Maybe when I zoom in, I can see that magicyuv is slightly better. So Cineform compression should be enough for me.

MagicYUV(766mbps) Vs Cineform(332mbps)
http://screenshotcomparison.com/comparison.php?id=116034

MagicYUV(766mbps) Vs Cineform(183mbps)
http://screenshotcomparison.com/comparison.php?id=116035

once encoded to hevc 25mbps:
http://screenshotcomparison.com/comparison.php?id=116040

shekh
29th September 2018, 19:49
once encoded to hevc 25mbps:
http://screenshotcomparison.com/comparison.php?id=116040

There is small color difference, probably different matrix at some step (709 vs 601). Something to be aware of.

WorBry
29th September 2018, 20:28
MagicYUV(766mbps) Vs Cineform(332mbps)
http://screenshotcomparison.com/comparison.php?id=116034

MagicYUV(766mbps) Vs Cineform(183mbps)
http://screenshotcomparison.com/comparison.php?id=116035


Out of interest, what Cineform quality settings did you use in the two shots ?

imhh11
30th September 2018, 01:03
There is small color difference, probably different matrix at some step (709 vs 601). Something to be aware of.

strange both were encoded x265 with the same setting in HDR BT2020 (DCI-P3).

after comparing with the source (untouched), the colors match magicyuv and cineform is slightly different. I wonder why, both are 422 10bit v210 capture of the same file.

Out of interest, what Cineform quality settings did you use in the two shots ?

film scan 1 & 3 but I'm not sure, I did the comparison a couple months ago and wanted the opinion of the doom9 experts :P

imhh11
30th September 2018, 02:54
Also, sorry if its a stupid question but could it be possible to add NVenc to Vdub ? my cpu can handle x264 encoding while capturing but at very fast or worse preset only and im mostly interested in HEVC for HDR.
of course my cpu cannot handle x265 in vdub but encoding h265 with nvidia should be fast enough ? or is it already possible and i dont know about it ?

sneaker_ger
30th September 2018, 09:52
You can use the "External Encoders" (see VirtualDub help) feature of VirtualDub (both vanilla as well as VirtualDub2) to use NVEnc (https://github.com/rigaya/NVEnc/releases) while doing "normal" encodes. For capturing I think there is no solution for VirtualDub, currently.

shekh
30th September 2018, 11:48
NVenc: there is no way for capture now, and not coming soon.

WorBry
30th September 2018, 17:26
...both were encoded x265 with the same setting in HDR BT2020 (DCI-P3).

Ah, OK, so these are HDR captures ? I was hesitant about mentioning your shots looked rather underexposed ;)


film scan 1 & 3 but I'm not sure.

Filmscan 3 is way overkill. It's a 'special' mode that is not available with the (GoPro) Cineform VFW codec and, to my knowledge, in other native implementations of the Cineform SDK:

https://forum.doom9.org/showpost.php?p=1826874&postcount=45

imhh11
30th September 2018, 17:58
Ah, OK, so these are HDR captures ? I was hesitant about mentioning your shots looked rather underexposed ;)



Filmscan 3 is way overkill. It's a 'special' mode that is not available with the (GoPro) Cineform VFW codec and, to my knowledge, in other native implementations of the Cineform SDK:

https://forum.doom9.org/showpost.php?p=1826874&postcount=45



yes HDR capture :) colors are triggered at x265 encoding. I captured a UHD-BD just to make sure I get proper colors/hdr etc.. now that I know that magicyuv works (at least when I compare 2 frames tone mapped with madvr), i can now capture my games in high-quality 4K HDR properly. Too bad cineform slightly change the colors, it would have saved tons of space(only have 1tb of capture space).

thanks for the filmscan 3 explanation, I didn't know that.

*sorry for my english

WorBry
30th September 2018, 19:31
yes HDR capture :) colors are triggered at x265 encoding..... Too bad cineform slightly change the colors, it would have saved tons of space(only have 1tb of capture space)

I've no experience in that domain. Maybe others can help. It's surely color matrix related.

shekh
30th September 2018, 19:56
I doubt it is cineform that is guilty in this case. What software was used to do the encode to x265? Because you said it is encoded with DCI-P3 I assume there was (different) color conversion. How it is possible:
1) magicyuv+avi has no metadata at all -> everything default.
2) cineform+avi has some metadata -> replaces defaults (not same).
Just guessing.

imhh11
30th September 2018, 23:18
ok, I did another comparison because the other one was 3 months old so maybe I did something wrong. This time, I don't see a difference in the colors, can you?

MagicYUV RAW VS Cineform RAW filmscan 2
http://screenshotcomparison.com/comparison/121674

once encoded with exactly the same setting/ software: x265 Staxrip the GUI (source is dci-p3, encode is dci-p3) :

MagicYUV VS Cineform
http://screenshotcomparison.com/comparison/121673

MagicYUV VS Source
http://screenshotcomparison.com/comparison/121672

Cineform Vs Source
http://screenshotcomparison.com/comparison/121671



x265 2.8+19-bcdc610cf5f0:[Windows][MSVC 1914][64 bit] 10bit
/ wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=723 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=24 / keyint=240 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=25 / lookahead-slices=4 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / no-strong-intra-smoothing / max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=3:3 / no-sao / no-sao-non-deblock / rd=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=22000 / qcomp=0.70 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei


here's the files:
https://uptobox.com/vs384dq3ssci

Format : CineForm
Codec ID : CFHD
Codec ID/Info : CineForm 10-bit Visually Perfect HD (Wavelet)
Duration : 30 s 989 ms
Bit rate : 426 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Scan type : Progressive
Bits/(Pixel*Frame) : 2.144
Stream size : 1.54 GiB (100%)


Format : M0Y2
Codec ID : M0Y2
Duration : 31 s 490 ms
Bit rate : 870 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Bits/(Pixel*Frame) : 4.373
Stream size : 3.19 GiB (100%)

shekh
30th September 2018, 23:37
ok
ps. I don't get it, you ask which codec, and then show test which is 3 months old. Why :)
Out of curiosity, what hw you use for capture? From which source?

imhh11
1st October 2018, 00:24
ok
ps. I don't get it, you ask which codec, and then show test which is 3 months old. Why :)
Out of curiosity, what hw you use for capture? From which source?

as I said, I wanted to know the opinion of the doom9 expert and i have been busy lately so i didnt really use my card since i got it 3 months ago but now im back at it... sorry for posting my first test.

I'm using a decklink black magic card and the source is a UHD-BD played with my HTPC, my uhd player or my media player, it doesn't matter. the results are all the same. this one was done with the Nvidia shield (USB).

WorBry
1st October 2018, 03:56
I'm using a decklink black magic card...

I see FFMPEG supports capture over BMD Decklink:

https://trac.ffmpeg.org/wiki/Capture/Blackmagic

Maybe worth looking into as an alternative if you are familiar with FFMPEG. I don't know how feasible it would be to capture and encode to x265, tone mapping included, as a single command operation. You'd have to research the subject and test.

You could certainly do it with FFMPEG as a two stage process - capturing first to a 10-bit YUV422 'near lossless' intermediate, like DNxHR HQX. But I can't see that would offer any particular advantage over your existing two step process - I'd stick with VDub2 capture to Cineform (Filmscan 2) if that works for you. Just bear in mind that the resulting bitrates (and so file sizes) of your Cineform captures will be somewhat dependent on the complexity of the video content. But the same applies to lossless formats, like MagicYUV, also.

poisondeathray
1st October 2018, 05:07
I think there are some issues, at least with screenshots provided in post 639 . I made sure to save them and verified them by size. I didn't look at the "RAW" versions, just the others

The biggest easy one to see is the bottom of the blue dress . Look at the texture loss at the bottom in both magicyuv and cineform compared to the source. The noise and grain pattern is smoothed over .

There are some color sampling issues too . Look at the small yellow flower spots. Some of the smaller ones almost disappear in some spots in the cineform screenshot . The source has more "orange" spots, but they become yellow and more desaturated . Even the magicyuv screenshot is affected (albeit less)

I think there is an issue with that capture setup , and or method of taking screenshots

EDIT: or did I misunderstand ? Those were re-encoded x265 screenshots ? So those were caused by x265 ? That would make more sense

imhh11
1st October 2018, 12:11
the smoothing on grain is definitely coming from the x265 encoder even if I used --no-soa and --no-strong-intra-smoothing
thanks for pointing out the yellow flowers, I didn't notice it. I'll have to investigate what's causing this, I don't think this is an encoding issue.

screenshots were made the same way with madvr hdr to sdr pixels shader (200nits) so this is not the issue but just to be sure, I'll try to encode the source with the same setting.
I'll also try to capture uncompressed to see if it changes anything.

poisondeathray
1st October 2018, 16:16
You re-encoded it to 10bit 4:2:0 right? So you would expect some color loss going from 4:2:2 to 4:2:0 , so that could be within expected limits

But then again, the original, original, was UHD BD right? UHD 4:2:0 ? So there might be a problem...

imhh11
1st October 2018, 16:44
yes, the source is 10bits 4:2:0, shied played it in 12bit 4:2:2, capture is 10bits 4:2:2 and encode is 10bits 4:2:0.

how come it changes only the colors of those yellow flowers and not the other colors? and how come cineform is worse?
i'll test uncompressed later today.

poisondeathray
1st October 2018, 16:51
yes, the source is 10bits 4:2:0, shied played it in 12bit 4:2:2, capture is 10bits 4:2:2 and encode is 10bits 4:2:0.

how come it changes only the colors of those yellow flowers and not the other colors? and how come cineform is worse?
i'll test uncompressed later today.

I don't know, but it's unexpected.

And you'd expected cineform to be very slightly worse, but there are more differences there than I would expect

Revan654
1st October 2018, 18:27
NVenc: there is no way for capture now, and not coming soon.

FYI, That SDK I gave you awhile back had source code showing how to add NVenc.

-----

Any Progress on adding BT.2020 / ST.2084? It's been about a year since I last asked, Maybe you made some progress in that area or adding HDR to capture mode.

Also any chance we will see more functions added to x265 codecs (Like the VUI & Bitstream) areas?

Revan654
1st October 2018, 18:58
I see FFMPEG supports capture over BMD Decklink:

https://trac.ffmpeg.org/wiki/Capture/Blackmagic

Maybe worth looking into as an alternative if you are familiar with FFMPEG. I don't know how feasible it would be to capture and encode to x265, tone mapping included, as a single command operation. You'd have to research the subject and test.



x265 by it self is very doable(CPU Only), I've done it on my Skylake CPU(Quad Core).

I used the following Codec, Which works in VD2(It's like the x264 Codec): https://sourceforge.net/projects/mpxplay/files/x265vfw/x265vfw_v280/

As for FFMPEG, It's kind of doable from what I understand, but you are likely to run into Framedrops due to the Tonemapping + x265 at the same time. It would be very useful to split it up the process on multiple GPU's. One GPU handles all the tonemapping and the other deals with compression. Not sure if FFMPEG support multiple process on different devices.

There are other Standalone Software that Supports Blackmagic like Adobe and Vegas. Along with there own DaVinci Resolve. If all else fails you could try those.

If External encoding is ever added to VD2 Capture mode. Allot more doors would open. You could pipe data through to other encoders.

I know it was said it was possible but, not sure if any kind of development has been done for that.

If I was familiar with C# I would help out the dev on VD2.

as I said, I wanted to know the opinion of the doom9 expert and i have been busy lately so i didnt really use my card since i got it 3 months ago but now im back at it... sorry for posting my first test.

I'm using a decklink black magic card and the source is a UHD-BD played with my HTPC, my uhd player or my media player, it doesn't matter. the results are all the same. this one was done with the Nvidia shield (USB).

Blackmagic is famous for having buggy drivers and some of there devices are at the high end when comparing them to similar products. You do get full support of all there software and 3rd Support, Which is likely why the price is much higher.

The buggy Drivers is one of the reason why I avoided them when I upgraded my Capture System. Plus at the time starting price for the card was 1500 dollars vs another company(Exactly same features) for 800 dollars.

There Win7 drivers for Intensity series is a mess.

kolak
1st October 2018, 21:30
Yep, BM is not very reliable- not the best hardware (eg. poor fans, electronics) and more important terrible drivers which keep breaking things every release.
AJA is miles better.

Revan654
1st October 2018, 22:59
Yep, BM is not very reliable- not the best hardware (eg. poor fans, electronics) and more important terrible drivers which keep breaking things every release.
AJA is miles better.

You also have to read the specs very carefully, Some of the wording can be very misleading at times. The BD Decklink for HDR 4K + 60fps. The colorspace only goes up to BT.709. There 8K model however does reach BT.2020 but it doesn't have any HDMI.

I went with Magewell for my Setup, Since they were the only ones I could find that supported Fully Rec.2020 and Had allot of hardware Functions that are missing in others.

Base Functions can reach 12 Bits as well with full 7.1 Audio. If your PC can handle it 144FPS recording.

imhh11
2nd October 2018, 01:30
ok so after a couple more tests, I cannot get the same colors as the source with those small yellow/orange flowers. Magicyuv, cineform, uncompressed, other players, MediaExpress: all the same. it's not an encoding issue because encoding the source directly with the same settings output proper colors
so unless im doing something wrong in Vdub (doubt it), i guess it's because the decklink mini 4k cannot do Bt2020 even if they say it can on the box. smh

https://extraimage.net/images/2018/10/02/49b9702c45733da97ec0af752c770135.png

WorBry
2nd October 2018, 02:54
Dumb question (maybe)...but what was the reported colorspace of the Cineform and MagicYUV captures? You didn't include that portion of information from the MediaInfo report. And your file uploaded didn't include samples of the original captures.


here's the files:
https://uptobox.com/vs384dq3ssci

Format : CineForm
Codec ID : CFHD
Codec ID/Info : CineForm 10-bit Visually Perfect HD (Wavelet)
Duration : 30 s 989 ms
Bit rate : 426 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Scan type : Progressive
Bits/(Pixel*Frame) : 2.144
Stream size : 1.54 GiB (100%)


Format : M0Y2
Codec ID : M0Y2
Duration : 31 s 490 ms
Bit rate : 870 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Bits/(Pixel*Frame) : 4.373
Stream size : 3.19 GiB (100%)

My (maybe dumb) point being, even if decklink does output Rec2020, surely the10-bit 422 Cineform and MagicYUV captures are assuming and encoding as Rec709 ? I don't see any configuration setting for Rec2020 color-space input in my copy of MagicYUV (2.0.0 Ultimate)

poisondeathray
2nd October 2018, 02:58
ok so after a couple more tests, I cannot get the same colors as the source with those small yellow/orange flowers. Magicyuv, cineform, uncompressed, other players, MediaExpress: all the same. it's not an encoding issue because encoding the source directly with the same settings output proper colors
so unless im doing something wrong in Vdub (doubt it), i guess it's because the decklink mini 4k cannot do Bt2020 even if they say it can on the box. smh


Did you check x265 with lower crf or lossless ?

Because I suspect lack of Rec.2020 support won't cause those types of issues you're referring to . It looks more like a chroma subsampling or lossy CbCr (high quantization) issue in the screenshots (but that could just as easy be from x265). Take a look at the Cb or Cr plane (granted, I'm looking at an 8bit PNG, but you can see right away the problems) , you will see general blurriness and encoding artifacts . Small color details like those small flowers will be blurred away

eg.
#Your PNG
ConvertToYV24()
UtoY # or VtoY

So check lower crf or lossless x265 first, if problem still there go back 1 more step and look at direct capture (e.g magicyuv)

imhh11
2nd October 2018, 03:08
Dumb question (maybe)...but what was the reported colorspace of the Cineform and MagicYUV captures? You didn't include that portion of information from the MediaInfo report. And your file uploaded didn't include samples of the original captures.



My (maybe dumb) point being, even if decklink does output Rec2020, surely the10-bit 422 Cineform and MagicYUV captures are assuming and encoding as Rec709 ?

that was all the information from the MediaInfo, there is nothing more. But when I play the file madvr is saying/guessing bt709, perhaps because the flag is not there. magicyuv is reporting rec709 as well.

Capturing uncompressed in Mediaexpress gave the same result.

if I make an mkv with the avi file, mediainfo report more but still nothing on bt709 /bt2020

Video
ID : 1
Format : V_MS/VFW/FOURCC / M0Y2
Codec ID : V_MS/VFW/FOURCC / M0Y2
Duration : 1 s 710 ms
Bit rate : 398 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) FPS
Bits/(Pixel*Frame) : 2.002
Stream size : 81.2 MiB (100%)
Default : Yes
Forced : No


https://extraimage.net/images/2018/10/02/947b88a573e520bdd5a6f59c093eac87.png



Did you check x265 with lower crf or lossless ?

Because I suspect lack of Rec.2020 support won't cause those types of issues you're referring to . It looks more like a chroma subsampling or lossy CbCr (high quantization) issue in the screenshots (but that could just as easy be from x265). Take a look at the Cb or Cr plane (granted, I'm looking at an 8bit PNG, but you can see right away the problems) , you will see general blurriness and encoding artifacts . Small color details like those small flowers will be blurred away

eg.
#Your PNG
ConvertToYV24()
UtoY # or VtoY

So check lower crf or lossless x265 first, if problem still there go back 1 more step and look at direct capture (e.g magicyuv)

the encode were CRF17 slow. but thats a good idea, i'll try lossless. thanks

when i encoded the source with the same setting CRF17 slow.. the colors stay perfect

poisondeathray
2nd October 2018, 03:16
when i encoded the source with the same setting CRF17 slow.. the colors stay perfect

Right, but look at the U, V planes . It show more damage than up/down scaling only

4:2:0 => 4:2:2 => 4:2:0 . You would expect some blurring if they were not using nearest neighbor (aka point resize in avisynth) , so very small color details will be expected to be blurred. But you have compression artifacts on top as well. Encoding source bypasses that up/down scaling step

But it still looks like something additional is going on too

imhh11
2nd October 2018, 03:22
ok, i'll try the lossless x265 tomorrow.
I might have something wrong with my pc. if nothing work, maybe a fresh windows installation would fix my issue.

WorBry
2nd October 2018, 05:30
that was all the information from the MediaInfo, there is nothing more.

Ah, yes you're right, MediaInfo doesn't report the color matrix/primaries. Vdub2 will report the Cineform capture as Rec709 though.

shekh
2nd October 2018, 12:38
Any Progress on adding BT.2020 / ST.2084? It's been about a year since I last asked, Maybe you made some progress in that area or adding HDR to capture mode.

Also any chance we will see more functions added to x265 codecs (Like the VUI & Bitstream) areas?

A lot of code around formats was cleaned, new colorspaces are more possible now.

x265: which options will be game changing? I reviewed the list and honestly all remaining options look too low level (do not fit simple UI).

imhh11
3rd October 2018, 00:45
Did you check x265 with lower crf or lossless ?


So check lower crf or lossless x265 first, if problem still there go back 1 more step and look at direct capture (e.g magicyuv)

Hi, I tried CRF0 very slow preset and the blurring on grain is less worse but the little flowers are still washed out.


tone mapped
http://screenshotcomparison.com/comparison/121830


I tried re-installing the BM drivers, no luck :(

maybe its the best my card can do.


magic yuv 422 8 bit HDYC capture VS source ----> no issue at all ?? how the hell..
http://screenshotcomparison.com/comparison/121857

Revan654
5th October 2018, 17:19
A lot of code around formats was cleaned, new colorspaces are more possible now.

x265: which options will be game changing? I reviewed the list and honestly all remaining options look too low level (do not fit simple UI).

All Flags needed for creating HDR in x265.

--output-depth 10
--colorprim bt2020
--colormatrix bt2020nc
--transfer smpte2084
--master-display G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)
--hrd
--aud
--repeat-headers
--max-cll 1000,180
--no-open-gop

+ no-intro-smoothing & no-deblocking so the details don't get destroyed.

Maybe allow a custom inputbox (like StaxRip & handBrake does) or port over(Since it already has VirtualDub features):

https://sourceforge.net/projects/mpxplay/files/x265vfw/x265vfw_v280/

Revan654
5th October 2018, 17:30
ok so after a couple more tests, I cannot get the same colors as the source with those small yellow/orange flowers. Magicyuv, cineform, uncompressed, other players, MediaExpress: all the same. it's not an encoding issue because encoding the source directly with the same settings output proper colors
so unless im doing something wrong in Vdub (doubt it), i guess it's because the decklink mini 4k cannot do Bt2020 even if they say it can on the box. smh



I doubt you can capture 1:1, If that's what your trying to do. I havn't been following the thread.

I know in my capture settings, there a box that says Colorspace: 2020.

I also have a device that gives me exact readout going into capture so I know extactly what the colorspace is when it hits the capture box.

https://pbs.twimg.com/media/Dcnv2vpVQAEUBC0.jpg
https://pbs.twimg.com/media/Dcnv2wwU8AAyp0g.jpg


There products are very misleading at times, or give you bad information.

Rep: Out product included HDR from the very start(From Launch).

Driver Update: Product now includes HDR support(About year+ after the Product was Launched).

shekh
5th October 2018, 18:08
All Flags needed for creating HDR in x265.

--output-depth 10
--colorprim bt2020
--colormatrix bt2020nc
--transfer smpte2084
--master-display G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)
--hrd
--aud
--repeat-headers
--max-cll 1000,180
--no-open-gop

+ no-intro-smoothing & no-deblocking so the details don't get destroyed.

Maybe allow a custom inputbox (like StaxRip & handBrake does) or port over(Since it already has VirtualDub features):

https://sourceforge.net/projects/mpxplay/files/x265vfw/x265vfw_v280/

--output-depth 10
This does not need to be specified.

--hrd
"The HRD parameters are carried by the Buffering Period SEI messages and Picture Timing SEI messages"
--aud
"Emit an access unit delimiter NAL at the start of each slice access unit."

Can you briefly describe what the hell is this in human language :)

--repeat-headers
afaik this is solely controlled by container and should not be changed.

--no-strong-intra-smoothing
--no-deblock
Simple options which can be added trivially.

Well, inputbox can help with all options but with it comes laborious error checking. Since command line can be wrong in many ways.

imhh11
5th October 2018, 22:38
I doubt you can capture 1:1, If that's what your trying to do. I havn't been following the thread.

I know in my capture settings, there a box that says Colorspace: 2020.

I also have a device that gives me exact readout going into capture so I know extactly what the colorspace is when it hits the capture box.

There products are very misleading at times, or give you bad information.

Rep: Out product included HDR from the very start(From Launch).

Driver Update: Product now includes HDR support(About year+ after the Product was Launched).



Hi, I have the Vertex as well :) so nothing is wrong with my HDR metadata.

But you are right, it seems I cannot get a 1:1 copy. it's very close and acceptable to me but not perfect.

http://screenshotcomparison.com/comparison/117314

https://extraimage.net/images/2018/10/05/21f915c50a9223e1eb16a57745acd095.png


Driver Update: Product now includes HDR support(About year+ after the Product was Launched).
I think this was for Davinci Resolve hdr playback. Anyway, this drivers and the latest one don't even work with Vdub.

Revan654
7th October 2018, 23:15
--output-depth 10
This does not need to be specified.

--hrd
"The HRD parameters are carried by the Buffering Period SEI messages and Picture Timing SEI messages"
--aud
"Emit an access unit delimiter NAL at the start of each slice access unit."

Can you briefly describe what the hell is this in human language :)

--repeat-headers
afaik this is solely controlled by container and should not be changed.

--no-strong-intra-smoothing
--no-deblock
Simple options which can be added trivially.

Well, inputbox can help with all options but with it comes laborious error checking. Since command line can be wrong in many ways.

If the encoder uses multilib --output-depth 10 does need to be declared. By default 8Bit is enabled.

Link: https://www.mysterybox.us/blog/2016/10/27/hdr-video-part-5-grading-mastering-and-delivering-hdr

They go into detail about the different options when grading HDR and encoding. Jump down to middle of the page, They use Hybrid for Final Process.

If the command line is wrong, in FFMPEG or x265 it should catch the error and report what error is(It shouldn't crash the software in most cases).

Atlease have VD2 catch the error and report it in a form of a msgbox error or something or have it pass some kind of check.

videoh
12th October 2018, 19:07
That's fine. I will keep NOT using your mod, even though it is better than the original VirtualDub.

</END_OF_DISCUSSION> Triggered snowflake alert!

wonkey_monkey
15th October 2018, 20:46
If I haven't loaded VirtualDub for a while (I think it used to do this on pre-fork versions too) it takes a while to load - 5-10 seconds. After that, subsequent instances load up instantly. Any idea why this is? Is it enumerating something?

LigH
15th October 2018, 20:52
Windows DLL caching? VfW codecs are DLL's, they will probably be enumerated; not sure when, though (startup or calling compression dialog).

shekh
16th October 2018, 10:04
Never paid attention to this. VD itself does not do anything heavy at startup, it must be somewhere in Windows. Maybe something involving swap file or something worse.

LigH
16th October 2018, 10:46
Yes, as already mentioned: the "Windows DLL Cache" and "Prefetch" folders as possible factors, and even delayed DLL unloading (keeping a DLL resident in the RAM even after it could be unloaded, until RAM is required to be swapped).

Groucho2004
16th October 2018, 12:09
Another possibility - Hard drive taking a moment to wake up from sleep mode.

I just got a couple of WD Gold drives which fall asleep after a few minutes without activity.

WorBry
16th October 2018, 18:31
@Shekh,

Question about YUV444 <-> YUV422 inter-conversion in VDub2.

I've been involved in some studies over on the BlackMagic Design DaVinci Resolve forum. There was concern about the degree of chroma loss seen when Uncompressed 10bit 422 sources are serially 'passed through' (i.e. no transforms applied) Resolve, which pointed to sub-optimal YUV422 chroma-sub-sampling. As you probably know Resolve uses it's own proprietary 'DaVinci YRGB' color-science for processing - the inner workings (algorithms) of which are not publicly known and one can only speculate based on observed behavior.

One of the forum members uploaded a couple of test clips that have proved very useful in gaining more insight. The 1080p clips (created with Natron) have a two-color checkerboard pattern. The size of the checkerboard blocks are exactly 5px wide/high, such that every second border will be placed in the middle of a color sub-sampled region. Here's a more complete explanation and the download links for the test clips - one ('Checker-444') in ProRes_4444 format and the other ('Checker'-422) in ProRes HQ (10bit 422) format:

https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=79163#p440425

I also have uncompressed v410 and v210 versions.

What has come to light is that when the Checker-422 (v210) is cycled through v410 in VDub2 (by which I mean encoding to v410 and then reconverting the export to v210) the pattern of results (as revealed by the Resolve Histogram and Parade scope profiles) is identical to that obtained when the 'Checker-422' clip is serially 'passed-through' Resolve.

https://imgur.com/nfUcnE4
https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=79163&start=50#p446976

Which suggests that they use the same chroma up-sampling and sub-sampling algorithms.

Sony (Magix) Vegas Pro 16 however appears to manage 422 chroma sub-sampling in a different way and one that, at face value, produces the more desirable outcome.

https://imgur.com/fCw4TvI

Could you shed some light on the specific algorithms used in VDub2 when inter-converting 10bit YUV-444 <-> YUV-422.

Thanks.

poisondeathray
16th October 2018, 19:55
@WorBry - if you have serially changing each generation , it suggests some interpolation going on, probably bicubic. If you have blocky sharp color borders and preserved same up/down over each generation, it can only be nearest neighbor . You can verify this by controlling the algorithm in say vapoursynth or avisynth or ffmpeg , export either v210 or v410 and check . You can check the RGB conversion algorithm this way too

"desireable" is debatable and depends on the situation - what looks good on a test pattern might not look so good on real material .

shekh
16th October 2018, 20:27
Checked what is going on with chroma,
444 -> 422: each pixel is convolved with kernel 0.25, 0.5, 0.25
As I understand this creates some blurring.

422 -> 444: odd pixel is copied as is, even pixel is blended from two neighbor source pixels
This is simple.

https://i.postimg.cc/gJ7VB4QS/checker422.png

WorBry
17th October 2018, 03:59
OK, thanks both. So, if I understand correctly, its 'nearest neighbour' (point) up-sampling and it's the convolution averaged chroma sub-sampling that brings about the separation of the R/B and G channel plots on the Resolve Parade scope, which manifests as blur ?

http://i.imgur.com/BepuPGSm.png (https://imgur.com/BepuPGS)

Up-sampled in that example to r210, because Resolve wont import v410

I wonder then how Vegas Pro sub-samples 444 to 422 to achieve the outcome it does ?


"desireable" is debatable and depends on the situation - what looks good on a test pattern might not look so good on real material .

Which is fair point. Case in point - I freaked out when I saw the pattern of results produced when the 'original' Checker-444 (ProRes_4444) was exported to DNxHR_444 (10bit) in Resolve, and thought something must be wrong.

http://i.imgur.com/QJhw7E1m.png (https://imgur.com/QJhw7E1)

Only to discover that DNxHR_444 encoded with FFMPEG and DNxHD_444 exported from Avid Media Composer behaved the same way.

http://i.imgur.com/SBXKqWBm.png (https://imgur.com/SBXKqWB)

It was only after reading that DNxHR_444 encoding intentionally adds a small amount of blur to minimize aliasing/blocking that I came to terms with what looked like degradation on the scopes and checker pattern - reasonable explanation being the repeating 5x5 pixel checker pattern amplifies the blur. Still have some doubts that there is not more too it though.

poisondeathray
17th October 2018, 04:41
OK, thanks both. So, if I understand correctly, its 'nearest neighbour' (point) up-sampling and it's the convolution averaged chroma sub-sampling that brings about the separation of the R/B and G channel plots on the Resolve Parade scope, which manifests as blur ?


Nearest neighbor should not blur. And it should survive multiple generations . It's just duplicating the chroma samples when you go 422=>444 , dropping the exact same samples when you go 444=>422 . So it's a lossless transform if done properly, and you can do it infinite times. Any other algorithm will incur some loss each step, some rounding errors, some blurring which gets worse each successive iteration . But nearest neighbor does not necessarily look good on normal content (blocky color edges), in fact it's considered the worst usually for most types of content. But it's good for test patterns.

I haven't looked at those samples yet, but I'll take a closer look later


Case in point - I freaked out when I saw the pattern of results produced when the 'original' Checker-444 (ProRes_4444) was exported to DNxHR_444 (10bit) in Resolve, and thought something must be wrong.


Only to discover that DNxHR_444 encoded with FFMPEG and DNxHD_444 exported from Avid Media Composer behaved the same way.

No . There something wrong with those last screenshots. Looks like a serious DNxHR issue somewhere in the workflow . Looks like adding some noise or dither . That' s not normal

WorBry
17th October 2018, 05:11
Nearest neighbor should not blur
I was saying that it's the convolution averaged 444>422 sub-sampling that introduces some blur.

…..It's just duplicating the chroma samples when you go 422=>444 , dropping the exact same samples when you go 444=>422

Which is how it appears on the scopes and checker pattern in the above example where I converted the 'Checker-422' clip to r210 with VDub2.


So it's a lossless transform if done properly, and you can do it infinite times. Any other algorithm will incur some loss each step, some rounding errors, some blurring which gets worse each successive iteration . But nearest neighbor does not necessarily look good on normal content (blocky color edges), in fact it's considered the worst usually for most types of content. But it's good for test patterns.

Based on the above test series and Shekh's interpretation of the conversion modalities it appears that that is also how Resolve up-samples 422 to 444 on import. Nothing I can do to change that. Resolve processes in 32-bit float, as I'm sure you know.


No .There something wrong with those last screenshots. Looks like a serious DNxHR issue somewhere in the workflow . Looks like adding some noise or dither . That' s not normal

Which is disconcerting to say the least. I had been thinking about switching to DNxHR_444 as a (Resolve) export intermediate but this has turned me off again. Unfortunately ProRes is not an export option in Resolve on Windows.

If the issue is somewhere in the workflow, then where ? Those blotchy checker board patterns also occur when FFMPEG and Media Composer DNxHR/DNxHD 444 exports (mov and MXF) of the Checker-444 clip (ProRes_4444 and v410 versions) are imported into VDub2, so it can't be something happening in Resolve.

poisondeathray
17th October 2018, 05:16
Ahh you're starting with 444 and the pattern is 5x5 ... sorry I should have read more closely. I'll look into it more

But you also have to look at how you are upsampling and converting to RGB for the preview - that could be doing something too . There could be other issues with chroma center interpretation which can add additional issues. Ideally you would separate all the processes out



The DNxHR/DNxHD "noise" would make it unsuable IMO . That's a separate issue that needs investigating . For example, how does the avid export look when re-imported back into avid (using avid's own decoder) ? Since ffmpeg/avid/resolve all look bad in resolve, it might be as simple as a bad decoder version in resolve

And maybe this should be split off, because shekh answered the vdub2 specific questions

WorBry
17th October 2018, 06:27
Ahh you're starting with 444 and the pattern is 5x5 ... sorry I should have read more closely. I'll look into it more


In those 'round tripping' tests I was starting with 10bit 422 ('Checkers-422'), up-sampling to 10bit 444 and then down-sampling to 10bit 422 again. In the Resolve 'round-trip' series the 'Checkers-422' import was simply 'passed through' to v210 export. In Resolve, all imports get passed to 32-bit float 'DaVinci YRGB'. There is no Uncompressed YUV422 'by-pass' as occurs in Vegas Pro with 'Sony YUV' export when no transforms are applied.

In the DNxHR/DNxHD_444 export tests I was using the 'Checkers-444' clip as the input source.

The DNxHR/DNxHD "noise" would make it unsuable IMO . That's a separate issue that needs investigating . For example, how does the avid export look when re-imported back into avid (using avid's own decoder) ?

Unfortunately I didn't look at that when I ran the Media Composer trial - since uninstalled.


Since ffmpeg/avid/resolve all look bad in resolve, it might be as simple as a bad decoder version in resolve

I wondered about that too. But like I said, when the ffmpeg/avid/resolve DNxHR exports were loaded into VDub2 to examine the checker patterns (copy/pasted source frame to Paint.net to produce the magnified, cropped checker images) they all looked 'bad' also:

http://i.imgur.com/SBXKqWBm.png (https://imgur.com/SBXKqWB)


And maybe this should be split off, because shekh answered the vdub2 specific questions

Well it relates to VDub2 too if it is a wider decode issue, but if you wish maybe split-off to 'New and Alternative Codecs' section.

poisondeathray
17th October 2018, 07:32
Regarding previewing results - it matters how it's interpreted (in terms of chroma location), that makes a big difference , and the way it's upsampled to RGB , or the way you zoom for the screenshot (what algorithm). You can get completely different results appearance wise with the same video in a different application or player

Within resolve itself , if you were only to look at the histogram, you can get fewer spikes using nearest neighbor, chromaloc left
https://i.postimg.cc/1fqpmZyX/nearestneighbor-left.png (https://postimg.cc/1fqpmZyX)

Does it "look" better ? It really depends on what is used, and how it's interpreted, or what scenario you're using it for

I'll try to figure out what sony is using. I only have vegas 13, but it produced the same v210 as in your screenshot




That DNxHR result is completely unexpected and unacceptable. Something is up

And I'm getting similar results with Adobe's DNxHR/DNxHD implementation , also on encoding/decoding. It looks like some sort of DCT compression issues.

shekh
17th October 2018, 09:40
From the screenshot it seems Sony is using bilinear downsampling for 444->422, this blends max 2 neighbor pixels as opposed to summed area.
I changed various interpolation options until I got very similar picture.
For 442->444 it is still bilinear upsampling, no changes.
https://i.postimg.cc/zX4JT3bR/checker-2.png

WorBry
17th October 2018, 13:58
Thanks again Skekh,

Just to be clear about VDub2:

Checked what is going on with chroma,
444 -> 422: each pixel is convolved with kernel 0.25, 0.5, 0.25
As I understand this creates some blurring.

422 -> 444: odd pixel is copied as is, even pixel is blended from two neighbor source pixels
This is simple.


So is the 422 > 444 in VDub2 (by definition) Nearest Neighbor (Point) up-sampling, which is how I first interpreted your description, or Bilinear upsampling ?

So, if I understand correctly, its 'nearest neighbour' (point) up-sampling and it's the convolution averaged chroma sub-sampling that brings about the separation of the R/B and G channel plots on the Resolve Parade scope, which manifests as blur ?

http://i.imgur.com/BepuPGSm.png (https://imgur.com/BepuPGS)

Up-sampled in that example to r210, because Resolve wont import v410


As regards Resolve; actually prior to 15.1.1 version update, the v210 'round-trip/pass-through' behavior (using the 'Checker-422' clip) was different

http://i.imgur.com/Ytpokj0m.png (https://imgur.com/Ytpokj0)

The change in behavior seen in 15.1.1 came in response to concern (from BMD forum members) about the quality of the export 422 sub-sampling:

http://i.imgur.com/v6xjp3Fm.png (https://imgur.com/v6xjp3F)

Which is when it became apparent that the 'new' behavior bore a striking similarity to that seen in VDub2 for 422 > 444 > 422.

In fact, referring back to the series I posted earlier....

http://i.imgur.com/nfUcnE4m.png (https://imgur.com/nfUcnE4)

....when I ran quality metrics (FFMPEG) on the matched v210 exports from the Resolve and VDub2 series, the SSIM scores were 1.000000 (lossless) for Luma and UV chroma.

shekh
17th October 2018, 14:50
So is the 422 > 444 in VDub2 (by definition) Nearest Neighbor (Point) up-sampling, which is how I first interpreted your description, or Bilinear upsampling ?

Bilinear. Even sample is centered so it is not blended but odd sample is blended.

WorBry
17th October 2018, 15:10
Thank-you Shekh.


That DNxHR result is completely unexpected and unacceptable. Something is up

And I'm getting similar results with Adobe's DNxHR/DNxHD implementation , also on encoding/decoding. It looks like some sort of DCT compression issues.

FWIW - Here's the Checker-444 clip and an FFMPEG DNxHR_444 (10bit) transcode loaded into VDub2 and examined on Color Tools 1.4 videoscopes:

http://i.imgur.com/ucqNVXJm.png (https://imgur.com/ucqNVXJ)

Same pattern as seen on the Resolve scopes.

Morku
17th October 2018, 18:21
Hi, I want to capture avi with an usb grabber which works without issue, but... the preview image not work.

Weirdly it worked at the first attempt. I go to capture mode and Video was set to Overlay and it was previewed. Then I opened Capture settings and the preview image got stuck... So I closed, reopen VirtualDub -> no more preview.
So I changed "Display with Filters" and got a (distorted) preview, but it worked... also only for a moment. Next day, now every preview not show an image :(
So I deleted the VirtualDub regedit settings to start from beginning, but no chance, I don't get a preview.

The only way to get a preview is, when I open the Cropping dialog.
So I wanted to cheat VirtualDub and start a recording during Cropping dialog is open. Of course, it doesn't work. It also not work to open Cropping dialog when it is in capture mode.
Even open a second VirtualDub instance not work, because the USB grabber is taken of the first VirtualDub...

Any idea how I get the preview back and what made the preview vanish. Many thank you for the idea.

The Device itself is Dazzle DVC100 Video Device (DirectShow)

Capturing the videosource just works, but without the preview I can't see if there is content.

shekh
17th October 2018, 19:04
Morku, do you see anything in the log (Capture->Log)? What is capture format?
It is interesting that crop dialog can show preview. Maybe because it does not use audio. Try to disable it (previewing audio).

Morku
17th October 2018, 19:19
Yes, there is an error:
[i] CapDShow: loading video filter state: (error code: 800704df,
ERROR_ALREADY_INITIALIZED)

[i] CapDShow: loading audio filter state: (error code: 800704df,
ERROR_ALREADY_INITIALIZED)

[i] Connected to capture device: Dazzle DVC100 Video Device (DirectShow)

Audio preview is not enabled, only that audio capture is enabled and to show Volume meter.
I switched the Audio device and for now, I have a preview with "Display with Filters". I reopen VDub, but with Audio "0 Line (DVC100)".
Still, I can't say if there is a relation to the audio setting.
Overlay preview still not work at all, no matter which audiosetting I pick (or disable).

richardpl
17th October 2018, 19:20
Thank-you Shekh.



FWIW - Here's the Checker-444 clip and an FFMPEG DNxHR_444 (10bit) transcode loaded into VDub2 and examined on Color Tools 1.4 videoscopes:

http://i.imgur.com/ucqNVXJm.png (https://imgur.com/ucqNVXJ)

Same pattern as seen on the Resolve scopes.

What's point in using different scopes? Avid encodes behaves in similar way.

I could show you ffmpeg scopes, but that would be totally pointless.

shekh
17th October 2018, 20:04
Yes, there is an error:
[i] CapDShow: loading video filter state: (error code: 800704df,
ERROR_ALREADY_INITIALIZED)

[i] CapDShow: loading audio filter state: (error code: 800704df,
ERROR_ALREADY_INITIALIZED)

[i] Connected to capture device: Dazzle DVC100 Video Device (DirectShow)


Unfortunately these are not real errors. It means part of settings are not restored but this is irrelevant to the preview problem.
Also there is nothing special in the cropping dialog. I'm suspecting everything actually works but the window which should hold preview somehow disappeared. Can you see any preview with different device (usb camera?), or video file (emulation), or UScreenCapture?

Edit: I misunderstood, do you now have stable preview using mode "display with filters"? Overlay mechanism is a bit vague to me, I consider it may work or not depending on some driver/system weirdness.

WorBry
17th October 2018, 20:46
What's point in using different scopes? Avid encodes behaves in similar way.


Purely as further validation that the issue is not with Resolve's decoder/scopes. Plus this is VirtualDub2 thread.

Since ffmpeg/avid/resolve all look bad in resolve, it might be as simple as a bad decoder version in resolve


Anything useful to add yourself ?

poisondeathray
17th October 2018, 20:55
Anything useful to add yourself ?

No, just the Adobe tests - confirmed it's the same for DNxHD/DNxHR encode /decode

If richardpl's comment "Avid encodes behaves in similar way" means avid encode and re-import behaves the same way, that pretty much means that's how it is - since it's avid's own official encoder and decoder.



Rant: Historically, it's the worst (near lossless) intermediate ever. Enormous issues and inconsistencies with levels across applications - all over the place. You almost needed to use Avid MC to ensure consistency . Performance isn't even that great decoding wise (FPS), and quality wise it's almost always lower in all tests , PSNR, SSIM or eyeball. This noise on the pattern test doesn't help either

WorBry
17th October 2018, 21:06
Anything useful to add yourself ?

I was responding to richardpl there.


If richardpl's comment "Avid encodes behaves in similar way" means avid encode and re-import behaves the same way, that pretty much means that's how it is - since it's avid's own official encoder and decoder.


I wasn't sure what he meant there. Anyway I went ahead and re-installed Media Composer to clear that one up. Still can't figure if/how it's possible to export DNxHR_444 from a 1080p project, but the re-imported DNxHD_444 export of the Checkers-444 clip shows the same 'degraded' pattern on the Media Composer scopes.

Do I need to post some scope images or would that be "pointless" ?


Rant: Historically, it's the worst (near lossless) intermediate ever. Enormous issues and inconsistencies with levels across applications - all over the place. You almost needed to use Avid MC to ensure consistency . Performance isn't even that great decoding wise (FPS), and quality wise it's almost always lower in all tests , PSNR, SSIM or eyeball. This noise on the pattern test doesn't help either

I'd read (same reference that mentioned the intentional 'blur') that DNxHR_444 was designed to be 'visually' (assumed psychovisually) lossless, whereas ProRes_444 tries to get closer to 'mathematically' lossless. But I've seen a number of anecdotal reports complaining about block artifacts especially.

Pity as its really the only 444 export option in Resolve on Windows. Cineform RGB 12bit exports at Filmscan 1/2 quality are too large for my purposes.

poisondeathray
17th October 2018, 21:21
I wasn't sure what he meant there. Anyway I went ahead and re-installed Media Composer to clear that one up. Still can't figure if/how it's possible to export DNxHR_444 from a 1080p project, but the re-imported DNxHD_444 export of the Checkers-444 clip shows the same 'degraded' pattern on the Media Composer scopes.

Do I need to post some scope images or would that be "pointless' ?

Personally I think it's pointless . That's confirmation enough for me

Morku
17th October 2018, 22:22
@shekh
I tried my Logitech 9000 Pro. Shown as "Logitech QuickCam Pro 9000 (DirectShow)".
It is the same thing. Overlay not show anything. Display with Filters may work, but in a strange way (but always when I start capturing, the Preview is in that mode fine).

Device Screen capture works without issue. I always get a preview (Overlay, Preview and Display with Filters).

Than there is Microsoft WDM Image Capture (Win32) (VFW) -> it also always work (Overlay is greyed out, no problems with Preview and Display with Filters). This mode anyway is shaky and also the recordings aren't correct.

So the only relation I see between my Webcam and USB grabber is DirectShow. Anything I could try here?

shekh
17th October 2018, 23:22
Display with Filters may work, but in a strange way

And when you open cropping dialog, it is normal (not strange)? Btw how it is in strange way, may a screenshot show this?
I also received a somehow related ticket https://sourceforge.net/p/vdfiltermod/tickets/186/
Do you have Nvidia drivers?

wonkey_monkey
17th October 2018, 23:50
When directly opening an MKV (H.264/AVC) what does [+] mean when shown as the frame type (instead of [I], [B], [K], [P], etc)? Does it indicate a problem reading the file?

(also what's the difference between [I] and [K]?)

shekh
18th October 2018, 00:14
When directly opening an MKV (H.264/AVC) what does [+] mean when shown as the frame type (instead of [I], [B], [K], [P], etc)? Does it indicate a problem reading the file?

(also what's the difference between [I] and [K]?)

[+] is a "no frame", frame is expected at this place, but when actually decoding ffmpeg does not report matching timestamp.
some possible reasons:
wrong framerate - you would see + at repeating intervals
or variable framerate,
wrong duration,
also possible corrupt file

If you think it is wrong maybe I need to look at sample.

[I] is frame type as reported by ffmpeg, [K] is frame which I assume is keyframe (IDR) because it is marked as key in the index table.
However I noticed weirdness about it. index in ffmpeg is in damn dts units/order which is slightly off real frames even in best case.

WorBry
18th October 2018, 04:39
@ poisondeathray

@WorBry - if you have serially changing each generation , it suggests some interpolation going on, probably bicubic. If you have blocky sharp color borders and preserved same up/down over each generation, it can only be nearest neighbor . You can verify this by controlling the algorithm in say vapoursynth or avisynth or ffmpeg , export either v210 or v410 and check . You can check the RGB conversion algorithm this way too


Just as a post script. I've been doing just that with the 'Checkers-422' clip in AVISynth+ - converting to 10bit YUV444 and back to 10bit YUV422 using different chroma-sampler combinations and then (via p210 output) encoding to v210 in VDub2. Based on the pattern of results seen on the Resolve scopes and comparative quality metrics (SSIM and PSNR) I'm convinced that Resolve applies Bilinear chroma up-sampling and down-sampling when v210 is 'pass-through' exported to v210. Any other 'chroma-sampler' combination would produce measurably different results.

There I'm done. Sorry to interrupt more important VDub2 business.

wonkey_monkey
18th October 2018, 10:24
[+] is a "no frame", frame is expected at this place, but when actually decoding ffmpeg does not report matching timestamp.
some possible reasons:
wrong framerate - you would see + at repeating intervals
or variable framerate,
wrong duration,
also possible corrupt file

If you think it is wrong maybe I need to look at sample.


It's a DVB-S recording from BBC One HD, remuxed using MakeMKV because FFMPEG has major problems with it in its raw state, and it only shows [+] when it gets to the end credits, which are interlaced (the rest of it is progressive, or progressive-in-interlaced or however it's done).

DGIndexNV/dgsource has no such trouble.

Here's a sample, including the final (progressive) scene which plays back fine. The sample is a Trimmed TS output from DGIndexNV, rather than the full remuxed file I mentioned above:

http://horman.net/credits.ts

VLC and MPC-HC both have the same problem, causing stuttering. Windows Media Player is okay. I'm guessing it's purely an FFMPEG problem.

shekh
18th October 2018, 14:36
I did not study ts internals. It appears this format typically needs full parsing to understand frames timing (which I assume is what DGIndex is doing).
Also the magic of switching progressive and interlacing.. ffmpeg provides some info when decoding but I'm not sure what could I do with it.

Morku
18th October 2018, 17:41
And when you open cropping dialog, it is normal (not strange)? Btw how it is in strange way, may a screenshot show this?
I also received a somehow related ticket https://sourceforge.net/p/vdfiltermod/tickets/186/
Do you have Nvidia drivers?

Hi,
to describe the distortions, I think it's the best to show as a video. Depending where the window of VirtualDub is, the preview 'moves' and you can create that "winning solitair" effect (or crashing IE on windows95, you know...).
Check the video: https://www.dropbox.com/s/ri897y11tfkh3ai/virtualdub.mp4?dl=0

What me also wonder, when I start the recoding, the distortions stops and the preview is fine. No matter which position of VirtualDub.

Yes, the Cropping windows is always fine. I can move around the window without issues.

Yes, I use NVIDIA GTX 980 Ti with 416.34

shekh
18th October 2018, 18:55
Yes, I use NVIDIA GTX 980 Ti with 416.34

So maybe it is the same Nvidia issue and you can try older drivers?

The distortion looks really weird. You can also try display preferences (enable/disable "use directx" etc) to see if it has effect on this.

Morku
19th October 2018, 17:12
I can confirm the reporting on sourceforge. I uninstalled the driver (Microsoft basic driver) and have Overlay Preview without issue. Also Preview (system) works fine.

I installed for testing 399.07 -> same issue like current driver
I tried 388.31 -> no issues anymore

Which display prefences do you mean? Nvidia settings? in VirtualDub? Windows?

shekh
19th October 2018, 17:22
I meant VirtualDub preferences.

P.S.
Although it is not an issue, I find it still confusing how capture preview modes are organized, after inspecting again:
"Overlay" tries to render "videoPort" pin first, then "preview", then "capture"
"Preview" only renders "capture" pin but in the middle there is also "Sample Grabber"

I see no evidence that in either case any video overlay is expected.
And the fact that "Preview" mode never connects to "preview" pin does not help to understand.
So these are quite meaningless choices.

Morku
19th October 2018, 18:11
Okay, I played around a little in the setting.
Not matter which setting I change it doesn't effekt the Overlay, Preview (system). There is no preview.

But it does effect the "Display with Filters" setting:

uncheck "Use DirectX for display panes" fix the glitchy moving VirtualDub preview
It is also fixed when Direct3D 9, or OpenGL or Direct3D 11 is checked.
Any other optioncombination you would like to know?

shekh
19th October 2018, 18:51
Thanks, nothing left to check and it seems the problem cannot be solved (very unlikely).

Morku
19th October 2018, 18:57
Haha, okay. But at least we found some workarounds.

WorBry
22nd October 2018, 03:47
@Shekh,
Sorry, but I'd appreciate further clarification on this:

Checked what is going on with chroma,
444 -> 422: each pixel is convolved with kernel 0.25, 0.5, 0.25
As I understand this creates some blurring.

422 -> 444: odd pixel is copied as is, even pixel is blended from two neighbor source pixels
This is simple.

https://i.postimg.cc/gJ7VB4QS/checker422.png

From the screenshot it seems Sony is using bilinear downsampling for 444->422, this blends max 2 neighbor pixels as opposed to summed area.
I changed various interpolation options until I got very similar picture.
For 442->444 it is still bilinear upsampling, no changes.
https://i.postimg.cc/zX4JT3bR/checker-2.png

You said there that VDub2 sub-samples 444 > 422 using this "each pixel convolved with kernel 0.25, 0.5, 0.25" modality, whereas Vegas is using bilinear re-sampling which "blends max 2 neighbor pixels as opposed to summed area".

As it turns out, both Resolve (15.1.2) and Premiere Pro produce exactly the same results as VDub2 when the Checkers-444 (ProRes_4444) clip is 'pass through' exported to v210, giving the same pattern, as per the image in your first post:

http://i.imgur.com/nMWv0Vm.png (https://imgur.com/nMWv0Vm)

Whereas Resolve 15.1 behaves in the same way as Vegas Pro, giving the same pattern as the one in your second post:

http://i.imgur.com/FLgkvPP.png (https://imgur.com/FLgkvPP)

Which is also the same as the 'Checkers-422' clip (ProRes_HQ 10bit 422) that was exported from the original image created in Natron. So Natron must use the same sub-sampling modality too:

http://i.imgur.com/1pQI4ewm.png (https://imgur.com/1pQI4ew)

What's confusing me is that when I use AVISynth+ to do the 444 > 422 conversion with 'bilinear' chroma-resampling and then encode to v210 with VDub2, the pattern of results is exactly the same as when the conversion is done in VDub2 (i.e. importing the original Checkers-444 clip).

http://i.imgur.com/itsMacg.png (https://imgur.com/itsMacg)

FFVideoSource("{Path}:\checkers-444.mov", fpsnum=25, fpsden=1, threads=1)
Converttoyuv422(interlaced=false, chromaresample="bilinear") # which VDub2 decodes to p210

So I'm left wondering, if your interpretation of the 'Vegas' pattern is 'Bilinear' (by definition) then why is the AVISynth 'Bilinear' re-sampler giving this other pattern that results from "each pixel being convolved with kernel 0.25, 0.5, 0.25 "(summed area) ?

Had a look at the AVISynth 'Resampling' docs to see what I could glean, but I'm none the wiser:

http://avisynth.nl/index.php/Resampling#Example:_the_bilinear_resampling_filter_-_downsampling

Is this other 'summed area' modality a variant of Bilinear or something different altogether ? I've seen mention of a so called 'area averaging' method of sampling (as distinct from 'Bilinear') but only in the context of image scaling algorithms.

https://superuser.com/questions/375718/which-resize-algorithm-to-choose-for-videos

Could you point me to any references that explain, and ideally illustrate this more fully ?

Edit: Here also, but again in relation to resolution scaling:

http://www.enfocus.com/manuals/UserGuide/PP/10/enUS/en-us/concept/c_aa1135518.html#c_aa1135518

FFMPEG also:

https://ffmpeg.org/ffmpeg-scaler.html#toc-Scaler-Options

But nothing I can find relating to 444 > 422 sub-sampling specifically.

poisondeathray
22nd October 2018, 05:48
@WorBry - The vegas/natron/resolve15.1 histogram pattern in your screenshot looks very close to the "box" kernel using fmtc in vapoursynth

https://i.postimg.cc/XXRgs5K7/vpy-fmtc-box000000.png (https://postimg.cc/XXRgs5K7)


clip = core.lsmas.LibavSMASHSource(r'F:\checkers-444.mov')
clip = core.fmtc.resample(clip, css="422", kernel="box")
clip = core.fmtc.bitdepth(clip, bits=10, dmode=1)
clip.set_output()


1 frame video sample (zipped) for non vpy users
https://www.mediafire.com/file/td58t1or1a555k4/v210_fmtc_box_dmode%3D1.zip/file

Not sure what the equivalent is in avisynth. I thought maybe avisynth dither tools (same author) could do it , but I can't get it to do it properly, it's csp for dither_resize16 only does 8bit formats like "YV16", not YUV422P10

WorBry
22nd October 2018, 06:47
I wondered about Box also, but it's not one of the chromaresample options given for AVISynth Convert and I'm not set up for VapourSynth.

Reassuring at least to find that Resolve now behaves in the same manner as Premiere Pro, as it makes for consistent 422 sampling outcomes on export from 444 and 422 inputs. I don't how, but that's the observation from these 'pass-through' tests.

poisondeathray
22nd October 2018, 06:50
Actually you can do it with avs+ using dither tools, if you use the stacked format

I think Firesledge (aka Cretindesalpes) retired from avisynth stuff before avs+ became more stable (where you can use native formats now), so you can use the hacked 8bit MSB/LSB stack format (which was used for higher bit depth formats when he was active) ; I don't think dither tools was updated for the native pixel formats


LsmashVideoSource("checkers-444.mov", format="YUV444P10", stacked=true)
Dither_resize16(1920,1080, kernel="box", csp="YV16")
ConvertFromStacked(bits=10)


There are some slight histogram differences, but it's quite close. Might be some minor dithering or rounding differences

WorBry
22nd October 2018, 06:58
@WorBry - The vegas/natron/resolve15.1 histogram pattern in your screenshot looks very close to the "box" kernel using fmtc in vapoursynth

https://i.postimg.cc/XXRgs5K7/vpy-fmtc-box000000.png (https://postimg.cc/XXRgs5K7)


It does doesn't it. I'll look at this some more tomorrow.

shekh
22nd October 2018, 10:52
Sorry for confusion, here is illustration

https://i.postimg.cc/1t4WN1pc/resize2.png

I did not write the original algorithm in VD, only filled missing parts to communicate with higher precision formats. Overall it is the same in 8-bit, I don't think you have to stick to high bit depth to experiment with resampling.
By nature downsampling and upsampling are resizing of image applied to chroma planes. The differences are in small detail what filters are selected, subpixel offsets etc.

It seems I used wrong terms in wrong places.
All chroma resampling in VD is called "linear" and applied independently in with/height. Also there is "interpolation only". It seems Avisynth bilinear is exactly the same as VD "linear".
The second picture ("sony") should be called "bilinear interpolation" (not same as "bilinear resampling"). Or is it plain averaging?

This definition sounds correct: "Bilinear interpolation uses a 2x2 environment of a pixel and then takes the average of these pixels to interpolate the new value. It's not the best algorithm, but rather fast." = "sony".

Bilinear resampling averages more pixels by applying weights which fall off in linear law. By coincidence, in this example 0.5, 1, 0.5 are exactly pixel areas if you draw a box around them. Thus you could call it "Area averaging" but it behaves differently with other scales.

WorBry
22nd October 2018, 22:01
Thanks Shekh,

So if I understand correctly, your interpretation of the 'Sony Vegas' (Resolve 15.1, Natron) Checkers-444 > v210 pattern holds - "blends max 2 neighbor pixels as opposed to summed area" - and that is what the lower diagram illustrates:

https://i.postimg.cc/1t4WN1pc/resize2.png

That also fits with a definition of Bilinear Interpolation - "....uses a 2x2 environment of a pixel and then takes the average of these pixels to interpolate the new value. It's not the best algorithm, but rather fast." Did that definition come from Sony btw ?

The other pattern observed with VDub2 represents Bilinear Resampling where "each pixel convolved with kernel 0.25, 0.5, 0.25" (corresponding to the top diagram), which is consistent with the 444 > 422 results obtained with AVISynth using the 'Bilinear' re-sampler, along with Resolve 15.1.2 and Premiere Pro.

@PDR. Many thanks also. I think you've clinched it.

The vegas/natron/resolve15.1 histogram pattern in your screenshot looks very close to the "box" kernel using fmtc in vapoursynth

https://i.postimg.cc/XXRgs5K7/vpy-fmtc-box000000.png (https://postimg.cc/XXRgs5K7)


It does doesn't it. I'll look at this some more tomorrow.

I ran the AVISynth scipt you posted:

LsmashVideoSource("checkers-444.mov", format="YUV444P10", stacked=true)
Dither_resize16(1920,1080, kernel="box", csp="YV16")
ConvertFromStacked(bits=10)

Here's the scope profile and checker pattern of the resulting v210 encode compared to your VapourSynth 'v210_fmtc_box_dmode=1' clip, the Resolve 15.1 export and original 'Checkers-422' (ProRes_HQ) clip. They match up very well don't they.

http://i.imgur.com/SvjFnC2m.png (https://imgur.com/SvjFnC2)

I also compared the AVISynth 'Box Kernel' v210 vs Resolve 15.1 v210 export with quality metrics and the SSIM and PSNR scores are not too shabby either:

http://i.imgur.com/aR0pxlL.png (https://imgur.com/aR0pxlL)

That's the one - it's 'Box Kernel' resampling.

So does that tally with '"blends max 2 neighbor pixels as opposed to summed area" ?

If so I think we can marked this up as "solved".

Edit: I'm also able to replicate the behavior observed when the Checkers-422 clip is 'pass-through' exported to v210 in Resolve 15.1

LSMASHVideoSource("{Path}:\checkers-422.mov", format="YUV422P10", stacked=true)
Dither_resize16(1920,1080, kernel="bilinear", csp="YV24")
Dither_resize16(1920,1080, kernel="box", csp="YV16")
ConvertFromStacked(bits=10)

http://i.imgur.com/9hw3gLgm.png (https://imgur.com/9hw3gLg)

Which confirms Bilinear up-sampling to 444 on import and Box sub-sampling to 422 on export.

It was that behavior which sparked this study in the first place as it was deemed to reflect sub-optimal 422 chroma sub-sampling.

shekh
22nd October 2018, 22:31
@WorBry
Yes, you understood me right.
"Did that definition come from Sony btw" - it is from answers from stackexchange link you gave above, from explanation of ffdshow filters.

When just 2 pixels are averaged there is not enough information to guess original intent. Both the results can be from box filter but with different chroma location.

WorBry
23rd October 2018, 02:06
@WorBry
"Did that definition come from Sony btw" - it is from answers from stackexchange link you gave above, from explanation of ffdshow filters.


So it is :o

Thanks again.

WorBry
24th October 2018, 06:40
@ poisondeathray. Here's another eye-opener:

https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=79163&start=100#p448972

shekh
7th November 2018, 08:44
to describe the distortions, I think it's the best to show as a video. Depending where the window of VirtualDub is, the preview 'moves' and you can create that "winning solitair" effect (or crashing IE on windows95, you know...).
Check the video: https://www.dropbox.com/s/ri897y11tfkh3ai/virtualdub.mp4?dl=0


Just noticed same issue. DirectDraw display + vsync = wrong window offset.
For some reason vsync is enabled in capture preview, disabled otherwise.
Turns out this is bug in code, not hardware/drivers related.

lansing
16th November 2018, 17:20
Reporting a few bugs.

In capture mode, the video levels window can be opened infinite instance instead of just one.

And when I changed the exposure value in the levels setting and start capturing, the exposure value was reset back to the previous value from the "capture filter" instead.

Also, when capture is running, clicking "file->exit capture mode" did not work.

Morku
19th November 2018, 22:07
Just noticed same issue. DirectDraw display + vsync = wrong window offset.
For some reason vsync is enabled in capture preview, disabled otherwise.
Turns out this is bug in code, not hardware/drivers related.

Did you change anything related between 42699 and 42711 with Capture AVI...?

Because with the recent version, no matter what I try, I don't get a preview image at all anymore, not even the distorted "Display with Filters" works. I tried all the tricks with disable audio record and back, but no luck. Only the Cropping window shows a preview, which is sadly usless for me.

Revert back to 42699 works and I get my preview. So currently I will keep the older version for capturing avi.

What's also weird, when "Display with Filters" is enabled in current version, moving the VirtualDub2 window around is choppy (like 30fps). When Overlay, the window moves smoothly with my 60Hz monitor refresh rate.
The 42699 does not show that issue. It shows the distorted preview (which is always fixed, when starting capturing), but the VirtualDub2 windows moves with 60Hz.

shekh
19th November 2018, 22:50
This is strange. The changes between these versions are minimal and not related to capture or display.
Try moving 42711 to another folder, I saw somewhere that it has effect (maybe drivers keep some crappy settings per exacutable path).
The quoted DirectDraw bug fix is not yet published but you can avoid it: enable dx9 display, or disable vsync

Morku
19th November 2018, 23:02
You are right, moving folder seems to affect this. VirtualDub is normal on my D: drive and for testing, I had the previous version on C:. Rebooting PC also seems to help.
So it's not version related. Ignore the post :)

wonkey_monkey
20th November 2018, 00:41
Previous versions of VirtualDub would automatically open a whole image sequence if you dragged the first image onto it, but it doesn't seem to do this any more. Is there a preference I can't see, or has this functionality been removed?

shekh
20th November 2018, 01:00
Previous versions of VirtualDub would automatically open a whole image sequence if you dragged the first image onto it, but it doesn't seem to do this any more. Is there a preference I can't see, or has this functionality been removed?

My bad. I repeatedly find this annoying but keep thinking this is legacy behavior. Will fix.

SeeMoreDigital
20th November 2018, 10:05
My bad. I repeatedly find this annoying but keep thinking this is legacy behavior. Will fix.Thanks

shekh
24th November 2018, 14:50
Previous versions of VirtualDub would automatically open a whole image sequence if you dragged the first image onto it, but it doesn't seem to do this any more. Is there a preference I can't see, or has this functionality been removed?

fixed

Reporting a few bugs.

In capture mode, the video levels window can be opened infinite instance instead of just one.

And when I changed the exposure value in the levels setting and start capturing, the exposure value was reset back to the previous value from the "capture filter" instead.

Also, when capture is running, clicking "file->exit capture mode" did not work.

Added fixes for menus. Actually, the whole menu does not reflect "capturing" state, most commands are simply ignored. Now "exit capture" works, and also "device disconnect".
For the exposure I have no idea. Maybe there is bug in driver.

shekh
24th November 2018, 15:12
Some new/recent stuff: Audio display was significantly polished and got some new controls: https://sourceforge.net/p/vdfiltermod/wiki/AudioDisplay/
I like the possibility to scroll it left-right. Before it felt barely useful because of continuous glitches. Now I even enabled it to sync with preview (however, this is only possible with caching input driver now because of multithreading problems).
If anyone has ideas what to tweak in audio display it is good time :)

wonkey_monkey
25th November 2018, 13:53
Very nice!

wonkey_monkey
26th November 2018, 20:45
I just updated and now I find that VirtualDub2 remembers zoom levels from when I last closed it. This, I think, is different to the previous behaviour, where files were always first opened at 100%.

Is there an option to control this?

shekh
26th November 2018, 22:08
There is no option. Previously it was not always consistent, was able to remember "auto-size" until you touch anything.
The option would be "remember auto-size and zoom", not big deal to add.

wonkey_monkey
26th November 2018, 22:51
I would suggest such an option should be off by default - if you open VirtualDub2 after weeks or months, you would expect it (by default) to show a view of the file unaffected by what you may have been working on last time. Principle of least surprise rules here :)

StainlessS
27th November 2018, 10:50
I would suggest such an option should be off by default - if you open VirtualDub2 after weeks or months, you would expect it (by default) to show a view of the file unaffected by what you may have been working on last time. Principle of least surprise rules here :)

+1 on that.

wonkey_monkey
12th December 2018, 00:24
Might there one day be support for AviSynth+'s Planar RGB colourspaces?

kolak
12th December 2018, 00:43
Is Vdub width restriction to be mod 16 for Cineform due to codec or Vdub limitations? I thought Cineform can be any frame size.

shekh
12th December 2018, 00:49
Might there one day be support for AviSynth+'s Planar RGB colourspaces?

Planar rgb is internally supported, so the question is how to bridge it with avisynth. I'm not sure if vfw output from avisynth already handles them, probably not.

shekh
12th December 2018, 00:52
Is Vdub width restriction to be mod 16 for Cineform due to codec or Vdub limitations? I thought Cineform can be any frame size.

It is Cineform limitation. I enforced it after discovering a crash with wrong size (in my early builds the limit was not checked).

kolak
12th December 2018, 12:11
Is it hard limitation in codec design which can't be overwritten?

shekh
12th December 2018, 12:43
Can't tell exactly, it didn't look simple.
Better to ask on https://github.com/gopro/cineform-sdk
There may be possibility to use metadata-based cropping in the codec (not supported by vd2)

pinterf
12th December 2018, 21:37
Planar rgb is internally supported, so the question is how to bridge it with avisynth. I'm not sure if vfw output from avisynth already handles them, probably not.
It's supported but I couldn't test it, search for
OPT_Enable_PlanarToPackedRGB on avisynth.nl

shekh
12th December 2018, 22:18
It's supported but I couldn't test it, search for
OPT_Enable_PlanarToPackedRGB on avisynth.nl

Looks like I can add G3/G4 fourcc's, btw where is vfw export in the source code?

pinterf
13th December 2018, 09:02
Looks like I can add G3/G4 fourcc's, btw where is vfw export in the source code?

Start of export
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1144

Planar RGB plane order is GBR
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1251

Planar RGB FourCCs
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1638

shekh
13th December 2018, 11:53
Start of export
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1144

Planar RGB plane order is GBR
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1251

Planar RGB FourCCs
https://github.com/pinterf/AviSynthPlus/blob/MT/avs_core/core/main.cpp#L1638

Thanks

StainlessS
16th December 2018, 22:16
Hi Shekh, I've just (for the first time) gotten a "neighbor solicitation" alert from my firewall (Comodo) saying VirtualDub was attempting to connect to the internet, just curious, what was it doing ? (I've set it as blocked application anyway).
EDIT: Image
https://i.postimg.cc/r0kpVzFZ/Untitled.jpg (https://postimg.cc/r0kpVzFZ)

shekh
16th December 2018, 23:14
Maybe it is some 3rd party activity like codec or plugin checking for update? I did nothing that can access internet.

StainlessS
17th December 2018, 12:50
I have blocked non-essential windows system (W7) from accessing internet, maybe it was trying to connect to HQ by the back door.

Thanks for your answer, glad I blocked it, I nearly let it through.

lansing
2nd January 2019, 04:38
Hi I encountered a bug. I have a 1440x1080i video with a DAR 16:9, when I load it into Virtualdub, it was displaying it as 16:9. But when I do a "copy output frame to clipboard", it was copying the original 4:3 ratio. The program is not copying what I saw in the preview panel.

LigH
2nd January 2019, 08:50
Usually the content will be copied with stored dimensions (here: 1440×1080 pixels), regardless of the display AR, because deskewing would alter the frame content (pixel values would depend on the scaling kernel). I would say it is not a bug, it is working as intended. Deskewing is a convenience for the human audience, but in case you want to analyse technical content, you will need a 1:1 copy of the content as it has been encoded/stored/decoded.

groen
4th January 2019, 22:30
Is it possible to batch process a direct stream copy? I can't seem to find that option. I have a x264 with a french and english audio track and I want to stream copy making the english audio track the only audio track.

I can do a single video file fine but I have about 100 to do. Thanks.

LigH
4th January 2019, 23:47
This would be a job for a CLI multiplexer for your desired container format (e.g. MP4: MP4Box, or MKV: mkvtoolnix); or possibly ffmpeg as universal tool. But VirtualDub2 is for interactive editing.

shekh
5th January 2019, 00:01
Is it possible to batch process a direct stream copy? I can't seem to find that option. I have a x264 with a french and english audio track and I want to stream copy making the english audio track the only audio track.

I can do a single video file fine but I have about 100 to do. Thanks.

If you can do a single job it should also work for multiple files. First setup everything for one video, then go to batch wizard.

v0lt
5th January 2019, 07:32
This would be a job for a CLI multiplexer for your desired container format (e.g. MP4: MP4Box, or MKV: mkvtoolnix); or possibly ffmpeg as universal tool. But VirtualDub2 is for interactive editing.
I recently tried to split the MP4 file.
MP4Box can only cut with an accuracy of 1 second.
FFmpeg corrupts the beginning of MP4 file (https://trac.ffmpeg.org/ticket/7651).

LigH
5th January 2019, 08:43
@v0lt: groen did not mention cutting files, only selective remultiplexing.

I don't know much about the "Batch Wizard"; if shekh considers it powerful, I will trust him.

shekh
5th January 2019, 09:15
@v0lt: groen did not mention cutting files, only selective remultiplexing.

I don't know much about the "Batch Wizard"; if shekh considers it powerful, I will trust him.

It only lets to repeat same set of operations for multiple files, I don't claim the produced mp4 is free of any errors.

StainlessS
5th January 2019, 09:30
I once used the batch processor to mass convert hundreds (maybe thousands) of audio files[as WAV only], worked flawlessly (needed dummy video clip I think).

groen
8th January 2019, 01:13
To be honest I think I requested that feature years ago on virtualdub and nandub threads.

Does anyone know of an alternative tool that can change audio streams and direct stream copy in a batch process? thanks!

LigH
8th January 2019, 06:44
Usually, if you ask for batch processing, you ask for ffmpeg.

wonkey_monkey
8th January 2019, 10:50
Small request: when a video exceeds or matches screen resolution in a maximised window, the video frame disappears so the whole thing can be viewed. But if only the width matches, the border remains. Could the border remove itself when either the width or (less likely) height matches?

shekh
9th January 2019, 15:45
Small request: when a video exceeds or matches screen resolution in a maximised window, the video frame disappears so the whole thing can be viewed. But if only the width matches, the border remains. Could the border remove itself when either the width or (less likely) height matches?

Both width and height must match or exceed available area, I'm afraid otherwise I need to fill remaining borders with black or custom color (this feature was also requested before).
But you can manually reduce panes area (vertically) by using View->Curve editor.

lansing
14th January 2019, 20:34
Something is wrong with "full processing mode". I tried to encode a vapoursynth script, VS editor benchmark speed at 60 fps, with VD's "normal recompress", encoding speed is at 56 fps, but with "full processing mode", speed has dropped to 5 fps.

shekh
14th January 2019, 20:47
Try to run Tools->Benchmark analyze pass, show screenshot of what is displayed.

lansing
14th January 2019, 22:01
um, I couldn't reproduce the slow speed issue now, the "full processing mode" works normal again.

LigH
17th January 2019, 14:52
How do I use VirtualDub2 to remultiplex a video (addition: with a different frame rate) from MKV to MP4?

I open an MKV with AVC (H.264) video stream only.
I select "Video - Direct stream copy".
(addition: I select a new frame rate via "Video - Frame Rate..." and "Source rate adjustment")
I use "File - Save as", select "MP4 (MPEG-4 Part 14) (*.mp4)"

---------------------------
VirtualDub Error
---------------------------
Direct stream copy cannot be used with this video stream.
You may want to select different Input Driver.
---------------------------
OK
---------------------------

shekh
17th January 2019, 16:15
Some explanation https://sourceforge.net/p/vdfiltermod/wiki/direct_copy/

Input driver which works with mkv and direct stream copy is "fcchandler matroska" https://sourceforge.net/projects/fcchandler/files/Virtualdub%20Matroska%20plugin/

However I'm not sure the result can be saved to mp4 safely, try it.

Yanak
19th January 2019, 17:03
Not using virtualdub for this but just in case... MP4box should achieve this simply :

MP4Box.exe -add video.h264:fps=60 -new Output.mp4

Once you have extracted the video stream from the mkv video (using mkvextract for example) just set the desired fps in the command line

Edit :
this command should do too:
MP4Box.exe -add video.h264 -fps 120 -new Output.mp4

SeeMoreDigital
19th January 2019, 18:16
How do I use VirtualDub2 to remultiplex a video (addition: with a different frame rate) from MKV to MP4?
I think it would also be most useful if VirtualDub2 could be configured to save a selected quantity of frames (between key or I-frames) into the same container as the source or as an elementary stream.

wonkey_monkey
19th January 2019, 23:41
VirtualDub2 doesn't (for me) update the Audio Display when playing. It's fine when stepping with cursor keys, page up/down, or scrubbing on the timeline with the mouse, but hitting space to play just causes the currenty displayed waveforms to scroll off to the left with no new waveform data replacing it from the right. The frame numbers update, though.

shekh
20th January 2019, 00:56
VirtualDub2 doesn't (for me) update the Audio Display when playing. It's fine when stepping with cursor keys, page up/down, or scrubbing on the timeline with the mouse, but hitting space to play just causes the currenty displayed waveforms to scroll off to the left with no new waveform data replacing it from the right. The frame numbers update, though.

Are you playing avisynth script? Currently the waveform can update during playback only when using caching input driver.
This is because audio must be read concurrently on two threads, and most sources do not support this. I was thinking on possible solution, best I can imagine is to buffer a window long enough to satisfy both ends. This feels surprisingly complex.

wonkey_monkey
20th January 2019, 01:04
Yes, sorry, I forgot to say: it was Avisynth colorbars.

Milardo
28th January 2019, 07:45
Does virtualdub2 have a capture avi mode? I haven't tried it out yet. Also, can ffdshow be used as the video decoder for just preview/watching in virtualdub2 when in the capture avi mode?

LigH
28th January 2019, 09:37
Yes, VirtualDub2 still contains the "File - Capture AVI..." menu entry of the original VirtualDub by Avery Lee (can't test its functionality due to a lack of source devices here).

I believe the capture mode is mainly based on VfW still, so it can probably use ffvfw as VfW decoder for captured video (no affirmative answer). Use the 32 bit application.

Milardo
28th January 2019, 17:30
Ok, but can I just preview/watch through virtualdub and have ffdshow decode the video? I don't want capture/record anything.

shekh
28th January 2019, 17:37
Ok, but can I just preview/watch through virtualdub and have ffdshow decode the video? I don't want capture/record anything.

Duplicate thread https://forum.doom9.org/showthread.php?p=1864060

wonkey_monkey
31st January 2019, 17:54
Feature request: when right clicking to change zoom, center (as much as possible) on the point which was initially right-clicked on, rather than whatever is currently in the center of the view.

----------

Question: does VirtualDub2 cache frames differently depending on how long they take to be fetched? Like if a frame is fetched very quickly, is it less likely to cache the frame?

rbauer
4th February 2019, 19:00
Hi.

is there any chances to make it portable?

Now it writes (a lot) to:
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\Script Editor\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\VirtualDub\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\VirtualDub\External Encoders\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\VirtualDub\MRU List\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\VirtualDub\Persistence\

Many Thanks

shekh
4th February 2019, 19:34
These are actually HKEY_CURRENT_USER
You can run once virtualdub.exe /portable and it will create VirtualDub.ini, or you can just create a blank file yourself.
All VirtualDub settings will go to ini file instead of registry.
But plugins will continue to use registry (e.g. Script Editor)

nji
4th February 2019, 21:13
When adding a logo
(say logo image = unique color (255,0,255),
"Enable...", "Use gray",
secondary image a mask containing black and white)
in the resulting frame the logo is (254,0,254).
This in 64 bit (build 43073)
In 32 bit everything's fine.

rbauer
4th February 2019, 21:34
You can run once virtualdub.exe /portable and it will create VirtualDub.ini, or you can just create a blank file yourself.
All VirtualDub settings will go to ini file instead of registry.
But plugins will continue to use registry (e.g. Script Editor)
I have tried again with VirtualDub2_43364 (no added external plugin), empty VirtualDub.ini and then double click on "VirtualDub64.exe" (I'm using win8.1pro 64bit on non admin account):

VirtualDub.ini is written but the program still writes to registry:

HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\Script Editor\

Thanks

Groucho2004
4th February 2019, 21:39
I have tried again with VirtualDub2_43364 (no added external plugin), empty VirtualDub.ini and then double click on "VirtualDub64.exe" (I'm using win8.1pro 64bit on non admin account):

VirtualDub.ini is written but the program still writes to registry:

HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\
HKEY_USERS\S-1-5-21-95864766-2325389660-2471813846-1002\Software\VirtualDub.org\Script Editor\

What do you think the files in the "plugins32" and "plugins64" directories are? The directory names should give you a hint.

Just a reminder, this is what shekh wrote:
All VirtualDub settings will go to ini file instead of registry.
But plugins will continue to use registry (e.g. Script Editor)

rbauer
4th February 2019, 22:00
What do you think the files in the "plugins32" and "plugins64" directories are? The directory names should give you a hint.
I don't get what you mean :confused: : I'm using VirtualDub64.exe 'cause I'm using a 64bit OS (i know plugins32 holds 32bit filters and the same with plugins64 and its filters).

Just a reminder, this is what shekh wrote:
Ok, get it, i'm gonna make a turbostudio version.

:thanks:

shekh
4th February 2019, 23:57
When adding a logo
(say logo image = unique color (255,0,255),
"Enable...", "Use gray",
secondary image a mask containing black and white)
in the resulting frame the logo is (254,0,254).
This in 64 bit (build 43073)
In 32 bit everything's fine.

This is terrible. I was about to offer another filter (fflayer) but it has similar issue.

for logo 32-bit code uses mmx inline asm; 64-bit code uses heavy bit-hackery. All this code looks throwaway.

nji
5th February 2019, 00:20
This is terrible. I was about to offer another filter (fflayer) but it has similar issue.

for logo 32-bit code uses mmx inline asm; 64-bit code uses heavy bit-hackery. All this code looks throwaway.

As far as I know the original VirtualDub (64 bit) filter works fine.
Maybe you could take that one?

shekh
5th February 2019, 00:30
As far as I know the original VirtualDub (64 bit) filter works fine.
Maybe you could take that one?

I did not change it. Anyway, tested with 1.10.5 and the issue is present.

nji
5th February 2019, 00:39
I'm sorry - then my information about orig VirtualDub was wrong.

However don't worry too much.
Actually it WAS terrible when nobody knew about the bugs in logo and fflayer.
Now we're a step further, and can turn to that :-)

wonkey_monkey
13th February 2019, 00:39
I've just noticed that if I press F2 while an Avisynth script is loaded, the new instance of the filter I'm testing gets constructed before the previous one gets destructed. If, instead, I reload the file manually (selecting it from the Recent list), the previous instance gets destructed before the new instance is constructed.

More out of curiosity than anything else (I'm trying to track down a crash, but that's my filter's problem), is there a reason for the difference?

shekh
13th February 2019, 01:57
I've just noticed that if I press F2 while an Avisynth script is loaded, the new instance of the filter I'm testing gets constructed before the previous one gets destructed. If, instead, I reload the file manually (selecting it from the Recent list), the previous instance gets destructed before the new instance is constructed.

More out of curiosity than anything else (I'm trying to track down a crash, but that's my filter's problem), is there a reason for the difference?

Interesting. This probably can become an issue with some script.
Calling recent file is same as "close, open" but "reopen" is special atomic procedure. However the only case where it makes difference is the dialog telling the timeline becomes shorter and you can lose some edits. From there you can choose "cancel", in which case the whole reopening is aborted and you are left with previous state unchanged.

wonkey_monkey
15th February 2019, 00:24
Hey shekh, I know I've already asked for a lot of stuff, but would you consider adding an option to disable the grey frame that comes up when you reach the end of the timeline? It can be jarring when scrubbing back and forth.

Seeing the frame count at the end of the timeline is nice, but if you could add an option to make it impossible to actually reach that last point, it'd be really great.

shekh
15th February 2019, 11:58
I have an idea. There is this feature which can work: go to last visible frame, press "set selection end" (to select entire timeline but the last frame), press Go->Zoom selection. In this mode you will not see the gray "past the end frame".
What is missing probably, I should enable "Zoom selection" doing exactly this when there is no timeline selection initially. Would be easy.

Btw,
I just updated and now I find that VirtualDub2 remembers zoom levels from when I last closed it. This, I think, is different to the previous behaviour, where files were always first opened at 100%.
The option exists now: preferences->Main->Remember autosize and zoom

nji
25th February 2019, 16:33
As far as I understand the matter of direct stream copy of audio
it is only possible by reading the audio by another codec.
As the standard codecs decode both video and audio.
Right?

OK, as mostly I only change visible effects in the video
(no fps change etc.) my typical work flow is to use
"direct stream copy" with "from another file".
This works well for MP4(AVC,AAC), by reading the audio
with the "Quick Time decoder".
But - as I now discovered - fails for WMV9 (even if both
audio/ video are CBR), reading the file with the WMV plugin (by fccHandler).
The audio is out of sync (too late).

What did I do wrong?

nji
26th February 2019, 09:53
Anybody to confirm that effect?

shekh
27th February 2019, 06:55
Hi nji,
In some file types audio has relative offset to video and this offset is ignored when using "audio from other file". Maybe this is the case. I can tell better if I look at specific sample, can you share it?

nji
27th February 2019, 10:07
Hi shekh.

The effect seems to be with every typical WMV file (WMV9/ WMA2, even if both CBR).
And it differs from file to file (sometimes it's about -600ms, sometimes about -700ms, ...).
While I'm not sure if it's an absolute offset at all, but non-linear.
I had a look with MediaInfo, but there's no entry about audio offset.

I would like to point out that I'm not trying to do some very unusual thing.
It's just that I want to improve some older videos by light, color.
No timeline change, no audio change.
And of course I would like audio leave untouched then.
But - if I get all this right ... (do I?) - for this I have to get a
second import filter for that format, import audio separately with that,
and for "some (which?) file types" (your quote) still get wrong results?

Isn't that kind of ... horrible?

Or is my thinking wrong somewhere, and there is a simple workflow for that
simple task?

shekh
27th February 2019, 19:12
The whole application is not seamless. Simple workflow is full processing (video and audio). Anything involving direct copy has caveats, something works something not, I would not call this simple.
Please understand vd2 is product of different motivation. The original was meant to perform direct copy - abandoned by all developers. I mostly concentrate on full processing. As you see utilizing both these pieces at the same time is problematic.

Direct copy may look like simple concept, but implementation is not easy, for example, mkvmerge has incredible amount of code and it "just" does direct copy of some formats.
Considering the WMV problem, will see if I find it fixable

nji
27th February 2019, 21:13
Hi shekh.

Thankyou for your explanation.

Please don't get me wrong - it is not meant demanding.
(Actually I'm very grateful for your great work on vd2).

Being mostly a user, with a little knowledge here and there,
I am often suprised by all that pitholes.
(Said between us:
If I was to design the technology of video in a most confusing way...
I wouldn't have enough creativity to reach what is given now ... ;-))

OK, maybe my newbies' feedback still is kind of useful for you?

If one just wants to improve the video (without changing timeline)
and lets the audio at "copy", he would expect to have that done.

searching for another input filter (if exist at all),
setting "from another file",
all this is not so nice.
(Even worse if the result of all this is wrong then (de-sync)).

Isn't there a way to copy the audio without a different input filter?
For example by reading the file by a second instance of the given filter?



In the meantime I searched for infos about wmv/wma and audio issues
- without success.
As mentioned, no info about the audio offset shown.
But it must be somewhere (?).

On the other side:
Maybe for the professionals it's a strange combination I produced:
MKV container with AVC and WMA?
But to decrease the audio quality without need ...?

Greetings :)

shekh
27th February 2019, 21:46
In fact I started to fix the audio copy issue (I agree it is annoying), but you know there is always lack of time for something.

If I was to design the technology of video in a most confusing way...
I wouldn't have enough creativity to reach what is given now

This is brilliant :)

Taurus
27th February 2019, 23:18
If I was to design the technology of video in a most confusing way...
I wouldn't have enough creativity to reach what is given now ...

Yeah, this what I'm thinking every other day!

wonkey_monkey
4th March 2019, 17:44
I recently updated to the latest version and it now seems that copying (CTRL+1, CTRL+2) doesn't work. Photoshop complains of "unexpected end-of-file" and Ditto (clipboard manager) doesn't show a thumbnail as it used to.

Edit: 43385 seems to fix it.

lansing
13th March 2019, 08:00
I'm requesting new feature, I want to go through a video and save a lot of screenshots manually. Right now I can set a hotkey to trigger the "file.saveImage" event, but it'll come with a prompt and file name of the saving image was defaulted to the file name of the video. So the work flow not good. I want something like setting an image location and then when I press the hotkey, the image will be save automatically to the folder with a unique image file name, and no prompt.

shekh
13th March 2019, 11:02
I'm requesting new feature, I want to go through a video and save a lot of screenshots manually. Right now I can set a hotkey to trigger the "file.saveImage" event, but it'll come with a prompt and file name of the saving image was defaulted to the file name of the video. So the work flow not good. I want something like setting an image location and then when I press the hotkey, the image will be save automatically to the folder with a unique image file name, and no prompt.

Hi. The way I want to do it:
first set markers for all desired frames
then use "Save image sequence" and enable "save what: markers" option. The option needs to be implemented.

I might also do as you describe but it means adding some hidden file.SaveImageWithoutAsking command. Need to think about it.

lansing
13th March 2019, 18:02
Hi. The way I want to do it:
first set markers for all desired frames
then use "Save image sequence" and enable "save what: markers" option. The option needs to be implemented.

I might also do as you describe but it means adding some hidden file.SaveImageWithoutAsking command. Need to think about it.

Saving images as hotkey pressed gives me more control, I can get access to the saved image right away. It is similar to how the capture mode saving works, you first set a location and a base file name, and then every captured video was auto saved to that folder with filename + some increment number.

With "set marker->save image sequence", I can't access the images until the whole thing was finished.

wonkey_monkey
24th March 2019, 00:21
I'm not sure if this is a VirtualDub2 problem, but the following Avisynth script:

colorbars(pixel_type="rgbap8")

comes out all messed up. I was surprised it worked at all, given that VirtualDub2 doesn't understand pixel_type="rgbp8" (no alpha). Is it mistaking RGBAP8 for some other colour space?

Tehnicni
24th March 2019, 00:38
Attached you have 2 crops, 1st is from 1920 x 1080 picture (which I first resize from 12M pixels origin in VirtualDub) and 2nd from Print Screen how is these picture look opened in VirtualDub. Because of these I get ugly banding in time lapse video. https://youtu.be/IFP4W7nd9VM If I open (in VirtualDub) origin 12M pixels picture and downsize it to 1920 x 1080 with the same resize plugin, there is no banding. https://youtu.be/_zdAa1RwUvM
Without youtube reencoding banding in upper left corner is much uglier.
I also tried with VirtualDub 1.10.4 and it's the same.
I tried the quality of jpeg coding (in exporting downsized image in VirtualDub) 95 and 100 and it's the same.

Added later: Video make with VirtualDub with h264 8bit codec CQP 20 on my Dropbox
https://www.dropbox.com/s/9wzgh4wld5pm6iu/FromResizedImage550Q20.mp4?dl=0

Quite unusual, but for a sunset time lapse very serious mistake. In fact virtualdub it's for me, for time lapse, unusable.

shekh
24th March 2019, 02:48
I'm not sure if this is a VirtualDub2 problem, but the following Avisynth script:

colorbars(pixel_type="rgbap8")

comes out all messed up. I was surprised it worked at all, given that VirtualDub2 doesn't understand pixel_type="rgbp8" (no alpha). Is it mistaking RGBAP8 for some other colour space?

rgbap8 and rgbp8 work for me but I have installed intermediate build of avs+ Pinterf gave me.
Which version of avs+ you have?

shekh
24th March 2019, 11:40
Tehnicni

It's all unclear. Do you mean
1. you have jpeg image (created in which program?)
2. vdub opens it with loss of quality?

If this is correct please share the image as is so I can examine it.

Tehnicni
24th March 2019, 13:27
Tehnicni

It's all unclear. Do you mean
1. you have jpeg image (created in which program?)
2. vdub opens it with loss of quality?

If this is correct please share the image as is so I can examine it.
I'm sorry, as usually the main thing I forget. Here's the original picture https://www.dropbox.com/s/g9t47up1e5u2kwb/Im0630.jpg?dl=0 . Open it in VirtualDub, aplay crop (bottom 400, top 356), resize it to 1920 x 1080 with Precise Bilinear and export it as .jpg. Then import the same (downsizes) picture into VirtualDub and you will get streaks (band) around the colored cloud above slightly left on the picture.
Downsized image if you would need it: https://www.dropbox.com/s/65ibgcuxb4jai68/ImHD0630.jpeg?dl=0
It seems to me that the Precise bilinear resize already changes the (round) cloud, perhaps because the downsizeing removes the noise.

PS: I'm working Time Lapse through the exported images, because I process them before re inported it into VirtualDub for making video.

wonkey_monkey
24th March 2019, 13:36
rgbap8 and rgbp8 work for me but I have installed intermediate build of avs+ Pinterf gave me.
Which version of avs+ you have?

r2768.

RGBP8 results in "Couldn't locate decompressor for format '8BPS' (unknown)", while RGBAP8 looks like this:

https://i.imgur.com/xXmXTkH.png

shekh
24th March 2019, 23:29
wonkey_monkey

avs+ needs a new build, there were changes. 8BPS output is deprecated (the fourcc is actually reserved by compressed format). Cant explain rgba picture but it is related for sure.

shekh
25th March 2019, 00:48
Tehnicni

I think there is subtle difference in decoding jpeg. Luckily there is an option: in the file open dialog change "input driver/open using" dropdown to "Caching input driver". The result looks smoother to me this way, but the difference is so subtle it is hard to tell what is ground truth.

Note: Caching input driver (using ffmpeg decoder) emits picture in YCbCr 4:2:2 format which I think is good because you do resize (this way should preserve details better).

pinterf
25th March 2019, 10:18
I'm not sure if this is a VirtualDub2 problem, but the following Avisynth script:

colorbars(pixel_type="rgbap8")

comes out all messed up. I was surprised it worked at all, given that VirtualDub2 doesn't understand pixel_type="rgbp8" (no alpha). Is it mistaking RGBAP8 for some other colour space?
VDub2 works fine with 8 bit planar RGB formats when using with the latest (not yet released) Avisynth+.

Tehnicni
25th March 2019, 23:04
Thanks shekh, Cashing driver is right solution.
I attached a series of pictures, the name says it all.
Let say 1st: File "Im0630" in 4K format Open with Cashing driver, Precise bicubic Resize and Crop, Exported, ReOpen with Cashing driver, Level (black 30, White 140) and finaly export single image.
The last two was exported and reloaded 3 times, so the error has multiplied 3 times.
A lot of distortion I think.

Tehnicni
25th March 2019, 23:30
I forgot a picture wich was 2 times opened with Cashing driver without level correction.
Without bands.
:thanks:

Added later: Too much joy leads to problems:(. Cashing driver rejects pictures from my ID. I'm trying to change Cashing driver settings, but no go. Here is picture from my IDE https://www.dropbox.com/s/rkwcbp16yyhm5x2/Im0860.jpeg?dl=0

shekh
26th March 2019, 02:43
I don't see your pictures, please use dropbox instead of forum attachments.
And I can't follow your description. "The last two was exported and reloaded 3 times" what this really means?
It seems you are doing something pointless. Using jpeg as intermediate is bad idea, this is not lossless format. Look at this: https://en.wikipedia.org/wiki/Generation_loss
Use tiff, tga, png.

"Cashing driver rejects pictures https://www.dropbox.com/s/rkwcbp16yy...0860.jpeg?dl=0"
I can open this file without issues.

Tehnicni
26th March 2019, 03:20
Strange, I can see all 4 attached picture after clicking link.

Yes, I open and export .jpg 3 times to enhance error that you can maybe see where is a problem and to decide to change internal jpg codec :) With Cashing driver there is no noteable difference.

My IDE support only jpg and png :(

Problem with picture Im0860 is in different color subsampling then previous 859. So if you open Im0859 https://www.dropbox.com/s/svr3cjw4l63r1mk/Im0859.jpeg?dl=0 as a picture sequence with Im0860 in the same folder, Im0860 produce error. With internal jpg codec there is no error.

shekh
26th March 2019, 10:09
Right, sequence of mixed formats is not supported.
I agree, jpeg support could be updated. It is also very inefficient at encoding.

nji
1st April 2019, 12:19
I would like to ask if the audio copy issue
(as discussed in https://forum.doom9.org/showthread.php?p=1867019#post1867019)
will be fixed at some time.
I ask because I paused working on WMV files with VD2
because I would have to accept unnescessary audio degradation
(re-encode the audio, although I don't change it at all).
(I tried by myself to workaround the issue...
extract audio stream (ffmpeg, asfbin, ...) and re-add,
but the out-of-sync/ delay effect always occurs.
And haven't found any hint why and by what amount).
Have you been successful on this shekh?
And if - will there by an improved VD2 sometimes (soon)?

shekh
1st April 2019, 12:47
Honestly since that message I made no progress on audio. It is still on priority but it will be done when its done.

nji
1st April 2019, 12:56
OK then. :thanks:

wonkey_monkey
1st April 2019, 18:51
VirtualDub2 has been taking a long time to open for the last couple of weeks - just the first time after a reboot, it seems. Is there anything I can do - command line switches or anything - that might give a clue as to why it's so slow to start?

Tehnicni
1st April 2019, 22:52
Does anyone know how to convert hundreds of raw (eg Panasonic rw2) images into 16 bit tiff without gamma correction, that I can opened in VirtualDub2 for Time lapse.
I've tried different SW, but I always get a gamma corrected images, which is far from raw data.

Groucho2004
1st April 2019, 23:24
Does anyone know how to convert hundreds of raw (eg Panasonic rw2) images into 16 bit tiff without gamma correction, that I can opened in VirtualDub2 for Time lapse.
I've tried different SW, but I always get a gamma corrected images, which is far from raw data.I presume you have tried RawTherapee, SilkyPix and the likes?

lansing
2nd April 2019, 09:28
Does anyone know how to convert hundreds of raw (eg Panasonic rw2) images into 16 bit tiff without gamma correction, that I can opened in VirtualDub2 for Time lapse.
I've tried different SW, but I always get a gamma corrected images, which is far from raw data.

Do you mean curve not gamma?

Tehnicni
2nd April 2019, 10:16
I presume you have tried RawTherapee, SilkyPix and the likes?

Of course. I would like RAW data before gamma and tone curve correction. Only lens and chromatic aberration correction.

shekh
2nd April 2019, 13:30
Of course. I would like RAW data before gamma and tone curve correction. Only lens and chromatic aberration correction.

I have tried to make input driver based on libraw. I can share it but the problem is per-image metadata which I have nothing to do about.
If you can deal with just pixels it will do the job.

Btw I think dcraw command line has options to turn off any unnecessary processing, the input driver I mentioned above is merely a handy way to read bayer pixels without external tools.

Tehnicni
2nd April 2019, 19:44
I'm afraid I do not have enough knowledge for anything like that. The problem is that it would need partially processed RAW data, lens and chromatic aberation.

I'm looking for a holy grail, perfect sunset time lapse.:)
My idea is to (on the basis of shutter information and the tendency of darkening) multiply raw pixels with a changing factor, to get a smooth transition from day to night. Lightroom & LRTimelapse is not good enough for me. I have IDE for basic picture manipulation to do some functions. Not enought for let say perfect resize. VirtualDub precise bilinear resize (~4K to 2K) do realy great job, they greatly reduce noise.

shekh
2nd April 2019, 20:26
This is something else. At first I thought you want the 'rawest' bayer picture.
I'm too no raw expert, afaik the processing is something like this:
1. debayer (demosaic)
2. normalization (using various curve/matrix stuff embedded in picture)
3. lens/aberration (or it can be before #2, idk)
4. user adjustments
5. tonemapping (shrinking to 8 bits and limited dynamic range)

So do you mean you want to mathematically control #4 to apply transition? And without it, the sequence is perfectly smooth, without any jumps?
In that case sounds like you want to export to some hdr format.

Tehnicni
2nd April 2019, 21:29
Sequence is not perfectly smooth, because in Auto Exposure mode shutter time jump in ~2% steps, so you get fast micro flickering (5 flicker/s) which is mainly seen as fast moving pixelation and banding. Deflickering is not a solution because if pixel binary value is let say 50, changing value for +-1% produce no change (50.4999 = 50).

My idea is to use a fixed exposure and manually changing it as needed, let say 1/2 EV every few minutes douring darkening. Or to use external intervalometer with standard auto shutter mode (with fixed ISO and apperture) and hope, that you get much bigger shutter jump, so pixelation and banding change in slow step. Then simultaneous deflickering and ramping.

My video with fast moving pixelation and banding, especially in fadeout portion. Best seen on high contrast OLED display like Samsung Galaxy S7
https://www.dropbox.com/s/lne9vsg1sa6ap24/YUV444Q18_7%2C4Mb.mp4?dl=0

shekh
3rd April 2019, 09:48
Nice view. But I see prominent jumps in overall brightness, much bigger than "moving pixelation".
Some silly idea: what if you apply deflickering to initial bayer image (which is closest to exposure math), and store it back to raw format, to trick LightRoom that shutter steps were much finer than 2%. :)
Also maybe possible to do deflickering on 16-bit tiff export (do you process jpegs)?

Tehnicni
4th April 2019, 00:28
I'm working with jpeg, because I can't inport dng in VD. All dng SW with tiff export option export gamma corrected pictures. I'm working with Panasonic raw and found, that in 16 bit tiff all useable data is in upper 8 bits, so there is almost no difference versus jpg.
After half a year of bumping, today I find banding and pixelation (which I talking about in previous post) to cause OLED display - horible. On LCD there is almost no banding and pixelation.

I remembered MSUdeflicker 1.3 and got quite decent and well compressed Time lapse. A small secret, the images were captured with the Samsung Galaxy S7 :)
It's OK for LCD displays, but there is no hope for OLED :) :(
https://www.dropbox.com/s/a7e03xfq9zpohrt/YUV444Q22DeflickerMSUwithPeriodDef_defaultSet.mp4?dl=0

SeeMoreDigital
4th April 2019, 09:27
I'm working with jpeg, because I can't inport dng in VD. All dng SW with tiff export option export gamma corrected pictures. I'm working with Panasonic raw and found, that in 16 bit tiff all useable data is in upper 8 bits, so there is almost no difference versus jpg.Personally I don't create JPEG still image sequences, I convert to PNG, which work well with VirtualDub...

Tehnicni
7th April 2019, 23:07
Nice view. But I see prominent jumps in overall brightness, much bigger than "moving pixelation".
Some silly idea: what if you apply deflickering to initial bayer image (which is closest to exposure math), and store it back to raw format, to trick LightRoom that shutter steps were much finer than 2%. :)
Also maybe possible to do deflickering on 16-bit tiff export (do you process jpegs)?
I have tried MSU deflicker v1.3 and in normal mode works fine. If I set 1st and 3rd setting on max, the result is perfect, no flicker.
With 10% jumps in brightnes MSU deflicker does not work.

Tehnicni
8th April 2019, 01:05
From SilkyPix I exported 16 bit tiff (from Panasonic rw2 RAW), imported it into RAWTherapee, raised exposure compensation on 8, and exported part of the picture in jpg, to see the bit depth of the tif image. For comparison, I added also a picture made from 8 bit tiff.
The same 16 bit tif images imported into VirtualDub2 with the level filter input white level 31 gives the image with less bits, posterization is seen in the dark parts of the image.

I can upload the original RW2 (22MB) or 16bit tif (117MB) to my Dropbox.

ChaosKing
8th April 2019, 08:35
@Tehnicni "Attachments Pending Approval" it can take very long on this board. Better use an external service, like dropbox.

shekh
8th April 2019, 09:53
I can upload the original RW2 (22MB) or 16bit tif (117MB) to my Dropbox.

Not sure what I could do with rw2 but it is good to have just in case.
16bit tif: if it is too big you can crop some smaller piece (vd2 should not spoil it if you just use open, crop, save image).
Do you think the 8-bit and 16-bit tiiffs from SilkyPix are otherwise identical? 16-bit may be in linear light or something.

A thing to keep in mind is pixel formats conversion.
Few filters can work with 16 bits, for the rest the image is downconverted (to rgb32 for most 3rd party filters like MSU).
If in doubt look at the filters gui, it shows formats before/after.
https://i.postimg.cc/3xKNTv4N/filters.png
So if you want to tweak 16-bit don't use "levels"; try "rgb levels" or "6-axis color".

Stereodude
8th April 2019, 16:31
FFMPEG's compression options don't work with Fast recompress Mode. Is that expected? I have a YUV420 source. I'm saving to YUV420. The compression settings show no conversion is necessary. But when I try to save the AVI file I get the following error, "Video format negotiation failed: Use normal-recompress or full mode". Isn't that going to result in no longer lossless handling of the input file to FFMPEG with a unnecessary color space conversion to RGB and back to YUV420?

shekh
8th April 2019, 18:44
FFMPEG's compression options don't work with Fast recompress Mode. Is that expected? I have a YUV420 source. I'm saving to YUV420. The compression settings show no conversion is necessary. But when I try to save the AVI file I get the following error, "Video format negotiation failed: Use normal-recompress or full mode". Isn't that going to result in no longer lossless handling of the input file to FFMPEG with a unnecessary color space conversion to RGB and back to YUV420?

This is weird, will look into issue (repeated with FFV1 codec).

However, I have trouble getting "fast recompress" concept.
From docs:
VirtualDub automatically chooses a intermediate video format to use between the codecs
Indeed, historically the choice for output format is disabled.
To me, this is least conservative promise.

If you want to control unnecessary conversion, is is better to rely on the line "no conversion necessary" in normal/full mode. If the conversion is necessary you can still see if it is trivial like YUYV->YUV422 or involves any colorspace change.

Tehnicni
8th April 2019, 22:04
rgb level works very weird, see the orange surface behind the fence which became yellow regardless of the illumination. Gray is now OK.

Source 16 bit tif https://www.dropbox.com/s/dygmdo08knofla0/FZ1000_16bitCrop.tif?dl=0

It would be a good idea to add an Exposure correction slider to the rgb level plugin.

shekh
9th April 2019, 00:40
This is normal for per-channel clipping. If you amplify orange by 4 both r+g channels are maxed out.
What is exposure correction? "6-axis" has intensity slider, it works in YCbCr space / better for color consistency.

Your attachments are only visible to you, try to log off and view this page. Use service like postimages.org
I used to report posts with attachments and now the report button is gone! Is it just me? Maybe moderator had fed up with it :)

Tehnicni
9th April 2019, 01:26
These all around yellow is because these orange have no blue :)

Attachment can download those who have Dropbox account.

For exposure correction I don't know exactly. Effect must be the same as shutter increase or decrease, 1 step in exposure correction is the same as doubling shutter time (1 stop).

Tehnicni
9th April 2019, 23:44
Rgb scale filter is OK for exposure correction, but I could not found tone curve filter (level filter with more point between input black and white level) or level filter for 16 bit source. These type of filter is esential for transformation 16 bit source to 8 bit output, let say to create HDR.

osgZach
10th April 2019, 07:04
Has anyone noticed issues with hotkeys. I'm trying to assign hotkeys for starting/stopping video capture, while in video capture mode, but they never work unless the program has focus

lansing
17th April 2019, 21:30
I have a frame counting problem with the program. I was loading the same vpy file with vs editor and virtualdub2, while both shows a total frames of 62, vs editor ended at frame 61 but vd2 ended with a gray frame at frame 62.

LigH
17th April 2019, 21:44
Yes, the additional gray frame is just virtual, it was already so in Avery Lee's original, for a reason ... I believe you have to be able to set the end of a cut range behind the last frame to be exported.

shekh
18th April 2019, 00:34
This was mentioned few pages back :)
There is "zoom timeline" mode which can be handy for other purposes but you can also do this: right after opening source press Go->Zoom selection. The virtual frame will be out of reach.

lansing
18th April 2019, 23:30
This was mentioned few pages back :)
There is "zoom timeline" mode which can be handy for other purposes but you can also do this: right after opening source press Go->Zoom selection. The virtual frame will be out of reach.

The "go->zoom selection" option was grayed out when the script was first opened. It's just weird to have a frame on the timeline that doesn't belong to the clip.

wonkey_monkey
19th April 2019, 02:48
It's because setting an in-point is inclusive (the frame selected will be in the trimmed clip) but the out-point is exclusive (the frame selected will NOT be in the trimmed clip). This makes a certain amount of sense from a mathematical point of view - if you want a 50-frame clip, you select your in-point, then jump ahead 50 frames and selected your out-point.

Avisynth's in- and out-points are both inclusive, which is why trim(0,100) produces a 101-frame clip, not a 100-frame clip. That feels less sensible to me.

shekh
1st May 2019, 12:57
New build (43602), took a bit long to arrive.
In "other fixes" addressing some issues raised in the thread:

1) Blending inaccuracy in fflayer filter: fixed. (The original question was about logo, it still has the problem).
2) Quick saving of images: the File->Save image now offers unique (numbered) filename, also File->Save image (skip dialog) shortens the operation even more.
3) FFMPEG's compression options don't work with Fast recompress Mode: fixed.

kolak
13th May 2019, 18:48
Could we have ProRes presets updated so they better match official profiles (in this case ProRes_ks is better). It will be slower, but more Apple alike.

We need color tag as well, so parameters like this for ProRes HQ:

-metadata:s "encoder=Apple ProRes 422 (HQ)" -vendor apl0 -movflags write_colr -c:v prores_ks -flags "+bitexact"

Then also have interlaced box (+field order) to tick which adds:

-vf "setfield=1, fieldorder=tff" -top 1 -flags "+ildct+ilme+bitexact"

*tff or bff (and top 1 or 0)

This way we enforce proper interlaced encoding.

I'm not sure about this bit, but if you can set:
AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.

stax76
13th May 2019, 19:56
@shekh

I noticed main menu > File is very large, it might make sense to use some sub menus.

The icon looks nice (how did you create it?) and everything scales very well using 288 DPI, I wonder how hard it is doing all this with plain win32, even with advanced layout controls I had many difficulties using WinForms to implement High DPI.

Avery Lee is known to be an excellent dev, did you have a good experience working with his code base?

shekh
13th May 2019, 20:09
Could we have ProRes presets updated so they better match official profiles (in this case ProRes_ks is better). It will be slower, but more Apple alike.

We need color tag as well, so parameters like this for ProRes HQ:

-metadata:s "encoder=Apple ProRes 422 (HQ)" -vendor apl0 -movflags write_colr -c:v prores_ks -flags "+bitexact"

Then also have interlaced box (+field order) to tick which adds:

-vf "setfield=1, fieldorder=tff" -top 1 -flags "+ildct+ilme+bitexact"

*tff or bff (and top 1 or 0)

This way we enforce proper interlaced encoding.

I'm not sure about this bit, but if you can set:
AVFormatContext.flags |= AVFMT_FLAG_BITEXACT.

> Could we have ProRes presets updated so they better match official profiles

Any hint how to do this? proresenc_kostya.c has prores_quant_matrices, do you mean to change that?

> -metadata:s "encoder=Apple ProRes 422 (HQ)" -vendor apl0 -movflags write_colr -c:v prores_ks -flags "+bitexact"

From this I understand:
-movflags write_colr: ok
-vendor apl0: ok
"encoder=Apple ProRes 422 (HQ)": can you help with all possible strings?
-c:v prores_ks: this is what I used anyway
-flags "+bitexact": can you provide any background on what it means?

> -vf "setfield=1, fieldorder=tff" -top 1 -flags "+ildct+ilme+bitexact"

setfield: ok
fieldorder: ok
ildct+ilme: ok
top: as I read it belongs to chroma location which can have 7 different values. This is disturbing option.
I think it is better if it is understood by the pipeline. Wondering how big is this problem? Can you have in practice only 422-top or anything else?

shekh
14th May 2019, 01:05
I noticed main menu > File is very large, it might make sense to use some sub menus.

Agree, something needs to be moved or deleted.



The icon looks nice (how did you create it?) and everything scales very well using 288 DPI, I wonder how hard it is doing all this with plain win32, even with advanced layout controls I had many difficulties using WinForms to implement High DPI.

Avery Lee is known to be an excellent dev, did you have a good experience working with his code base?

You mean the main icon? This was long trial and error. When I was almost fine with general look I made it as vector painting in Photoshop, then rasterized it in some practical resolutions, fixed some shapes, experimented with colors. The final image is combination of multiple resolutions. Down to 48x was easy from vector source, the smaller the more hand correction was necessary, and finally 16x I painted pixel by pixel.

DPI works automatically with standard controls like dialog with fonts and buttons. But it is a lot of trouble when doing any custom graphics. The timeline toolbar (position control) had a lot of scaling issues, I changed big part of its code. Overall IMO working with plain win32 GUI is like assembly, it is very slow to code but the documentation is mostly perfect and it can work.
Bitmaps with system colors (like toolbar icons) that can scale:
https://github.com/shekh/VirtualDub2/blob/a50fc6c58c0a529014b4c81062d0d5b84322dec2/src/VirtualDub/source/PositionControl.cpp#L132-L161
And then of course I maintain the created bitmap and redo it again if any scaling or system color parameters change.
Not too bad thanks to LR_LOADMAP3DCOLORS flag, otherwise would require to decode down to pixels and remap colors. Few dozen more lines of code...
In better GUI systems all this is standard function which doesn't need any implementation at all (not sure how is WinForms).

Did I have a good experience working with the code base:
I had all kinds of experiences. In most part I feel comfortable. I still don't know how to treat library names. Ami, Asuka, Dita, Kasumi and so on. Are these his girls? (ok got it, most likely anime heroes) To me looks like nonsense1, nonsense2, ... I never remember which one I need.
I hate almost everything about coding style: use of white space especially tabs, hungarian notation, multi-line parameter lists...
I like that the project is easy to build (very few dependencies). I like parts which are very simple, e.g. direct use of win32 API etc.

kolak
14th May 2019, 09:26
> Could we have ProRes presets updated so they better match official profiles

Any hint how to do this? proresenc_kostya.c has prores_quant_matrices, do you mean to change that?

> -metadata:s "encoder=Apple ProRes 422 (HQ)" -vendor apl0 -movflags write_colr -c:v prores_ks -flags "+bitexact"

From this I understand:
-movflags write_colr: ok
-vendor apl0: ok
"encoder=Apple ProRes 422 (HQ)": can you help with all possible strings?
-c:v prores_ks: this is what I used anyway
-flags "+bitexact": can you provide any background on what it means?

> -vf "setfield=1, fieldorder=tff" -top 1 -flags "+ildct+ilme+bitexact"

setfield: ok
fieldorder: ok
ildct+ilme: ok
top: as I read it belongs to chroma location which can have 7 different values. This is disturbing option.
I think it is better if it is understood by the pipeline. Wondering how big is this problem? Can you have in practice only 422-top or anything else?

Different profiles HQ, LT etc are basically encodes with specific Q level.
You control it with -profile:v flag. Options are here:
https://ffmpeg.org/ffmpeg-codecs.html#ProRes

If you specify both: profile and Q then Q overwrites profile (so for official profiles we want just profile flag). Q allows you to make any quality ProRes files up to almost lossless, but this is outside Apple official profiles (still useful to have as advanced mode). ProRes_ks better simulates Apple one as it has bitrate restrictions. Ffmpeg prores uses higher bitrate which provides bit better quality, but it rather poorly simulates official encoder. Maybe you can have both as an option. In this case use number for profiles as text naming doesn't work for prores encoder: [0 - apco, 1 - apcs, 2 - apcn (default), 3 - apch, 4 - ap4h, 5 - ap4x]. Apco is proxy profile, apcs is LT.

Strings for all official naming:

Proxy profile="Apple ProRes 422 Proxy"
LT profile="Apple ProRes 422 LT"
Standard profile= "Apple ProRes 422"
HQ profile= "Apple ProRes 422 HQ"
4444 profile="Apple ProRes 4444"
4444QX profile="Apple ProRes 4444 XQ"

bitexact will remove Software=Lavfxxxx metadata in MOV container. Can be useful, but not essential.

top is not about chroma location, but field order, so it basically tells ffmpeg to set field order flagging. It's somehow the same as fieldorder=tff and may be redundant, but it's safer to have it as well. Both should be aligned and have tff(1) as default (bff is needed very rarely).

Least note- color tags are written by the default based on resolution/fps. You can force them as well using correct flagging: https://trac.ffmpeg.org/wiki/colorspace. Default behaviour is fairly good though (at least for HD, PAL/NTSC SD formats).

shekh
14th May 2019, 22:17
@kolak
It seems everything is clear, added request to self https://sourceforge.net/p/vdfiltermod/tickets/244/

stax76
14th May 2019, 22:17
@shekh

Thanks for the insight. In the DivX and XviD days, VirtualDub was the main encoding app used by StaxRip.

kolak
14th May 2019, 22:31
@kolak
It seems everything is clear, added request to self https://sourceforge.net/p/vdfiltermod/tickets/244/

Ok, thanks.

age
17th May 2019, 10:57
Least note- color tags are written by the default based on resolution/fps. You can force them as well using correct flagging: https://trac.ffmpeg.org/wiki/colorspace. Default behaviour is fairly good though (at least for HD, PAL/NTSC SD formats).

When I encode prores HQ with ffmpeg ( and virtualdub) it outputs always the same matrix "BT.470 System B/G".

During the encoding in ffmpeg I'm forced to use the PRORES_METADATA

https://ffmpeg.org/ffmpeg-bitstream-filters.html#prores_005fmetadata

shekh
17th May 2019, 12:59
When I encode prores HQ with ffmpeg ( and virtualdub) it outputs always the same matrix "BT.470 System B/G".

During the encoding in ffmpeg I'm forced to use the PRORES_METADATA

https://ffmpeg.org/ffmpeg-bitstream-filters.html#prores_005fmetadata

It is not the same as "-movflags write_colr"? Madness.

kolak
18th May 2019, 00:10
When I encode prores HQ with ffmpeg ( and virtualdub) it outputs always the same matrix "BT.470 System B/G".

During the encoding in ffmpeg I'm forced to use the PRORES_METADATA

https://ffmpeg.org/ffmpeg-bitstream-filters.html#prores_005fmetadata

Latest ffmpeg should set correct flags on private ProRes headers and MOV container level.
If source has known parameters then ffmpeg by default will write them into private ProRes headers (as long as supported). In order to have this info also on container level you need to use "movflags write_colr" and tell ffmpeg what you want there with: -color_primaries, -color_trc, -colorspace options (otherwise it will write default values which is Rec.709 or Rec.601 depending on resolution). If parameters are missing on the source file then you need to tell ffmpeg what they are on input and what you want on output (+ info for movflags as in 1st case). It's bit crap that you need 2 sets of flagging in order to have 100% correctly flagged ProRes file (on container and private headers). Of curse those values should be always aligned.

Example 1 (source without known flagging):

..... -vf colorspace=iall=bt2020:all=bt2020 -color_primaries 9 -color_trc 14 -colorspace 9

in this case we tell ffmpeg that our source is Rec.2020 (iall) and we want to keep it this way (all) and also add flagging on container level as Rec.2020.

Example 2: (source with known flagging as Rec.2020):

-color_primaries 9 -color_trc 14 -colorspace 9

In this case we need just info for movflags option as private headers will be set to match source.

There are many options for colorspace filter which also allows for conversion between different color spaces. Doc:
https://ffmpeg.org/ffmpeg-all.html#toc-colorspace

You can achieve the same with zimg scaling as well which is very high quality filter. In both filters key point is fact that source flagging needs to be known- be on source or set by you. Without it you will have errors as ffmpeg won't know what to start with. All of this applies to prores and prores_ks encoders.

kolak
18th May 2019, 00:22
It is not the same as "-movflags write_colr"? Madness.

I thought it's but unfortunately it's way more complex (as described above).

shekh
18th May 2019, 10:22
Thanks for info. Btw, to differentiate encoders it is better to say prores_ks or prores_aw (they are named by author initials)

kolak
18th May 2019, 23:11
I think aw is more known as just prores in ffmpeg. Not sure. Ks is recognised as more Apple compliant.

wonkey_monkey
19th June 2019, 14:00
VirtualDub2 behaves strangely with this AviSynth+ script:

blankclip(pixel_type="rgbaps")
invert
converttoyv12

It seems to paint nothing in the panes (redrawing problems are evident if you drag the panes around, plus they darken when the window loses focus).

If you change converttoyv12 to converttoy8, you get colourful garbage, which may indicate an AviSynth+ problem but I'm not sure (since I can't read the output of "info" to determine what colourspace I've ended up with), but the redrawing issue with converttoyv12 indicates some kind of trouble with VirtualDub2 not sensibly handling unexpected data.

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

Edit: confusion abounds because converttoyv12/y8 don't actually change the bit depth, so the problem is just that VirtualDub2 doesn't display (or throw an error for) float data.

shekh
20th June 2019, 17:11
Edit: confusion abounds because converttoyv12/y8 don't actually change the bit depth, so the problem is just that VirtualDub2 doesn't display (or throw an error for) float data.

Yes, something bad with error handling.

StainlessS
20th June 2019, 21:17
Hi Shekh,

Simple script
Colorbars
Try Export single image fails to show file selector dialog box when Menu/View/Enable_Output_Pane/ is disabled, OK when enabled.
[not sure if intentional, if so then maybe could alert to failure reason]
Build 43602

Soulvomit
21st June 2019, 21:30
What are the chances of 32-bit ever being supported, if only for gamma-aware rescaling?

shekh
21st June 2019, 23:23
What are the chances of 32-bit ever being supported, if only for gamma-aware rescaling?

Not bad - there is internal FP32 format (rgb/rgba). There is no input support and I at least need to update "gamma" and "resize" filters.

Soulvomit
29th June 2019, 02:44
Not bad - there is internal FP32 format (rgb/rgba). There is no input support and I at least need to update "gamma" and "resize" filters.Looking forward to it if you do decide to. Many thanks.

pinterf
1st July 2019, 12:49
Hi shekh, what are my choices when I'd like to display an RGB48 format from Avisynth+? Does VDub2 have any support for it on the VfW interface?
Right now I report BGR[48] (BGR0) but it is not recognized.
Or I'm doing something wrong.
Thanks.

shekh
1st July 2019, 13:27
Hi shekh, what are my choices when I'd like to display an RGB48 format from Avisynth+? Does VDub2 have any support for it on the VfW interface?
Right now I report BGR[48] (BGR0) but it is not recognized.
Or I'm doing something wrong.
Thanks.

Hi, such format is not supported. I think I should add decoding support for BGR[48] and b48r.
What's wrong if you add ConvertToRGB64 in script?

pinterf
1st July 2019, 13:38
Hi, such format is not supported. I think I should add decoding support for BGR[48] and b48r.
What's wrong if you add ConvertToRGB64 in script?
Nothing wrong. But if a user would like to display such a format in VDub2,
- user applies ConvertToRGB64 at the end of the script (inconvenience, conversion overhead)
- Avisynth+ silently converts it to RGB64 and reports one of the RGB64 fourCCs. (conversion overhead)
- VirtualDub2 handles FourCC BGR[48] (I don't know if there is any extra conversion overhead on your side)

shekh
1st July 2019, 15:59
Nothing wrong. But if a user would like to display such a format in VDub2,
- user applies ConvertToRGB64 at the end of the script (inconvenience, conversion overhead)
- Avisynth+ silently converts it to RGB64 and reports one of the RGB64 fourCCs. (conversion overhead)
- VirtualDub2 handles FourCC BGR[48] (I don't know if there is any extra conversion overhead on your side)

Ok. If I implement packed BGR the conversion will expand it to internal planar format. To minimize overhead the best option is planar RGB (G3[0][16]), so current workaround should be 'just remove ConvertToRGB48 at the end of script'.

pinterf
1st July 2019, 16:09
Ok. If I implement packed BGR the conversion will expand it to internal planar format. To minimize overhead the best option is planar RGB (G3[0][16]), so current workaround should be 'just remove ConvertToRGB48 at the end of script'.
I see. So it's better to convert it losslessly to planar rgb in Avisynth and report it as G3[0][16] then everybody is happy.

Now a similar workaround is working for the opposite direction: if planar rgb would not be supported, there is an optional rgb64 conversion if user wants to do so:
http://avisynth.nl/index.php/Internal_functions#OPT_Enable_PlanarToPackedRGB

thanks

Keiyakusha
2nd July 2019, 23:02
shekh
is there any chance you could add something like %(selectionstart) and %(selectionend) options to these (https://i.imgur.com/zQXGSGg.png) variables (external encoder) that would return frame numbers of the current selection (same values as in statusbar)?
Currently I am trying to use VirtualDub to cut some footage while saving to the intermediate format and these would help to form the filename to know where I made the cut from.

shekh
2nd July 2019, 23:33
Keiyakusha
This is easy, no problem.

albino
1st August 2019, 00:22
As a long long time user of Virtualdub, I thought it was high time I make the switch to Virtualdub2. Right off the bat though I noticed that my export speeds are much slower than in Virtualdub, so I'm wondering if I'm doing something obviously wrong.

I tested with Virtualdub 1.10.4 using DShowInputDriver against Virtualdub2 43702. I also tested with an old version of ffinputdriver I had available. I noticed it right away with every file I tried, but as a control for the results below I decided to use big_buck_bunny_1080p_h264.mov, saving only the first 1:00 in order to keep the testing time easy to manage. All of the files and programs are on my NVMe drive with an i7-7700K and Windows 10 Pro. Here's my quick test results in seconds:

Virtualdub1 (DShowInputDriver)
Uncompressed: 17
MagicYUV: 14

Virtualdub1 (ffinputdriver)
Uncompressed: 23
MagicYUV: 13

Virtualdub2 (default)
Uncompressed: 25
MagicYUV: 23

I also tested with Lagarith, and all three were about the same time (though over 50 seconds each). I tried opening the file with the cache on by default, and disabling it, but the times were identical either way.

At the end of the day, the time differences aren't that much unless you're doing something significant, but I just thought I'd ask here in case there's a plugin I'm supposed to be using, or if I should be disabling/enabling some option.

Thanks!

shekh
2nd August 2019, 12:24
As a long long time user of Virtualdub, I thought it was high time I make the switch to Virtualdub2. Right off the bat though I noticed that my export speeds are much slower than in Virtualdub, so I'm wondering if I'm doing something obviously wrong.

I tested with Virtualdub 1.10.4 using DShowInputDriver against Virtualdub2 43702. I also tested with an old version of ffinputdriver I had available. I noticed it right away with every file I tried, but as a control for the results below I decided to use big_buck_bunny_1080p_h264.mov, saving only the first 1:00 in order to keep the testing time easy to manage. All of the files and programs are on my NVMe drive with an i7-7700K and Windows 10 Pro. Here's my quick test results in seconds:

Virtualdub1 (DShowInputDriver)
Uncompressed: 17
MagicYUV: 14

Virtualdub1 (ffinputdriver)
Uncompressed: 23
MagicYUV: 13

Virtualdub2 (default)
Uncompressed: 25
MagicYUV: 23

I also tested with Lagarith, and all three were about the same time (though over 50 seconds each). I tried opening the file with the cache on by default, and disabling it, but the times were identical either way.

At the end of the day, the time differences aren't that much unless you're doing something significant, but I just thought I'd ask here in case there's a plugin I'm supposed to be using, or if I should be disabling/enabling some option.

Thanks!

This looks like terrible and unexpected difference.
Cache cannot help with sequential read - this is ok.
Some common ideas: are you comparing same architecture (x64 executables)?
Make sure the decode format is "autodetect", and there is no unwanted format conversion in the middle.
Run benchmark analyze pass or open Real-time profiler, it shows some performance details.
You can test all 3 input drivers in VD2

albino
3rd August 2019, 03:49
This looks like terrible and unexpected difference.
Cache cannot help with sequential read - this is ok.
Some common ideas: are you comparing same architecture (x64 executables)?
Make sure the decode format is "autodetect", and there is no unwanted format conversion in the middle.
Run benchmark analyze pass or open Real-time profiler, it shows some performance details.
You can test all 3 input drivers in VD2

Hey shekh!

* Decode format is set to Autoselect, I've never changed that option before. Virtualdub1 doesn't appear to have that option.

* I'm not sure what the benchmark is, but if it's Tools -> Benchmark Resampler then here is the outputs:


Virtualdub1 32 bit:

Point: 0.13 ms, 5896.9Mpixels/sec
Linear: 1.80 ms, 437.8Mpixels/sec
Cubic: 1.55 ms, 507.9Mpixels/sec
Lanczos3: 2.07 ms, 379.9Mpixels/sec

Virtualdub2 32 bit:

Point: 0.15 ms, 5314.0Mpixels/sec
Linear: 1.80 ms, 437.0Mpixels/sec
Cubic: 1.55 ms, 507.8Mpixels/sec
Lanczos3: 2.07 ms, 380.1Mpixels/sec

Virtualdub2 64 bit:

Point: 0.24 ms, 3219.2Mpixels/sec
Linear: 1.46 ms, 540.5Mpixels/sec
Cubic: 1.26 ms, 622.5Mpixels/sec
Lanczos3: 1.68 ms, 468.2Mpixels/sec


If it's some other benchmark, then just point me in the right direction.

* As a side note, benchmark-wise, just checking pure FPS, using MagicYUV the peak for Virtualdub1 32 bit was 113 fps, and the peak for Virtualdub2 64 bit was 64 fps.

* I'm not sure what I'm looking for with Real Time Profiler. If you want me to screenshot something specific while I'm running it, or after it finishes, let me know.

* My Virtualdub1 is 32 bit, and that was a good question, so I tried comparing it against both the 32 bit and 64 bit versions of Virtualdub2. I put DShowInputDriver in the plugins32 folder of Virtualdub2 because that's where it is in my Virtualdub1, and I closed and re-opened Virtualdub2 when switching between DShowInputDriver and the default decoder. Also, I re-ran Virtualdub1 again just to have a baseline. Here's my results:


Virtualdub1 (32 bit, default with no DShowInputDriver) - Error, can't load the mov file.

Virtualdub1 (32 bit, DShowInputDriver)
Uncompressed: 15
Magic: 13

----------

Virtualdub2 (32 bit, default)
Uncompressed: 25
Magic: 23

Virtualdub2 (32 bit, DShowInputDriver)
Uncompressed: 27
Magic: 24

----------

Virtualdub2 (64 bit, default)
Uncompressed: 26
Magic: 23

Virtualdub2 (64 bit, DShowInputDriver)
Uncompressed: 27
Magic: 23


I'm sure you already have it, but here's my copy of DShowInputDriver.vdplugin in case you want to test on your end:

https://we.tl/t-eJ0aNxyu5W

Let me know if you want me to test anything else, I'm happy to do so. Thanks!

wonkey_monkey
5th August 2019, 11:44
shekh,

Drag any YUV video onto VirtualDub2, add a levels filter (input 0-64, output 0-255) and it comes out all messed up:

https://i.imgur.com/YXOrHaT.png

It seems to be skipping every fourth pixel, or possibly repeating pixels.

The problem goes away if I untick "Operate in luma instead of RGB", or if the input is RGB itself.

shekh
6th August 2019, 19:56
shekh,

Drag any YUV video onto VirtualDub2, add a levels filter (input 0-64, output 0-255) and it comes out all messed up:

https://i.imgur.com/YXOrHaT.png

It seems to be skipping every fourth pixel, or possibly repeating pixels.

The problem goes away if I untick "Operate in luma instead of RGB", or if the input is RGB itself.

Amazing, this is bug in x64 version, straight from the original VD.

shekh
22nd August 2019, 12:14
VirtualDub2 behaves strangely with this AviSynth+ script:

blankclip(pixel_type="rgbaps")
invert
converttoyv12

It seems to paint nothing in the panes (redrawing problems are evident if you drag the panes around, plus they darken when the window loses focus).

If you change converttoyv12 to converttoy8, you get colourful garbage, which may indicate an AviSynth+ problem but I'm not sure (since I can't read the output of "info" to determine what colourspace I've ended up with), but the redrawing issue with converttoyv12 indicates some kind of trouble with VirtualDub2 not sensibly handling unexpected data.

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

Edit: confusion abounds because converttoyv12/y8 don't actually change the bit depth, so the problem is just that VirtualDub2 doesn't display (or throw an error for) float data.

I'm not sure if this is correct bitmap format from avisynth here (looks like 64-bit rgb), but VD doesn't know it *and* microsoft RLE decoder thinks it is their format but fails to works. I stopped digging with this mess and simply prohibited searching for decoder (in case fourcc=0).

shekh
22nd August 2019, 12:17
What are the chances of 32-bit ever being supported, if only for gamma-aware rescaling?

Added fp32 mode in filters (not much optimized):
Convert to floating point (begin with this)
Gamma correct
Levels
Resize
Fill
6-axis color correction

shekh
22nd August 2019, 12:21
shekh
is there any chance you could add something like %(selectionstart) and %(selectionend) options to these (https://i.imgur.com/zQXGSGg.png) variables (external encoder) that would return frame numbers of the current selection (same values as in statusbar)?
Currently I am trying to use VirtualDub to cut some footage while saving to the intermediate format and these would help to form the filename to know where I made the cut from.

This was long, but well, added. Using these macros is quite weird actually (you have to avoid file extension in file dialog).

shekh
22nd August 2019, 12:23
shekh,

Drag any YUV video onto VirtualDub2, add a levels filter (input 0-64, output 0-255) and it comes out all messed up:

https://i.imgur.com/YXOrHaT.png

It seems to be skipping every fourth pixel, or possibly repeating pixels.

The problem goes away if I untick "Operate in luma instead of RGB", or if the input is RGB itself.

Fixed some errors in levels, also added support for full range YUV (long annoying trouble).

shekh
22nd August 2019, 12:27
albino

I made illustration about profiler: https://sourceforge.net/p/vdfiltermod/wiki/performance/

I also noticed and fixed performance issue with conversion to RGB (shown in the wiki page) but not sure if this is what you did. Hope it helps to find something specific.

wonkey_monkey
22nd August 2019, 22:07
:thanks:

jpsdr
23rd August 2019, 10:09
Added fp32 mode in filters (not much optimized):


So, new SDK ? (Even if i'm not using this for now).
BTW, what is the status of a potential interlaced flag in the FilterModPixmapInfo ?

shekh
24th August 2019, 08:46
So, new SDK ? (Even if i'm not using this for now).
BTW, what is the status of a potential interlaced flag in the FilterModPixmapInfo ?

Not new, formats were added from build 42338:
kPixFormat_RGB_Planar
kPixFormat_RGB_Planar16
kPixFormat_RGB_Planar32F
kPixFormat_RGBA_Planar
kPixFormat_RGBA_Planar16
kPixFormat_RGBA_Planar32F

About adding flags: I'm sorry to tell, nothing changed yet

jpsdr
25th August 2019, 09:49
Not new, formats were added from build 42338:
kPixFormat_RGB_Planar
kPixFormat_RGB_Planar16
kPixFormat_RGB_Planar32F
kPixFormat_RGBA_Planar
kPixFormat_RGBA_Planar16
kPixFormat_RGBA_Planar32F

So, i just need to update my vdplugin.h with yours.
After, it's up to me in my plugins to eventualy add support. :p
For RGB planar, as it's something new in virtualdub2, is it the following ?

pxsrc=(VDXPixmapLayoutAlpha&)*fa->src.mpPixmapLayout;
pxsrc.pitch = pitch R
pxsrc.pitch2 = pitch G
pxsrc.pitch3 = pitch B
//////////
pxsrc=(const VDXPixmapAlpha&)*fa->src.mpPixmap;
pxsrc.data = R data pointer
pxsrc.data2 = G data pointer
pxsrc.data3 = B data pointer



About adding flags: I'm sorry to tell, nothing changed yet
No big deal, i was just asking to know, it's not something i realy miss...

Anyway, thanks again for your work on VDub2 evolving.

EDIT
Forgot to ask about :

FilterModPixmapInfo* info = fma->fmpixmap->GetPixmapInfo((fa->dst).mpPixmap);
info->ref_r; // and g,b,a

What about their value in float mode ?
Does it matter ?

shekh
25th August 2019, 22:47
So, i just need to update my vdplugin.h with yours.
After, it's up to me in my plugins to eventualy add support. :p
For RGB planar, as it's something new in virtualdub2, is it the following ?

pxsrc=(VDXPixmapLayoutAlpha&)*fa->src.mpPixmapLayout;
pxsrc.pitch = pitch R
pxsrc.pitch2 = pitch G
pxsrc.pitch3 = pitch B
//////////
pxsrc=(const VDXPixmapAlpha&)*fa->src.mpPixmap;
pxsrc.data = R data pointer
pxsrc.data2 = G data pointer
pxsrc.data3 = B data pointer



Yes, you just need new formats constants and the order of planes is R,G,B,A as you guessed (A=data4/pitch4)


info->ref_r; // and g,b,a
What about their value in float mode ?


Not used/undefined. This is meaningful only for 16-bit integer formats.

qyot27
25th August 2019, 23:50
VirtualDub2 behaves strangely with this AviSynth+ script:

blankclip(pixel_type="rgbaps")
invert
converttoyv12

It seems to paint nothing in the panes (redrawing problems are evident if you drag the panes around, plus they darken when the window loses focus).

If you change converttoyv12 to converttoy8, you get colourful garbage, which may indicate an AviSynth+ problem but I'm not sure (since I can't read the output of "info" to determine what colourspace I've ended up with), but the redrawing issue with converttoyv12 indicates some kind of trouble with VirtualDub2 not sensibly handling unexpected data.

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

Edit: confusion abounds because converttoyv12/y8 don't actually change the bit depth, so the problem is just that VirtualDub2 doesn't display (or throw an error for) float data.

FWIW, anything FFmpeg-based supports reading floating-point RGB(A) and Y32 from AviSynth+ if it's newer than 2019-05-04 (like the build of mpv I posted in another thread (https://forum.doom9.org/showthread.php?p=1881239#post1881239)). FFmpeg still can't do much with it beyond display it, but that's enough to happily play back and verify that you're getting correct output from AviSynth+.

nji
14th September 2019, 21:51
Recently I discovered that some movies contain duplicate frames every n-th frame.
(This must have happened by changing the frame rate somehow.)
Now I wanted to remove that frames, but found no practical way.
There is no filter for that (maybe the filter interface doesn't allow to delete frames?),
and changing the frame rate by menu (video / frame rate...) does allow to remove
every n-th frame (by frame rate conversion to a specific fps) but
you cannot specify the "start frame" to remove.
So it happens that frames that contain information are removed,
while the duplicate frames are left in the stream. That is worse than before.

The only "solution" I found is to write all frames as image sequence,
then delete every n-th image, and re-read the remaining images.
Quite unpractical.

So my question:
Is there any solution how to do that task?

shekh
14th September 2019, 23:29
nji

I think there is RemoveFrames filter which can do the job.
https://github.com/jpsdr/Filtres_JPSDR

Yes technically removing frames is supported. I'm not sure about the resulting timing, can be tricky to keep sync with audio.
Are you sure there is a problem with the movies? It's possible the input driver assumes wrong fps and generates this defect.

albino
15th September 2019, 08:59
So my question:
Is there any solution how to do that task?

If the video is 29.97 and every 5th frame is duplicated, like ABCDD, then you can just use the built-in IVTC filter and set it to Reduce, Auto, Auto to remove the dupe frames and return it to its natural 23.976 state very easily. You might have to set the audio to Full Processing Mode to keep sync, but I'm not sure since I always have the audio set to Full Processing.

jpsdr
15th September 2019, 09:29
nji
You can indeed try my Remove Frames filter.
If will remove Frames removed frames at the Offset position each Frames period frames.
Assuming your Offset doesn't change on the fly. The first frame is with Offset = 0.
So, for exemple with :
Frames removed = 1
Offset = 3
Frames period = 5
With the following input :
[0][1][2][3][4] [5][6][7][8][9] [10][11][12][13][14]
Will produce the following ouput :
[0][1][2][4] [5][6][7][9] [10][11][12][14]

Frames removed = 2
Offset = 2
Frames period = 6
With the following input :
[0][1][2][3][4][5] [6][7][8][9][10][11] [12][13][14][15][16][17]
Will produce the following ouput :
[0][1][4][5] [6][7][10][11] [12][13][16][17]

nji
15th September 2019, 10:51
Thank you very much all three of you once again!

The cause of the "duplicated" frames probably is not the input driver,
as I get the effect not only in VD2, but also in the player,
and in different movies to different amount.

If I export it as image sequence, the "double frames" are not identical.
(The "content" of the two images is, but there are small differences in
the written png image blocks that show only in arithmetic difference) (?)

Moreover the occurrence of doubling is not always regulary, but sometimes
a kind of pattern. For example: Every second frame for about 10 frames,
and then one "no doubling" and then doubling every second again,
then a triple of duplicates, then again every second frame, ... (?)

IVTC
Thank you for the hint.
I never considered that so far.
That filter works well for the scenario you described (29,97 fps and every 5th),
and for another movie (30 fps and every 6th) it is an approvement
(although from time to time there are some new, "combed" frames).
But on the movie mentioned above (29 fps and every 2nd) it fails:
the lenght stays the same, but the fps is reduced only to 23,2 fps,
and there are still duplicated frames (less and more irregulary).

I installed jpsdr's filters now.
Try, also your other two IVTC filters.


When watching the original movies, the speed seems naturally (even for that
example above, when every second frame is doubled).

So my overall guess for the cause is some kind of frame rate conversion.

Still in my case of analyzing the movie frame by frame I have to consider
the doubling.
(Actually in all filters about time (For example: Determing the moving
parameters when DeShaking(3D) ...).
But if the pattern is not regulary (as above) then how to distinguish
a doubling from a real non-motion?
(Not for the first time I hope the devs of all that movie formats and
conversions roast in hell ;-)

poisondeathray
15th September 2019, 15:35
If I export it as image sequence, the "double frames" are not identical.
(The "content" of the two images is, but there are small differences in
the written png image blocks that show only in arithmetic difference) (?)


But if source used lossy compression, they might supposed to be duplicates - the difference might be due to the compression as the codec tries compensate when accounting for motion vectors.

The other time this commonly happens is frame drops. Such as low quality recording devices, such as some phones

Are these theatrical movies, or "video" shot from users ?



IVTC
Thank you for the hint.
I never considered that so far.
That filter works well for the scenario you described (29,97 fps and every 5th),
and for another movie (30 fps and every 6th) it is an approvement
(although from time to time there are some new, "combed" frames).
But on the movie mentioned above (29 fps and every 2nd) it fails:
the lenght stays the same, but the fps is reduced only to 23,2 fps,
and there are still duplicated frames (less and more irregulary).


There are other adaptive methods in avisynth you can try . Some have comb detection /removal built in, some as a second post process

nji
15th September 2019, 16:37
But if source used lossy compression, they might supposed to be duplicates - the difference might be due to the compression as the codec tries compensate when accounting for motion vectors.

In VD2 I exported to image sequence, using png (which is lossless).
I don't have enough knowledge of codec/ motion vectors to understand
how a (visual) duplicate frame has (not visual) small differences as image.

The other time this commonly happens is frame drops. Such as low quality recording devices, such as some phones

Are these theatrical movies, or "video" shot from users ?

All these are private taken movie from early family feast, unknown hardware/ conversion.

I don't know what "frame drops" actually mean. But there is no frame missing. If you remove the duplicate frame, the motions are fluently.



There are other adaptive methods in avisynth you can try . Some have comb detection /removal built in, some as a second post process

Up till know I was successful in not opening another new tin (avisynth). ;-)

poisondeathray
15th September 2019, 17:11
In VD2 I exported to image sequence, using png (which is lossless).
I don't have enough knowledge of codec/ motion vectors to understand
how a (visual) duplicate frame has (not visual) small differences as image.


Not the PNG; I'm referring to the source .




Up till know I was successful in not opening another new tin (avisynth). ;-)

You can ask for help in the avisynth subforum

albino
15th September 2019, 20:15
All these are private taken movie from early family feast, unknown hardware/ conversion.

Sounds like these were taken with your phone then, in which case they're all Variable Frame Rate. In my experience Virtualdub can't really convert Variable Frame Rate to Constant Frame Rate without going completely out of sync. If your intention is to edit them, then you're probably much better off using something like ffmpeg or Handbrake and forcing them to CFR first before bringing them into Virtualdub.

If anyone knows of a Virtualdub method for fixing VFR and maintaining audio sync then I would be interested in it as well.

shekh
15th September 2019, 21:28
Sounds like these were taken with your phone then, in which case they're all Variable Frame Rate. In my experience Virtualdub can't really convert Variable Frame Rate to Constant Frame Rate without going completely out of sync. If your intention is to edit them, then you're probably much better off using something like ffmpeg or Handbrake and forcing them to CFR first before bringing them into Virtualdub.

If anyone knows of a Virtualdub method for fixing VFR and maintaining audio sync then I would be interested in it as well.

If it is old family archive, I doubt it was taken on phone. More likely some camcorder? Probably was interlaced as well? :)

nji
15th September 2019, 21:29
No, the movies aren't taken by me, not by phone (but with some kind of consumer camera), not with variable frame rate, and not interlaced.
However - they are movies. ;-)

nji
15th September 2019, 21:46
@jpsdr:

I analysed some more of the movies in question.

Sadly, the pattern of the duplicate frames sometimes is not regular.
A typical example is: Dupe every 6th frame.
For some dozens frame.
Then the dupe arises as 5th frame.
Then the period of 6 again.
This game several times in the movie.

==> can't use your fine Remove Frames filter.

If anything else fails ... try ffmpeg.
And indeed:
https://stackoverflow.com/questions/37088517/ffmpeg-remove-sequentially-duplicate-frames

And it works!
But if the criterion to remove is content based:
How to distinguish dupes from non-motion?
My genius idea for that:
Having a close look at the audio stream (if present).
But: the audio is quite unimpressed at times with dupes.

The only possible solution seems for me a filter (like Remove Frames),
that combines both - contents comparison and frame number pattern, like:
"Remove duplicate frames that appear in most times (= "fuzzy logic") regulary."
This should do the job.

albino
15th September 2019, 22:13
I've never seen an actual camera that records dupe frames, other than maybe the 23.976 -> 29.97 thing I mentioned before, but there you go! Learn something new every day I guess :D

shekh
15th September 2019, 23:51
If anything else fails ... try ffmpeg.
And indeed:
https://stackoverflow.com/questions/37088517/ffmpeg-remove-sequentially-duplicate-frames

And it works!
But if the criterion to remove is content based:
How to distinguish dupes from non-motion?
My genius idea for that:
Having a close look at the audio stream (if present).
But: the audio is quite unimpressed at times with dupes.

The only possible solution seems for me a filter (like Remove Frames),
that combines both - contents comparison and frame number pattern, like:
"Remove duplicate frames that appear in most times (= "fuzzy logic") regulary."
This should do the job.

Quick idea: 2 or more consecutive dupes are non-motion :)

nji
16th September 2019, 08:27
Hi shekh.

Yes, a very quick idea indeed :)

I agree:
2 or more consecutive dupes will probably be non-motion.
Probably.
But most (?) non-motion will be only 1 dupe.
Probably.
==> That's no reliable criterion to distinguish non-motion from
"generated" dupes.

To distinguish them one probably has to have a look WHY these
dupes are generated.
As I'm the opposite of a prof, I don't know much about all that matter.
But as there is a "nearly" kind of regular pattern, I do assume
it has to do with the cameras' firmware, or with some strange intermediate
frame rate conversion.
Maybe the cameras' "natural" framerate doesn't match with the wanted
or the audio resolution. So they insert (more or less) regulary frames
to match it? Or something like that.

If you assume that kind of cause, the algorithm I proposed above
(combination of content comparision and "fuzzy" pattern)
should do the trick. Kind of "adaptive pattern" mode in jpsdr's filter.
It doesn't remove the non-motion dupes (as ffmpeg does).
And it doesn't "de-sync", when the inserted-frame-pattern shifts (as jpsdr's
Remove Frame does).

But maybe someone should look, if he has this effect in his (older)
movies too... (Surprise-surprise).

nji
16th September 2019, 17:28
Having had a closer look on the matter, I'm suspicious
if the duplicate frames actually are simple added,
or if they stand for a kind of "dropped frame" the
camera hardware wasn't quick enough for, and so inserted
a duplicate to stay in sync.
(Maybe there is someone here who knows if that was done sometimes?)
I tried to estimate it by the motion (and a possible "jump" next
frame of a dupe), but I'm not sure.
If that should be the case then removing the dupes would be wrong
(Except at the simple pattern of a dupe every other frame).
An improvement in that case would still be possible
by replacing the duplicates by a "temporal mean" of it's neighbours.

In both cases (true dupe or compensation for dropped frame)
there remains the problem of identifying the dupe positions.

It can't be possible that the positions are arbitrarily.
So I had a closer look to that too.
And indeed, not for all duping movies, but for the majority I found
that the period p (dupe at last pos) of dupes is not constant but more complex.
It is n times p, then (p+1), then n times p again, then... etc.
I.e. the "real period" is n*p + (p+1).
Starting at an offset.

If (!) the task is to remove the frames this can't be removed by jpsdr's Remove Frame.
In ONE go.
But in (n+1) goes!
First go: offset, period: n*p + (p+1), frame at pos. p
Second go: offset, period: p - 1 + (n-1)*p + (p+1), frame at pos. (p-1)+p
(n+1) go: ...
Not very cool I admit.
And one has to find out the pattern, and if it holds until to the movie's end
by having a close look at the frames.
(I really hope not be completely wrong with all that ;-)

shekh
16th September 2019, 19:31
nji

Maybe it won't hurt to post a sample in videohelp restoration subforum. Some people there do exactly that for decades, remove artifacts from old videos. You will likely get a great description how your video was made and plenty of ideas )

nji
16th September 2019, 19:50
Yes, I will do that.
https://forum.videohelp.com/threads/394366-Duplicates-Frames-Cause-and-means#post2560347

Actually I already thought to myself that my question is too specific for this VD2 subforum.
Thanks for the ideas everyone!

nji
18th September 2019, 20:48
Is there an up-to-date reference for writing filters.

http://www.virtualdub.org/filtersdk.html

seems to be out-dated.

Thanks - Greetings.

videoh
18th September 2019, 20:58
That page does not seem outdated. SDK 1.1 is the latest as far as I know. The .chm help file in the ZIP does appear outdated, but still useful. Fortunately, the ZIP file includes a src directory with sample filters written for SDK 1.1.

nji
18th September 2019, 21:33
:thanks:

shekh
18th September 2019, 21:34
Is there an up-to-date reference for writing filters.

http://www.virtualdub.org/filtersdk.html

seems to be out-dated.

Thanks - Greetings.

You can find sdk 1.2 and some comments about my new added stuff here: https://sourceforge.net/p/vdfiltermod/wiki/sdk/

By most part the old sdk still works unless you need support for something very specific.

(sdk 1.2 is also old, just a bit newer than 1.1)

videoh
18th September 2019, 21:45
Cool, Shekh, thanks. I was not aware you had done all that work. Bravo!

StainlessS
21st October 2019, 07:21
Hi Shekh,
qyot27 posted AviSynth+ 3.4.0, https://forum.doom9.org/showthread.p...02#post1888102
breaks VD2, bring up script editor, bang! [access violation]
VD2 will not be the only affected software, I expect there will be more probs.

Groucho2004
21st October 2019, 09:22
Hi Shekh,
qyot27 posted AviSynth+ 3.4.0, https://forum.doom9.org/showthread.p...02#post1888102
breaks VD2, bring up script editor, bang! [access violation]
VD2 will not be the only affected software, I expect there will be more probs.It works fine when you install the non-GCC version.

StainlessS
21st October 2019, 09:31
Thanks for that, I just downed the first on the list, did not even notice the other version.

TlatoSMD
31st October 2019, 07:27
How do I get third-party VDub processing plugins to work in VirtualDub2?

I'm on Windows 10 Professional Home 64-bit. I've been using old VDub 32-bit up until a few weeks ago, because none of the plugins ever worked in old VDub 64-bit. But now, some recent Microsoft update has made it so the 32-bit version of old VDub doesn't load up anymore, so I've decided to give VirtualDub2 a try.

But the same problem persists in VirtualDub2: Not a single one of my many third-party plugins (mainly MSU plugins, Logoaway, and Tacosalad's Dotcrawl, but overall they add up to 34 different plugins) are successfully loaded in VirtualDub2. When I try to add any of those plugins manually inside of the VirtualDub plugin list, I'm getting the error message, "This is not a Win32 application". Plus, also VirtulDub2 only appears on my screen in the 64-bit version, not in the 32-bit version which, just like old VDub does now, only loads in the background but never shows up on screen and which I then have to manually kill by means of Windows taskmanager.

I've consulted the official Wiki on Sourceforge, but the only bit on plugins there looks like I'd have to learn programming first to fix this issue.

So, how to actually make third-party plugins load in VirtualDub2? Note that this is not a question on how to make any of those plugins work in an AVIsynth script, it's simply about how to use them in VirtualDub2 itself like within old VDub. And it's still the same old 8-bit color per channel, 4:2:2 and 4:2:0 video files that I'm trying to use those filters on.

Without those third-party processing plugins, VirtualDub2 will be pretty much useless for me. I'd really hate to abandon Avery Lee's cool tool after it's been more than 15 years, just because it's suddenly borked now. VirtualDub2 without those third-party plugins would be pretty much nothing but a fancy converter such as XMedia Recode and would lack any right to exist next to those for me.

TlatoSMD
31st October 2019, 07:41
Okay, so I've found a solution to at least *PART* of my problem. After rebooting Windows, old 32-bit VDub loads just fine again.

But the issues with old VDub 64-bit and VirtualDub2 still persist: No third-party plugins.

EDIT: Wow, now even the 32-bit version of VirtualDub2 works, properly loading all plugins! Great, finally a working version for me. Still, kinda strange how none of this seems to work with the 64-bit versions of both old VDub and VirtualDub2, even though I'm on a 64-bit OS.

TlatoSMD
31st October 2019, 07:53
So here's the next issue: While I'm using VDub mainly for its processing plug-ins, I can't seem to make Direct stream copy work in VirtualDub2 now. The video file has x264 (aka h264) for video (8-bit color per channel) and mp3 for audio, and the error msg I keep getting is "Select different input driver". So how do I do that? It was never an issue to use Direct stream copy in order to export this kind of footage into an AVI with old VDub.

StainlessS
31st October 2019, 08:17
64 bit VD2 (or any 64 bit executable) will require 64 bit plugins, 32 bit will not work. (same issue in Avisynth+ 64 bit, and 32 bit plugins).
Also, 32 bit plugins in VD2 64 bit plugins directories may cause problems, dont do it.

x264, dont really know much about this, but, you can only do Direct Stream Copy where source stream is compatible with output file,
although you can (I've never done it) create x264 in AVI, there are some things that need be omitted [at a guess I might think CABAC may be one of them],
if source does have some unsupported x264 features, then will not be able to Direct Stream Copy.

Dont think "Select different input driver" will make any difference, unless it decodes to uncompressed video, which you could then copy to
output AVI as uncompressed video (perhaps YUV or maybe only RGB, dont know).

I would use Fast Recompress, to some output codec, but that stuff has changed in Vdub2 (cant remember in what way it changed).

You will probably get a better answer soon, a wrong answer often prompts someone else to correct it in double time,
people like to tell others just how wrong they are :)

EDIT: Having looked at VD2 Decode Format, AutoSelect would seem to be the only likely one to choose.

EDIT: The VirtualDub x264 compression thingy docs will likely tell what features of x264 are unsupported in AVI files.

TlatoSMD
31st October 2019, 09:13
x264, dont really know much about this, but, you can only do Direct Stream Copy where source stream is compatible with output file,
although you can (I've never done it) create x264 in AVI, there are some things that need be omitted [at a guess I might think CABAC may be one of them],
if source does have some unsupported x264 features, then will not be able to Direct Stream Copy.

Dont think "Select different input driver" will make any difference, unless it decodes to uncompressed video, which you could then copy to
output AVI as uncompressed video (perhaps YUV or maybe only RGB, dont know).

I would use Fast Recompress, to some output codec, but that stuff has changed in Vdub2 (cant remember in what way it changed).

[...]

EDIT: The VirtualDub x264 compression thingy docs will likely tell what features of x264 are unsupported in AVI files.

I've just tried the very same thing, on the very same file, with old VDub 32-bit without a problem. But VirtualDub2 only keeps telling me "Select different input driver" on the very same file.

EDIT: Having looked at VD2 Decode Format, AutoSelect would seem to be the only likely one to choose.

I've checked that before mentioning the issue here. It's what VirtualDub2 is set to by default, but still that error msg where old VDub has no problem at all.

StainlessS
31st October 2019, 10:12
Arh, (I remembered something), check out the File Open Selector box,
"Select different input driver" is there.

EDIT: Although I dont know what the trick is to un-disable it.

shekh
31st October 2019, 14:35
About input drivers: see this link https://sourceforge.net/p/vdfiltermod/wiki/direct_copy/

TlatoSMD
31st October 2019, 17:31
About input drivers: see this link https://sourceforge.net/p/vdfiltermod/wiki/direct_copy/

Thanks! Setting it back to standard AVI input in that open file dialogue did the trick. :)

Okay, so now that VirtualDub2 is fully functional for me, maybe, *MAYBE* its integrated script editor will help me get into AVIsynth for once, after I haven't been able for more than 15 years by now to learn AVIsynth at a sufficicent level to even just open a file.

A clickable GUI and a programming language aka "script" are just so vastly different in approach, plus both Mencoder and AVIsynth always seem to lack *DECADES* behind on their respective documentations, so none of the scripts found in documentation *EVER* work. Plus, AVIsynth and Mencoder aces often seem to have a terrible holier-than-thou attitude, so even if you're trying to contact them for help, in 9 cases out of 10 they will first ridicule the fact that you're actually trying to use commands from the documentation, and then immediately stop talking to you once they realize you're not using Linux, which basically means you're some lower life form not worth their time.

LigH
4th November 2019, 08:57
Apropos ... the input driver concept seems to be the reason why you can't use VirtualDub2 to e.g. remultiplex MKV to MP4 in Stream Copy mode, correct?

shekh
7th November 2019, 14:53
Apropos ... the input driver concept seems to be the reason why you can't use VirtualDub2 to e.g. remultiplex MKV to MP4 in Stream Copy mode, correct?

The original idea of input driver in VD was like this:
1) input driver has to split source into packets and that`s all
2) video decoder has to take packets and no other metadata and translate that into frames

I may be missing some details but taking into account ordinary h264 video it is just impossible to implement accurate decoder in that way.
However, if focus is stream copy (decoder is not needed) then such input driver can work (splitting into packets is good enough).
At the same time the decoding phase is only good as preview - it is NEVER frame accurate.
This is how original AVI driver works, and also FCCHandler' matroska driver and quicktime driver.

Another approach was ffmpeg input driver - initially developed by FCCHandler according to some history of changes.
The idea with ffmpeg was to ignore packets altogether and deliver correct decoded frames right away (I think so, or maybe the idea was lost between changes).

What is blocking simultaneous support for copy and decode with ffmpeg? The core feature is being able to translate from packets to frames and back (timestamps also would be great): ffmpeg lacks this.
Current "caching input driver" has stretched this in some ways: it does switch to direct mode when packet-frame translation is trivial, this is the case with keyframe-only formats. Doing more than that needs more time and passion.

Why avidemux can work? It uses ffmpeg with some patches applied and afaik some custom made demuxers as well. Might be as good idea to either borrow his work or fix ffmpeg myself, both ways are not simple and stay in my internal 'todo' few years.

jpsdr
26th November 2019, 11:09
Hi.
Check here (https://forum.doom9.org/showpost.php?p=1891382&postcount=4960).

nji
28th November 2019, 18:56
Scenario:
Open a movie
Select a frame
Insert it (say 5 times)
Insert a filter (apply opacity curve)

=> In "curve editor" frame numbers at positions after insert positions
doesn't correspond to having inserted frames
(Still has the original ones (= -5)).

Bug?

shekh
29th November 2019, 00:37
Welcome to the world of VirtualDub timeline coordinates. It has everything of: mistakes, confusing design, unfinished work.
Basic rule of thumb is: everything you do in timeline control (insert, delete, move parts, select range) happens after filters. Curve points are in filters coordinates (or maybe even source?) hard to tell exactly because it does not work as explained in the documantation.
Also before I realized that timeline edits transform already filtered sequence I attempted to specify time positions in final (post-edit) coordinates and this made the situation even worse.

Good idea: never use both curves and timeline edits (except select range) in the same process. Also maybe don't combine any of that with time-scaling filters (deinterlace, interpolate, delete frames etc).

nji
29th November 2019, 10:30
Phew!

This is really a BAD surprise.

First the filters, then the timeline manipulation?
But shouldn't it be just the other way round?

And not being allowed to "mix" both "operations" is like
to forbid the basic operation on movie manipulation...

???

jdawn1
8th December 2019, 12:55
Is it possible to direct stream copy AAC audio?
IM using Vdub 2 to re-encode 4k video shot on my phone which is H264 120mbit using x265.

I was using handbrake ,but for some reason handbrake messes up contrast and colors, whereas vdub gets it perfect. This is without any filters.
I get way better results from vdub, for some reason handbrake is causing remapping of colors or something.

But when I direct stream copy the audio the only option on save video is WAV format, and it doesn't work anyhow.

shekh
9th December 2019, 00:19
Is it possible to direct stream copy AAC audio?
IM using Vdub 2 to re-encode 4k video shot on my phone which is H264 120mbit using x265.

I was using handbrake ,but for some reason handbrake messes up contrast and colors, whereas vdub gets it perfect. This is without any filters.
I get way better results from vdub, for some reason handbrake is causing remapping of colors or something.

But when I direct stream copy the audio the only option on save video is WAV format, and it doesn't work anyhow.

Short answer: not possible (with different input driver for audio it may work or lead to other problems).
You can re-compress as AAC, select "Audio: Full processing mode" and then choose compression.

jdawn1
9th December 2019, 06:19
Thanks for the answer.
I did more testing on handbrake vs vdub with x265.
with the same settings, I get 0.37fps on vdub and 0.21fps on handbrake (VerySlow, 10 bit, 25 crf)
vdub matches the colors and contrast so the output is superior. The file size is also about 15% smaller.

The results are even worse when resizing to 2560 from 3840, both use Lanczos 3
handbrake: 0.45fps, terrible contrast lost, 17.7MB
vdub: 0.82fps, matching contrast and colors perfectly, 15.9MB

Hopefully vdub can do batch of input folders like handbrake!

jdawn1
28th December 2019, 18:01
Hi shekh

This might be a dumb question, but how do you add command line options to the x265 encoder on avlib-1?

https://i.imgur.com/xKZ1Apw.jpg

Sometimes I want to run two pass encoding to target a file size...
Not sure why, but your x265 arrangement gives better performance, quality and compression then handbrake so I really like to use it...
Not to mention the other benefits of vdub over HB.

shekh
28th December 2019, 23:04
Hi shekh

This might be a dumb question, but how do you add command line options to the x265 encoder on avlib-1?

https://i.imgur.com/xKZ1Apw.jpg

Sometimes I want to run two pass encoding to target a file size...
Not sure why, but your x265 arrangement gives better performance, quality and compression then handbrake so I really like to use it...
Not to mention the other benefits of vdub over HB.

Hi
Really have no idea why it has anything better, as I never benchmarked handbrake. Glad if this result comes from my effort and not from measurement error :)

The codec interface is actually that simple. There is no command line. There was similar request at least once though.

You can try with external encoder interface, as it deals with pure command lines.

age
29th December 2019, 00:15
Little bug report, encoding prores HQ from vapoursynth/avisynth has a wrong matrix in the prores metadata (always bt.470)

osgZach
13th January 2020, 08:55
Feature Request:
Can you please modernize the options allowed for exporting segmented AVI ? Currently the file size limit on segments is 2048MB which makes it very impractical for working with lossless codecs. I was hoping setting it to 0MB and using the "limit number of frames" option would get me larger files but alas... It would be nice to see this output option modernized a bit. You could even expand it to work with other output containers if people were so inclined to use it that way.

There are other possibilities too. Giving it a number of desired chunks and having it calculate the number of frames to output based on total frames or play length, etc. Being able to tell it to queue an output job in X number of chunks and automatically setup the jobs in the queue would potentially be neat as well. I could see myself using it for heavy filtering jobs that may require 24 hours or more of processing; being able to do it in lossless chunks that I can pause/resume as needed and rejoin myself later, might be useful...

but really in terms of basics anything is better than a 2GB file limit.

shekh
13th January 2020, 10:42
Interesting. I had no idea segmented output is actually useful. I thought it is just annoying complexity from times when files were transferred on cd's or something. :)

StainlessS
13th January 2020, 13:11
when files were transferred on cd's or something.

Perhaps related to FAT32 (not sure, maybe fat32 was originally borked to max 2GB, or maybe not), but anyway, I'm guessin
that many softwares were limited to 2GB, simply because of use of signed int, so max 2GB avoids the problem altogether.

osgZach
13th January 2020, 17:14
yeah it was common to limit to 2GB back then, either due to file system constraints, and/or the original AVI container. Then OpenDML came along and allowed larger than 2GB AVI files.
I'll admit I'm probably one of the few people who would use segmented output at this point. So don't worry about rushing it or if it looks like too much of a hassle after you look at the code.

SeeMoreDigital
13th January 2020, 22:58
Wow... I haven't had need to use the avi container in years!

Out of interest... What audio and video formats are people trying to put in it these days?

osgZach
13th January 2020, 23:32
I use AVI for MagicYUV codec video and if there is audio, 2 channel or multichannel PCM
Strictly as a lossless intermediate or recording format.

Last popular codec to shove into AVI with hacks was H.264 or possibly H.265 I think. But I could be wrong, I don't pay that close attention to things like I used to.

StainlessS
14th January 2020, 00:09
Yip, MagicUV and also UT_Video are great lossless codecs for AVI, and AVI is pretty much bulletproof as source clip [so long as you aint daft enough to use DivX/XVid],
you can spend a lot of time screwing around with non AVISource source filters, almost always less strain on the heart to first just convert to AVI via FFMPeg,
exception being DGIndex where is pretty damn solid too. [EDIT: 10 bit AVI may though still be problematic]

osgZach
14th January 2020, 01:33
So, interesting development.

I took 15 minutes of footage, decided to just arbitrarily put in a huge file size (10GB) and then limit the frames to 7100 frames and run a segmented export.

It gave me four total segments. 3.19GB, 3.45GB, 3.80GB, and 155.56MB (respectively 4m:56s each, and 11 seconds)


So.... I guess there is no sanity check on that input box or something? Or maybe the wording on it just never got update
I did a stream copy so no idea if that influenced it at all.

poisondeathray
14th January 2020, 07:20
So, interesting development.

I took 15 minutes of footage, decided to just arbitrarily put in a huge file size (10GB) and then limit the frames to 7100 frames and run a segmented export.

It gave me four total segments. 3.19GB, 3.45GB, 3.80GB, and 155.56MB (respectively 4m:56s each, and 11 seconds)


So.... I guess there is no sanity check on that input box or something? Or maybe the wording on it just never got update
I did a stream copy so no idea if that influenced it at all.


Different types of content have different compression ratios

7100 frames of complex, noisy footage would be much larger than 7100 frames of 1 color black, for all types of compression schemes (lossy, lossless, I-frame, or long GOP)

Uncompressed video, however, will lead to the same filesize per frame

osgZach
14th January 2020, 08:18
I think you've overlooked the context of the data.

As mentioned earlier, I output lossless MagicYUV files.
I requested a modification to the alleged 2GB file size limit on segmented AVI output - which it appears is not an actual limit after some further testing. I put 10GB on purpose to see if it would reject it or break the output in some way, and then I chose 7100 to make sure I got several segments over a 21k frame selection range.

https://i.imgur.com/nftUpHE.png

LigH
14th January 2020, 09:02
I believe the 2 GB limit for legacy AVI is not related to FAT32 files, but to 32 bit chunk sizes in the AVI structure, which are often even interpreted as signed. OpenDML was the AVI 2.0 extension to circumvent this internal limit.

StainlessS
15th January 2020, 07:13
Makes sense, thanks LigH.

osgZach
16th January 2020, 05:06
hmm ok, still seeing some weirdness here I guess.

I took a MagicYUV (M8Y0) input for a denoised Wrath of Khan I made a while ago, and gave it enough frames to split down the middle (58m15s both files). But when I try to open either of them in WMP, JRiver, etc it won't play. VLC says it has to rebuild the file index. Openinng with Vdub prompts an operation for "Reconstructing Index Block", it hangs for a bit, then throws out this warning

https://i.imgur.com/GBijb2i.png

seeking around takes a few seconds to accomplish.

I can open an earlier aborted output just fine, because that file was only 500MB so I am guessing there may still be something to investigate with VDubs file splitting abilities. The only thing I did here aside from specify a large maximum frame per segment, was increasing the file size limit to 500GB I'll experiment with some lower values on the size limit to see if it has any weird influence on output errors.

wonkey_monkey
16th January 2020, 11:20
Sounds like VirtualDub just literally splits the file output, rather than creating two valid AVI files. The index would be in the second half (it's also always written on abort, I believe, making an aborted file valid), and the second half would not contain any headers.

osgZach
17th January 2020, 08:08
Sounds like VirtualDub just literally splits the file output, rather than creating two valid AVI files. The index would be in the second half (it's also always written on abort, I believe, making an aborted file valid), and the second half would not contain any headers.

I don't think this is the case. I just set it to 2GB segment size and every single one outputs / loads fine independently outside of Vdub, even moved a single segment to another location and loaded without any hiccups.
I'm going to re-run the job I just with the messed up outputs when I go to bed and see what happens. Still hoping I just caused a glitch doing other stuff on the PC.

osgZach
17th January 2020, 18:37
The magic number seems to be a segment size of 4096MB anything above this appears to produce index errors in all files, except for the final segment, if it is below that size.

shekh
17th January 2020, 20:03
There is error in file creation when using segments: odml header/index is disabled. Looks fixable

osgZach
19th January 2020, 03:12
I've been testing out a fixed build provided by shekh, and it appears to work well.

I am also currently investigating my work flow to try and determine where and how an extra frame was inserted into a video stream (at the end). I will report back here when I have some findings. I vaguely recall confusion about the way vdub reports an extra frame in the past - or perhaps I am misremembering?

lansing
27th January 2020, 22:26
Bug reporting, setting in preference doesn't save unless I explicitly clicked "save". Clicking "ok" after changes doesn't save.

shekh
28th January 2020, 09:30
Bug reporting, setting in preference doesn't save unless I explicitly clicked "save". Clicking "ok" after changes doesn't save.

This is the purpose of "save". Not a bug

wonkey_monkey
28th January 2020, 11:33
I would say it is outdated/unexpected behaiour, though. These days an "OK" is expected to save and for those changes to persist. That's if there is even an "OK" to begin with, since even that seems to be falling out of fashion these days.

shekh
28th January 2020, 12:30
I would say it is outdated/unexpected behaiour, though. These days an "OK" is expected to save and for those changes to persist. That's if there is even an "OK" to begin with, since even that seems to be falling out of fashion these days.

This project has deep roots in legacy and software archeology :)
Anyway, thanks for suggestion.

lansing
28th January 2020, 12:47
This is the purpose of "save". Not a bug

But then why does the setting change get "remembered" for that instance of the program and not after I close and reopen the app?

shekh
28th January 2020, 14:08
But then why does the setting change get "remembered" for that instance of the program and not after I close and reopen the app?

Exactly, to let you use the setting "now" while keeping the saved preferences unchanged (for someone paranoid about making global changes?).
I made it worse with this feature: https://sourceforge.net/p/vdfiltermod/wiki/vdscript/

lansing
28th January 2020, 14:41
Exactly, to let you use the setting "now" while keeping the saved preferences unchanged (for someone paranoid about making global changes?).

That does not make any sense. Why would anyone making a change in setting scared about making changes? If anyone is scared about messing up, there can be a "restore default" button.

MeteorRain
14th March 2020, 02:06
Feature request:

When rendering video from YUV to RGB on the UI, is there a place for me to select which colormatrix to use for the input pane?

Imported a BT.2020 YUV420P16 avs clip, and the color displayed seems to be either 601 or 709 matrix.

Hopefully there's an option to select the correct colormatrix.

I'm perfectly fine with a context menu to pick 2020 every time I load a clip. But if this has already been implemented somewhere, please kindly let me know.

Edit: It seems Decoding Format is what I was looking for. Still, 2020 could be added to the input color space.

shekh
14th March 2020, 13:24
2020 matrix is a known issue, I'll add it when I can.

hintlou
17th March 2020, 08:41
Can the VirtualDub2 filters be added to avs scripts which aren't be processed in VirtualDub2?

StainlessS
17th March 2020, 11:38
LoadVirtualDubPlugin:- http://avisynth.nl/index.php/Plugins

EDIT: For usage, Advanced Search for "LoadVirtualDubPlugin" , select 'posts', not 'threads', and in Avisynth 'Usage forum'.

LigH
17th March 2020, 14:54
But ... for many VirtualDub(2) plugins, there are equal (if not even superior) AviSynth plugins available, often for VapourSynth as well. Loading VirtualDub plugins in AviSynth is only recommendable for those without a match.

hintlou
17th March 2020, 16:41
Thanks for StainlessS and LigH. I will study it carefully!

hintlou
18th March 2020, 04:10
I want to load the VirtualDub2 Plugin "Deinterlace-Blend fields-Keep top fields,interpolate/discard bottom fields" to my avs script,
but I can't find its vdf file and don't know how to set the filtername for its plugin function.
17240
+++++++++++++++++++++++
Would anybody give me a hand,please?

LigH
18th March 2020, 09:08
I believe such basic functions are not a plugin, but in the application core.

Apart from that, discarding and interpolating one field can be achieved easily with AviSynth core functions (SeparateFields, SelectOdd/Even, *Resize).

And it would be one of the worst methods to deinterlace. Why waste quality intentionally (except for academic purposes, to show how bad this result is)?

Recommendable deinterlacers which don't discard a field but use adjacent fields to reconstruct content are, from fast to precious: Yadif(mod), TDeint, QTGMC (that one has a complex installation but will be worth the efforts).

hintlou
18th March 2020, 13:57
Thanks for your advice.

I know it's not a modern deinterlacing method.
But the Blend fields plugin of VirtualDub2 can offer me the effect I need in some dvdripping cases.
So can the plugin be loaded in avs scripts?
I really really need it be loaded in my avs scripts instead of being loaded in VirtualDub2 only.
I want to separate the different parts of pictures in video for differently deinterlaced.

LigH
19th March 2020, 08:13
For the "deinterlace" filter, the responsible "Module" is "(internal)", so it is not a plugin but code in the EXE.

If it is not a plugin, it cannot be loaded. But it can be executed equivalently with AviSynth core functions.

hintlou
19th March 2020, 10:14
OK,Thanks....
How can I get the same/similar effect from AviSynth core functions (SeparateFields, SelectOdd/Even, *Resize) ?
Is there a documentation explaining about it?

videoh
19th March 2020, 10:46
Older deinterlacers like FieldDeinterlace() and TDeint() have blend modes. There may be others, such as SmoothDeinterlace().

hintlou
21st March 2020, 16:35
Thanks.I tried them:

"FieldDeinterlace(blend=true,full=true)" :
the deinterlacing quality is bad...

"TDeint(mode=2)" this is a blend mode:
the deinterlacing quality is ok,but the blending effect is different from the Blend fields plugin of VirtualDub2.

I don't have 32bit softwares so "SmoothDeinterlace()" isn't suitable.

Andouille
21st March 2020, 17:02
Try this in Avisynth :
Blur(0,1)

videoh
21st March 2020, 18:15
"FieldDeinterlace(blend=true,full=true)" :
the deinterlacing quality is bad... What is bad about it? You specified full blending so the progressive parts will not be spared.

videoh
21st March 2020, 18:15
Try this in Avisynth :
Blur(0,1) Yup, sounds about right for him.

Stereodude
25th March 2020, 03:54
Is it not possible to use CineForm in a .mov using fast recompress? I have AVIsynth spitting out V210 and CineForm is set to 10-bit 4:2:2 and says it will use V210 with no conversion and I get a Video format negotiation failure when using fast recompress. It tells me to use normal recompress or full processing mode.

poisondeathray
25th March 2020, 04:49
Is it not possible to use CineForm in a .mov using fast recompress? I have AVIsynth spitting out V210 and CineForm is set to 10-bit 4:2:2 and says it will use V210 with no conversion and I get a Video format negotiation failure when using fast recompress. It tells me to use normal recompress or full processing mode.


The short version - nothing funky is going on with full recompression. Make sure you set it up as 10bit in the cineform configuration and YUV 422 10bit. You're actually sending p210 (planar 10bit 4:2:2) with avs script (check with vdub2's file=>file information) and it'a a conversion to v210. It's a lossless re-arrangement of pixel format required for cineform which does not support p210

If you use vapoursynth, there is an enable_v210 switch that sends v210 instead of p210, and you can use fast recompress

StainlessS
25th March 2020, 09:30
No idea if this helps:- http://avisynth.nl/index.php/Internal_functions#OPT_Enable_V210

OPT_Enable_V210

global OPT_Enable_V210 = true ## default false AVS+
For 10bit YUV422, Frameserve interleaved V210 instead of planar P210. (VfW)

§ VfW here means Video For Windows clients such as VirtualDub are affected, but not other clients such as ffmpeg.

Stereodude
25th March 2020, 15:09
The short version - nothing funky is going on with full recompression. Make sure you set it up as 10bit in the cineform configuration and YUV 422 10bit. You're actually sending p210 (planar 10bit 4:2:2) with avs script (check with vdub2's file=>file information) and it'a a conversion to v210. It's a lossless re-arrangement of pixel format required for cineform which does not support p210

If you use vapoursynth, there is an enable_v210 switch that sends v210 instead of p210, and you can use fast recompress
I used the v210 enable that StainlessS pointed out (after your post) prior to my post last night and it did not work. However, after updating to the lastest VD2 it works fine. I guess there was a bug that has since been fixed and I didn't realize how outdated my version of VD2 was. :o

StainlessS
25th March 2020, 16:04
I guess there was a bug that has since been fixed
Not sure, think not a bug, was just not supported back then, Shekh & Pinterf got together and arranged for joint support.

poisondeathray
25th March 2020, 16:59
Not sure, think not a bug, was just not supported back then, Shekh & Pinterf got together and arranged for joint support.

Nice!

I wonder if this can be extended to avs+ script in avfs since it's vfw based??

Maybe it's the wrong place to ask, but vapoursynth's enable_v210 = True emulates v210, so the virtual AVI looks like v210 (e.g. other programs and mediainfo identifies it as v210)

But avs+'s global OPT_Enable_V210 = true still identified as p210 when sent through avfs

lansing
29th March 2020, 00:54
I'm having problem displaying blu-ray m2ts file, where any random seek will result in blocky gray images for about 10 frames, then it became normal again. And the issue doesn't end there. When I apply Neatvideo, a temporal denoising filter, the problem goes 5-6 good frames -> 15 blocky gray frames -> 5-6 good frames and repeat.

Sharc
29th March 2020, 13:11
I'm having problem displaying blu-ray m2ts file, where any random seek will result in blocky gray images for about 10 frames, then it became normal again. And the issue doesn't end there. When I apply Neatvideo, a temporal denoising filter, the problem goes 5-6 good frames -> 15 blocky gray frames -> 5-6 good frames and repeat.
With a random seek we will get garbled frames until we hit the next I frame in the stream (GOP start for correct decoding).

videoh
29th March 2020, 14:39
I'm having problem displaying blu-ray m2ts file, where any random seek will result in blocky gray images for about 10 frames, then it became normal again. And the issue doesn't end there. When I apply Neatvideo, a temporal denoising filter, the problem goes 5-6 good frames -> 15 blocky gray frames -> 5-6 good frames and repeat. Instead of opening the M2TS directly, make an avs script with frame-accurate seeking and then open that in VirtualDub2.

I don't know what VirtualDub2 is using to open M2TS files.

shekh
29th March 2020, 16:15
Instead of opening the M2TS directly, make an avs script with frame-accurate seeking and then open that in VirtualDub2.

I don't know what VirtualDub2 is using to open M2TS files.

I agree. Reliability of seek in VD2 depends on FFMpeg API which is not sufficient for some formats (like m2ts)

StainlessS
29th March 2020, 16:29
I'm sure that VH knows this already but DGIndex has these available as file extension filters in DGIndex:

vob, mpg, mpeg, m1v, m2v, mpv, tp, ts, trp, m2t, m2ts, pva, vro

videoh
29th March 2020, 17:00
Quite right, SS. but remember DGIndex is MPG2 only. DGIndexNV can handle the other formats. I think ffms2 would be fine also. Don't like to push my stuff to avoid triggering some members. ;)

StainlessS
29th March 2020, 17:13
DGIndex is MPG2 only
Arh yes, did not see the Blu-Ray thing.

lansing
29th March 2020, 18:07
I agree. Reliability of seek in VD2 depends on FFMpeg API which is not sufficient for some formats (like m2ts)

Alright, I was trying to do some quick tweaking with VD on the fly and don't want to go through "opening the video in a script and then loading the script" for every single video. I guess the long route is still inevitable.

videoh
29th March 2020, 18:12
Arh yes, did not see the Blu-Ray thing. My new abbreviation for you is now SssS. Reminds me of Windows SxS stuff.

SeeMoreDigital
29th March 2020, 18:24
My new abbreviation for you is now SssS. Reminds me of Windows SxS stuff.How about SßS

videoh
29th March 2020, 20:52
That works! But how to type that funny B? I don't seem to have one on my keyboard.

Groucho2004
29th March 2020, 21:36
But how to type that funny B? I don't seem to have one on my keyboard.This German grapheme is largely extinct now. Just use a double s.

SeeMoreDigital
29th March 2020, 21:44
This German grapheme is largely extinct now. Just use a double s.Nein!!!!!!!!!!!!!!!!!!!!

qyot27
29th March 2020, 21:55
Alt+0223 is the combo for the Eszett.

Groucho2004
29th March 2020, 22:11
Nein!!!!!!!!!!!!!!!!!!!!OK. According to this (https://en.wikipedia.org/wiki/%C3%9F#Usage_in_the_reformed_orthography_of_1996), there are still some uses for that relic.

@vh
If you really have to mutilate Stainless' moniker, use SssS.

StainlessS
30th March 2020, 00:01
Common guys, keep on topic.

ssS

videoh
30th March 2020, 03:16
@vh
If you really have to mutilate Stainless' moniker, use SssS. Umm:

https://forum.doom9.org/showthread.php?p=1905458#post1905458

Groucho2004
30th March 2020, 12:39
Umm:

https://forum.doom9.org/showthread.php?p=1905458#post1905458
Yeah, I know it's your creation. I probably should have phrased it differently.

nji
13th April 2020, 16:40
As probably most VD2's users I take VD2 for enhancing movies.

For that I have to assess the exact look of the orig movie
and the effect of the filters ... in VD2's display panes.

Just recently I realized that when doing this
... by zooming with context menu ...
the shown zoom is NOT the actual content,
but what the interpolation alg does from it.
Choosing the alg (to "pixel" = orig.) is only possible
by disabling DirectX in "Options / Preferences / Display",
or by enabling OpenGL.

So my suggestion/ question:
To disable DirectX at that point by default.
(If it doesn't have any other disadvantages I don't know about).