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

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

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd January 2018, 08:50   #21  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Sorry, have not implemented ini file replacement for Azerty.

Looking at this:- https://en.wikipedia.org/wiki/AZERTY...ZERTY_keyboard

Leads me to believe that we will have problems, due to qwerty keys 1->9 being on bottom row,
and Azerty having 1->9 on top row, I think I need allow change in ini for probably all command sequences so that
Azerty can use eg CTRL/SHIFT/ALT/& instead of CTRL/SHIFT/ALT/1, etc (ie the bottom row characters).

I'll do that conversion in a few hours (well after some sleep).

Why do you foreigners have to be awkward and speak strange languages and use odd keyboards, just to be difficult I guess.

There must be an easier way
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 2nd January 2018 at 08:57.
StainlessS is offline   Reply With Quote
Old 2nd January 2018, 09:50   #22  |  Link
Bernardd
Registered User
 
Join Date: Jan 2012
Location: Toulon France
Posts: 212
abolibibelot, have you try this martin53's script https://forum.doom9.org/showthread.p...51#post1600151
Bernardd is offline   Reply With Quote
Old 2nd January 2018, 16:33   #23  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
abolibibelot,

Can you down the SawBones_1-5_Beta.zip from Sendspace (link below this post), and give it a whirl.

I may have fixed the AZERTY keyboard probs (hopefully, and for QWERTZ [German] etc too).

I should have been wrapping non special keys in {} I think, to have it convert for various keyboards.
(Not 100% sure by any means but it stands some chance of working I think).

NOTE, I've been experiencing problems with VirtualDubFilterMod when sending the "Save & Refresh" sequence,
Save NotePad Command.txt file [EDIT: works fine], and then sending 'F5' key to VirtualDubFilteRMod's open Script Editor window.
It refuses to refresh, unless the window is visible, ie not minimised onto the taskbar, its not a big deal, you just
have to make the script editor window tiny and bung it up next to the NotePad window, then it all works ok.
(It used to work ok on taskbar, I think).

Can you check that all key combos are working please, and I'll put up a non beta (after I finally do get some sleep).

Yawn

EDIT: This is the AutoIt snippet that does not save & refresh, (maybe 'Shekh the magnificent' is watching)

Code:
...
Global Const $ScriptTitle = "[CLASS:birdyAVSEditor]"                 ; VirtualDubFilterMod Script Editor Window
Global Const $ScriptControl ="[CLASS:Scintilla; INSTANCE:1]"
...


Func NotepadSave()
    ControlSend($EdTitle, "", $EditControl, "^s" , 0) ; Send CTRL/S to NotePad, ie Save (FileSelector pop-up if not named)
    If NOT WinExists($ScriptTitle) Then
        ToolTip("Sending NotePad Save ONLY")
    Else
        ControlSend($ScriptTitle, "", $ScriptControl, "{F5}" , 0)   ; Send F5, save File and  Refresh to VirtualDubFilterMod Script Editor
        ToolTip("Sending ScriptEditor Save & Refresh")
    EndIf
    $ShowCnt = $ShowCntLimit * 4
Endfunc
EDIT: It does present the tooltip marked above in blue, but does not refresh when on taskbar. EDIT: script editor does not respond to the F5 key.

EDIT: It should also put up an alert and abort if cannot set a [EDIT: Global, ie system wide] HotKey, and say which sequence failed,
so you can check to see what is using the hotkey (they cannot be replaced, and sometimes you cannot find what
is using a hotkey. No programs seem to exist that can tell what sets any particular [EDIT: system wide] hotkey).
I guess that the only way to find out is to press the hotkey sequence and see what pops up.
But, seems impossible to enumerate all used hotkeys and show what is using them.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 3rd January 2018 at 08:21.
StainlessS is offline   Reply With Quote
Old 2nd January 2018, 17:56   #24  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Quote:
To assist in CTRL+SHIFT+ALT+1, suggest test first if being used by something else.
eg, copy some exe to desktop.
create a shortcut to it.
right click "Properties", and click on "Shortcut Key", and enter the shortcut.
If it prevents you from entering the shortcut, then looks like something else is already using it (maybe Graphics card).
Well, indeed I can't input CTRL + SHIFT + ALT + 1 in a shortcut, but if I press those four keys simultaneously it displays “CTRL + ALT + 1 (PAV. NUM.)” (which disappears as soon as I release the keys), the “SHIFT” (or “MAJ” as it's called here), does not appear ; it does appear if I press only the three first keys : “CTRL + MAJ + ALT +”.
I tried CTRL + SHIFT + ALT + 2, and... the display turned to black, then went upside-down ! O_o Kinda spooky when you're not expecting it... (Could be reverted with CTRL + SHIFT + MAJ + 8. And as you might expect, or not expect at all, the same sequence ending with 4 turns the display to the left – messing with all the windows sizes to accomodate – and with 6 it turns it to the right. Whoever designed this should be bludgeonned with a rubber dildo, to the left and to the right of his sorry face, until he screams “ALT + F4 !”.)

Oh, but it does in fact work (using the default SawBones) with the other numerical keys, the ones on the... LHS of the keyboard (at first I tried the ones on the numerical keypad) : with CTRL + SHIFT + ALT + &, I get the correct command “I1 XXXX” added in the Command.txt file.


Quote:
NOTE, I've been experiencing problems with VirtualDubFilterMod when sending the "Save & Refresh" sequence,
Save NotePad Command.txt file [EDIT: works fine], and then sending 'F5' key to VirtualDubFilteRMod's open Script Editor window.
It refuses to refresh, unless the window is visible, ie not minimised onto the taskbar, its not a big deal, you just
have to make the script editor window tiny and bung it up next to the NotePad window, then it all works ok.
(It used to work ok on taskbar, I think).
Does that concern the updated version, or the former one also ? How is this “Shekh the magnificent” related to this ?


Quote:
Why do you foreigners have to be awkward and speak strange languages and use odd keyboards, just to be difficult I guess.
Dunno, but here there's a proverb saying “Un homme AZERTY en vaut deux” ! (Well, hard to translate that pun, the actual proverb is “Un homme averti en vaut deux”, meaning “A man who is aware is worth two men”, and “averti” is pronunced almost the same as “AZERTY”...)
Actually, you may already know this, the layout of keys on keyboards was originally designed to slow down the typing, so as to limit the risk of jamming the early typewriters...
https://en.wikipedia.org/wiki/QWERTY

Last edited by abolibibelot; 3rd January 2018 at 08:07.
abolibibelot is offline   Reply With Quote
Old 3rd January 2018, 08:54   #25  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
(PAV. NUM.), === USB Numerical Keypad ???:- https://www.google.co.uk/search?q=%2...DM3U8gfj3ru4BA

I think W7+ (maybe Vista+, arrh!, I'm on XP32), added some stuff to Accessories/Accessibility/ for setting eg Gamma Ramp, screen inversion etc,
maybe thats part of the CTRL + SHIFT + ALT + 2<---> 8, stuff, or some 'Value Added' Usb numerical keyboard gunk,
maybe you can access some of its settings and turn off the gunk (check also .Accessibility/ stuff to see what hotkeys it installs by default).
You could always look at your graphics card driver stuff [on XP, right click DeskTop, Properties, Settings, Advanced, and see what they have left there to play with.
I switch them all off one by one, then disable hotkeys stuff, disable any daft taskabar icon accessory, then go into Services (via 'My Computer/Manage', on XP),
and disable Ati HotKey Poller, that usually gets rid of all gunk grafix stuff.
[I needed some XP screen Inversion {Black<--->White<-->Black} tool some time ago, and managed to come up with this:- XP Screen color inversion ]

Quote:
Does that concern the updated version, or the former one also ? How is this “Shekh the magnificent” related to this ?
Both, (did not affect previous versions of VirtualDubFilteRMod). "Shekh the Magnificent", lives here :- All Hail Shekh

Quote:
you may already know this
Yep, quite common knowledge. Used to know somebody that collected and repaired old typewriters (nasty old tall mechanical things, maybe Edwardian),
not hard to imagine them getting their 'hammer arms' in a tangle.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 3rd January 2018 at 09:08.
StainlessS is offline   Reply With Quote
Old 3rd January 2018, 09:23   #26  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Quote:
Originally Posted by Bernardd View Post
abolibibelot, have you try this martin53's script https://forum.doom9.org/showthread.p...51#post1600151
I am trying this right now, but I haven't yet figured out how it should be used according to the nature of the defects that need to be corrected, and which parameters significantly affect the outcome (the script is quite long and the instructions quite sparse). With the default parameters, it just replaces the identified bad frames by one of the adjacent frames, is that correct ? How can it be set to interpolate frames, and how does it perform, compared with Morph, FrameSurgeon and similar functions ? If it does work as intended that would be a huge time saving, but I'd still want to know which frames were replaced and review them.

The amount of informations I found on this topic is almost as overwhelming as the task itself...
abolibibelot is offline   Reply With Quote
Old 3rd January 2018, 10:03   #27  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Quote:
(PAV. NUM.), === USB Numerical Keypad ???
No, just the regular numerical keypad on the right side of a desktop keyboard. With an AZERTY keyboard it's more convenient to use this as the numerical keys on the left are on “second row” as you mentioned.


Quote:
I think W7+ (maybe Vista+, arrh!, I'm on XP32), added some stuff to Accessories/Accessibility/ for setting eg Gamma Ramp, screen inversion etc,
maybe thats part of the CTRL + SHIFT + ALT + 2<---> 8, stuff, or some 'Value Added' Usb numerical keyboard gunk,
maybe you can access some of its settings and turn off the gunk (check also .Accessibility/ stuff to see what hotkeys it installs by default).
You could always look at your graphics card driver stuff [on XP, right click DeskTop, Properties, Settings, Advanced, and see what they have left there to play with.
I switch them all off one by one, then disable hotkeys stuff, disable any daft taskabar icon accessory, then go into Services (via 'My Computer/Manage', on XP),
and disable Ati HotKey Poller, that usually gets rid of all gunk grafix stuff.
Well, anyway, it works with the numerical keys on the left, so I should be able to proceed, as I will mostly need I1 & I2, if I need something else that doesn't work natively I'll edit the .ini file.

In the mean time I made some tests, comparing Morph and FrameSurgeon with several other scripts I could find :
bad frames interpolation tests
FrameSurgeon performs best overall. Morph leaves some motion artifacts but does correct the jerkiness and effectively restores the sharpness in still areas for all three frames. FixBadFrames on the contrary interpolates the motion very well (at least for the first frame) but leaves the picture blurred elsewhere (second and third interpolated frames are worse). Interpolate_bad_frames and RX almost as good as FrameSurgeon (RX is probably second best behind FrameSurgeon). BadFrames is a poor performer, if I used it correctly, worst of the bunch.

Scripts used for this test :
– Morph
https://forum.doom9.org/showthread.php?t=161154
– FrameSurgeon (with SawBones)
https://forum.doom9.org/showthread.php?t=173158
– RX
https://forum.doom9.org/showthread.p...29#post1600429
– Interpolate2 / Interpolate_bad_frames
https://forum.doom9.org/showthread.p...28#post1600428
– Interpolate (apparently an earlier version of the one above, and produces an inferior result – but not as bad as BadFrames)
https://forum.doom9.org/showthread.p...24#post1554824
– FixBadFrames
https://forum.doom9.org/showthread.p...01#post1600501
– BadFrames
http://avisynth.org.ru/badframes/badframes.html


Oh, and I found a precise answer to one of my initial questions in this thread :
https://forum.doom9.org/showthread.php?t=152758&page=3
"Cobo, I've been using Mug Funky's Morph before now but don't much like it for several reasons, both trivial and important. The important one is the fact if I try to call it more than a dozen-15 times in the script, I get an out of memory error. So the movie has to be broken up into pieces, encoded separately as lossless, and then rejoined."
https://forum.doom9.org/showthread.php?t=152758&page=4
"I did get an out of memory error once, but it was during the encode and didn't pinpoint RX as the cause. When using Morph I get it just loading the script if too many frames are being interpolated."
So running Morph with that many calls would most likely not work.


And so, how would you proceed to convert the Morph commands to FrameSurgeons commands ?

Last edited by abolibibelot; 3rd January 2018 at 11:16.
abolibibelot is offline   Reply With Quote
Old 3rd January 2018, 10:52   #28  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Quote:
I'll edit the .ini file.
I'de have to make all key combos available, there were only a few editable in ini. Did not anitcipate any problems with the numerical keys combos.
I'll see what I can do.


Quote:
And so, how would you proceed to convert the Morph commands to FrameSurgeons commands
No idea, dont know what your Morph commands look like [I guess something like Morph(23,25) or similar, to fix frame 24 (from memory of reading the morph thread)].
I would just knock up a script for parsing the commands file (or script portion), extracting two numbers, adding 1 to first and subtract 1 from second, and convert to an Id command, and write it out to another file. I find parsing frames files not so difficult at all.

EDIT: I could have easily used CTRL/ALT/Letter combos, however I use them extensively in my own system wide hotkeys.

EDIT: Also NOTE, VirtualDub/FilterMod uses loads of hotKeys which you also cannot use in SawBones.
EDIT: I guess that I can easily get around the VDFilterMod F5 Save & Refresh thing, by shifting focus to the script window, before sending F5 key, and then shifting back to FilterMod window. (have not tried that yet, but I expect that it should be ok).

EDIT: What version NotePad2 do you use ? and I assume that there is an Avisynth syntax highlighter option, is there also possibility of playing via eg MPC-HC and viewing help file within NotePad2, on some key combo ? (the old version by original author looked quite good, and very light weight).
EDIT: At ~300KB for largest file, I downed them all, both 32bit and both 64bit.
EDIT: I usually use PsPad for hacking out a script & quick test for errors in MPC-HC or MPlayer2 (old WMV from about W98 or W2K), and when roughly about right, switch to VirtualDubFilteRMod script editor, and finally PsPad again (or NotePadPlus) for beautifying (eg TABS to SPACES).

EDIT: Dont know if more have been added, this I knocked up quite some time ago. [EDIT: Does not incl new AVS Script Editor hotKeys]

VDubAccelerators.txt
Code:
FILE MENU:

CTRL/O              Open Video file
F2                  Re-Open Video file
SPACE               Preview Input
ENTER               Preview Filtered
F5                  Preview Output From Start
F7                  SaveAs AVI
SHIFT/F7            Save Old Format AVI
CTRL/W              Close AVI
CTRL/SHIFT/F7       Queue Batch Save AVI
CTRL/L              Load Processing Settings
CTRL/S              Save Processing Settings
F4                  Job Control
CTRL/Z              Undo

EDIT MENU:
CTRL/Y              ReDo
CTRL/X              Cut
CTRL/C              Copy
CTRL/V              Paste
DELETE              Delete
CTRL/D              Clear Selection
CTRL/A              Select ALL
HOME                Set Selection Start
END                 Set Selection End

VIEW MENU:
F9                  Toggle Input Input Video Pane
F10                 Toggle Output Input Video Pane
SHIFT/F10           View decompressed Output
F8                  Log
SHIFT/F8            Real-Time Profiler

GO MENU:
CTRL/LEFT           Beginning
CTRL/RIGHT          End
LEFT                Previous frame
RIGHT               Next Frame
SHIFT/LEFT          Previous KeyFrame
SHIFT/RIGHT         Next KeyFrame
ALT/LEFT            Back 50 Frames
ALT/RIGHT           Forward 50 Frames
PAGEUP              Back 50 Frames
PAGEDOWN            Forward 50 Frames
SHIFT/[             Prev Drop Frame
SHIFT/]             Next Drop Frame
SHIFT/,             Prev Range
SHIFT/.             Next Range
[                   Goto Selection Start
]                   Goto Selection End
CTRL/SHIFT/LEFT     Goto Prev Scene
CTRL/SHIFT/RIGHT    Goto Next Scene
CTRL/G              Goto Frame

VIDEO MENU:
CTRL/F              Filters
CTRL/R              FrameRate
CTRL/P              Compression
CTRL/1              Copy Source frame to ClipBoard
CTRL/2              Copy Output frame to ClipBoard

AUDIO MENU:
CTRL/I              Interleaving
CTRL/N              Conversion

HELP MENU:

F1                  Help


#############################################################
######################         SORTED BY TYPE        ########
#############################################################
PLAIN KEYS:
[                   Goto Selection Start
]                   Goto Selection End
SPACE               Preview Input
ENTER               Preview Filtered
DELETE              Delete
HOME                Set Selection Start
END                 Set Selection End
LEFT                Previous frame
RIGHT               Next Frame
PAGEUP              Back 50 Frames
PAGEDOWN            Forward 50 Frames


CTRL KEYS:
CTRL/1              Copy Source frame to ClipBoard
CTRL/2              Copy Output frame to ClipBoard
CTRL/A              Select ALL
CTRL/C              Copy
CTRL/D              Clear Selection
CTRL/F              Filters
CTRL/G              Goto Frame
CTRL/I              Interleaving
CTRL/L              Load Processing Settings
CTRL/N              Conversion
CTRL/O              Open Video file
CTRL/P              Compression
CTRL/R              FrameRate
CTRL/S              Save Processing Settings
CTRL/V              Paste
CTRL/W              Close AVI
CTRL/X              Cut
CTRL/Y              ReDo
CTRL/Z              Undo
CTRL/LEFT           Beginning
CTRL/RIGHT          End
CTRL/SHIFT/F7       Queue Batch Save AVI


FUNCTION KEYS:

F1                  Help
F2                  Re-Open Video file
F4                  Job Control
F5                  Preview Output From Start
F7                  SaveAs AVI
F8                  Log
F9                  Toggle Input Input Video Pane
F10                 Toggle Output Input Video Pane

SHIFT KEYS:
SHIFT/[             Prev Drop Frame
SHIFT/]             Next Drop Frame
SHIFT/,             Prev Range
SHIFT/.             Next Range
SHIFT/LEFT          Previous KeyFrame
SHIFT/RIGHT         Next KeyFrame
SHIFT/F7            Save Old Format AVI
SHIFT/F8            Real-Time Profiler
SHIFT/F10           View decompressed Output


CTRL/SHIFT/LEFT     Goto Prev Scene
CTRL/SHIFT/RIGHT    Goto Next Scene
ALT/LEFT            Back 50 Frames
ALT/RIGHT           Forward 50 Frames
EDIT:
Code:
#############################################################
###############  AVS SCRIPT EDITOR WINDOW  ##################
#############################################################

FILE MENU:
CTRL/N            New
CTRL/O            Open
CTRL/S            Save
F2                Save
F5                Save & Refresh
F7                Save & Open as AVI
CTR/Q             Exit

EDIT MENU:
CTRL/Z            Undo
CTRL/Y            Redo
CTRL/G            Goto
CTRL/F            Find
F3                Find Next
SHIFT/F3          Find Prev
CTRL/P            Insert Position
CTRL/R            Insert Range
CTRL/T            Insert Trim with Range
CTRL/I            Insert Frameset as Trims
CTRL/SHIFT/O      Insert Filename
CTRL/ALT/SHIFT/C  Comment Selected Lines
CTRL/ALT/SHIFT/U  UnComment Selected Lines
EDIT: Conflicts with AVS script editor dont matter. (its the VD main window that will be active).

EDIT: VDFilterMod also has ability to edit DeComb and VapourSynth scripts, but no idea how Decomb thing behaves, and VapourSynth
editor is very limited, because no-one that was interested had any idea about VapourSynth syntax nor vs requirements.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 3rd January 2018 at 13:20.
StainlessS is offline   Reply With Quote
Old 3rd January 2018, 22:52   #29  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Wow, that's a lot of edits !

Quote:
No idea, dont know what your Morph commands look like [I guess something like Morph(23,25) or similar, to fix frame 24 (from memory of reading the morph thread)].
I would just knock up a script for parsing the commands file (or script portion), extracting two numbers, adding 1 to first and subtract 1 from second, and convert to an Id command, and write it out to another file. I find parsing frames files not so difficult at all.
Yes, that's it. And Morph(23, 27) to fix frames 24, 25, 26 for instance. So the difficulty, if there is one, is to correctly set the number of frames to interpolate.
Doing that kind of script is what I'd like to learn here.

What I did was : open the script into Calc, using “( , )” as separators, in the next column, add 1 to the first number, in another column, create a formula to calculate [second number] - [first number] - 1 ; then copy those values to Notepad2, add “I” at the begining of every line (Edit > Block > Modify lines > Prefix text to lines). It's quite rudimentary but it does the job !

But anyway, I think I'll just start all over again, since I have to see the effect on each treated frame, and it'll be much quicker than the first time around with SawBones (and with this method being so much quicker, and the FrameSurgeon function apparently being much easier on the system, I can add frames with light defects which I ignored before).


Quote:
I'de have to make all key combos available, there were only a few editable in ini. Did not anitcipate any problems with the numerical keys combos.
Quote:
I could have easily used CTRL/ALT/Letter combos, however I use them extensively in my own system wide hotkeys.
As I said, it does work with the numerical keys on the left. I almost never use those ones, since they're not in direct access, but on “second row” as you mentioned, that's why I didn't even try them at first.
But that may have been more convenient with letters indeed, as the current hotkeys for I1, I2, I3 (probably the only ones I'll need here, and probably the most useful in most situations) are too awkward to type with the left hand, while progressing through the footage with the right hand on the left-right arrow keys.


Side question : should I place the interpolation commands before or after the denoising ?


Quote:
What version NotePad2 do you use ? and I assume that there is an Avisynth syntax highlighter option, is there also possibility of playing via eg MPC-HC and viewing help file within NotePad2, on some key combo ? (the old version by original author looked quite good, and very light weight).
Just the regular, official build in 64-bit. I'm not sure what you want to know exactly. In my config, Notepad2 is launched in every situation where the native Notepad would be launched.
Another text editor I use when I need some special features which are not in Notepad2 is TEDNotepad : that one is based on the native Notepad at its core, which has some drawbacks (it doesn't display line numbers on the main window, only in the status bar, doesn't have syntax highlighting and other refinements), but is otherwise packed with special features, allowing for instance to move and/or duplicate blocks of texts by defining them as columns, using any character as separator.

Last edited by abolibibelot; 3rd January 2018 at 22:57.
abolibibelot is offline   Reply With Quote
Old 4th January 2018, 01:43   #30  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Quote:
should I place the interpolation commands before or after the denoising ?
Sorry, you cant do that. You can interpolate OR FXn replace[denoise], after all interpolations/replacments done, then can delete frames.
ClipClop [Replacement/Interpolations] are further (afterwards) processed, by Prune[range deletions] filter.

Interpolations are just replacments, replaced with a 'Magic' Interpolation clip.
FXd replacements can replace other FXd replacements, but that is just because the last one takes precidence, ie it does the last one
and ignores the previous ones. But you cannot 'break' a 'Magic' ie Interpolated clip, you cannot replace any frame of one, but as deletes are
processed later in Prune, you can delete any/all of an interpolated sequence.
EDIT: You can remove eroneous edits in Command.txt file just by switching to notepad window and, well, editing them.

You can eg denoise your source before using FrameSurgeon, eg src=src.MCDegrain(2) or whatever. (or silimar to the result of Framesurgeon).

EDIT: There is probably not much to stop you doing say two passes of FrameSurgeon, but the first pass edits should be completed
and processed with Show=False,Final=True, and passed on as source to the second installment of FrameSurgeon for hand edit, final edit.


Anyway, I'm knackered and gonna get some shuteye, so,

find SawBones-v1.05_Beta2-20180104 on SendSpace (below in my Sig) or here:- LINK REMOVED

Pretty much done, just really editing doc file and maybe a little more tinkering, but all key combos now user editable.
VDFM Script Editor window need to be open, if on taskBar will pop up in screen when save & refresh key pressed.
I could not get it to respond to keys when minimized (it aint a normal windows window or controls), so have to activate it.

I noted that on my Keyboard ALT/1 etc all available, also Windows key may be available.

Here a snip from doc that I'm editing.

Code:
SawBones v1.05, (c) StainlessS @ Doom9:- https://forum.doom9.org/showthread.php?t=173158


SawBones/FrameSurgeon, a VirtualDubFilterMod/Avisynth script, utility combo to edit bad frames.
Create Command file in VirtualDubFilterMod [VDFM] with Sawbones, and use Command file in Avisynth script function FrameSurgeon.
SawBones now requires VirtualDubFilterMod, and also requires standard system NotePad, both NotePad and VDFM AVS Script editor
windows should be open (you can make them smallish and leave them above/below the VDFM main window). Sawbones will appear as a
little icon on the Right Hand Side of the task bar (SawBones does not have a window).

Quick intro:
    Create a Command.txt file and load into NotePad. Create a client script calling FrameSurgeon with args
        FrameSurgeon(...,Cmd="Command.txt",Final=False,Show=True)
    and open this client script in VDFM and with the VDFM Script editor window open, then run SawBones, now you are set to go.
        You can scroll through a video clip in VDFM, and press the SawBones "Frame Delete" key combo to insert a FrameSurgeon
    delete (DEL n) command for the current frame into the NotePad Editor. You press the keys with VDFM as the active window (not NotePad).
    After entering the frame delete command, you could (if desired) then press the 'Save & Refresh' key combo, and the contents of
    NotePad Command.txt file will be saved, and then VDFM will reload the script at the same position so you can see the deleted frame.
    (In actual fact, when using FrameSurgeon with Sawbones, you should use the FrameSurgeon args Final=False,Show=True, so that
    FrameSurgeon will not actually delete frames, but only mark the frames with some "DUMMY_DELETE" type subtitle in red,
    deleting them for real would screw up any further edits, plus you can scroll back and forth to see what
    frames will be deleted and perhaps spot any mistakes). Save your Command.txt file, you can now run the same client
    script with Final=True,Show=False to edit the clip for real, job done.
A Bit More
Code:
Default: SawBones.ini file, created on first use of Sawbones.Exe (can just delete ini file and will be recreated on next execution)
You can edit the "KEY_xxxxx" entries in the [UserKeys] Section, and also the "Comment" entry in the [UserComment] Section.
##############
    [Default]
    COMMENT= : RangeEndIsExclusive: 0 = Avisynth : 1 = VirtualDub
    RangeEndIsExclusive=0
    [UserKeys]
    COMMENT_1= : Accelerator keys:- CTRL=^ ALT=! SHIFT=+ WINDOWS=#
    COMMENT_2= : Accelerators before key characters eg '^{a}' not '{a}^'
    COMMENT_3= : Wrap the character part (excluding ^+!#) in curly braces eg {1} for key 1
    COMMENT_4= : Use Lowercase for alphabetic keys eg {a} not {A}
    COMMENT_5= : Where multiple characters on same keyboard key, use the lower one.
    COMMENT_6= : eg CTRL/SHIFT/ALT/a = '^+!{a}' and CTRL/F1 = '^{F1}'
    COMMENT_7= : Hotkeys must not be in use by system nor by VirtualDub FilterMod main window.
    COMMENT_8= : More=http://www.autoitscript.com/autoit3/docs/functions/Send.htm
    COMMENT_9= : More=http://www.autoitscript.com/autoit3/docs/functions/HotKeySet.htm
    COMMENT10= : Count of currently modified HotKeys = 0
    KEY_DeleteFrame=^{DELETE}
    KEY_DeleteRange=^+{DELETE}
    KEY_CopyFrameFromSourcePrevious=^{F1}
    KEY_CopyFrameFromSourceNext=^{F2}
    KEY_ReplaceFrameWith_FX1=^{1}
    KEY_ReplaceFrameWith_FX2=^{2}
    KEY_ReplaceFrameWith_FX3=^{3}
    KEY_ReplaceFrameWith_FX4=^{4}
    KEY_ReplaceFrameWith_FX5=^{5}
    KEY_ReplaceFrameWith_FX6=^{6}
    KEY_ReplaceFrameWith_FX7=^{7}
    KEY_ReplaceFrameWith_FX8=^{8}
    KEY_ReplaceFrameWith_FX9=^{9}
    KEY_ReplaceRangeWith_FX1=^+{1}
    KEY_ReplaceRangeWith_FX2=^+{2}
    KEY_ReplaceRangeWith_FX3=^+{3}
    KEY_ReplaceRangeWith_FX4=^+{4}
    KEY_ReplaceRangeWith_FX5=^+{5}
    KEY_ReplaceRangeWith_FX6=^+{6}
    KEY_ReplaceRangeWith_FX7=^+{7}
    KEY_ReplaceRangeWith_FX8=^+{8}
    KEY_ReplaceRangeWith_FX9=^+{9}
    KEY_Interpolate_1=^+!{1}
    KEY_Interpolate_2=^+!{2}
    KEY_Interpolate_3=^+!{3}
    KEY_Interpolate_4=^+!{4}
    KEY_Interpolate_5=^+!{5}
    KEY_Interpolate_6=^+!{6}
    KEY_Interpolate_7=^+!{7}
    KEY_Interpolate_8=^+!{8}
    KEY_Interpolate_9=^+!{9}
    KEY_InterpolateRange=^+!{/}
    KEY_NotepadSaveAndRefresh=^+!{,}
    [UserComment]
    Comment=QWERTY_UK
##############
A Bit More
Code:
A SawBones created Command file may look something like this:-
(Later commands take presidence so order does matter, Interpolated ranges CANNOT be replaced[error in FrameSurgeon] but can be later deleted)

##############
    DEL 400,449    # Delete frames 400 to 449 (AFTER ALL replacments done, ie as if at end of command file)
    I3  10         # Interp 3 frames 10 -> 12, using 9 and 13 as source
    CP  40         # Replace frame 40 with frame 39
    CN  41         # Replace frame 41 with frame 42
    FX1 50,199     # replace range 50,199 with same range from FX1 clip
    FX2 300,599    # replace range 300,599 with same range from FX2 clip
##############
EDIT: Multiple deletes on same frame will result in only a single deletion.

Good night.

EDIT: Number of non default User Hotkey shown in sawbones via ToolTip when switch to VDFM window.
Also shows any UserComment that is set in ini file, eg QWERTY_UK by default.
Also shows RangeEndIsExclusive status if non default.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 4th January 2018 at 20:23.
StainlessS is offline   Reply With Quote
Old 4th January 2018, 02:24   #31  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Sometimes there's a bug when using SawBones, for instance instead of typing “I2 25474” it types “I2 2544”, I had another instance where the last digit was replaced by a “"” (quotation sign).


Also, when I try the save/reload hotkey (or if I just type F2 to reload the script), I get an error :

Code:
Avisynth open failure:
Evaluate: System exception - Access Violation
([GScript], line 187)
([GScript], line 188)
([GScript], line 189)
([GScript], line 219)
(G:\20131224 M2TS\20151224 pour encodage.avs, line 552)
(G:\20131224 M2TS\20151224 pour encodage.avs, line 4)
Could it be because the script is also open in AVSPmod ?

If I reload the script by drag-and-drop, I get another error :

Code:
Avisynth open failure:
ClipClop: ERROR, CMD  Line 22 *NON PARSE* $I1  1766& @ &
([GScript], line 218)
([GScript], line 219)
(G:\20131224 M2TS\20151224 pour encodage.avs, line 552)
(G:\20131224 M2TS\20151224 pour encodage.avs, line 4)
Oh, right, that one is caused by another wonky line : “I1 1766&”.


Quote:
Sorry, you cant do that. You can interpolate OR FXn replace[denoise], after all interpolations/replacments done, then can delete frames.
ClipClop [Replacement/Interpolations] are further (afterwards) processed, by Prune[range deletions] filter.
I should have been more clear : my script contains a SMDegrain filter for a large part of the footage, including the sequences that need frame fixing. So far I did this :

Code:
AVISource("I:\20131224\20151224.avi")
ConvertToYV12(matrix="Rec709")
S1 = Trim(0, 360)
S2 = Trim(361, 18883).SMDegrain(thSAD=200)
S3 = Trim(18884, 22819)
S4 = Trim(22820, 63800).SMDegrain(thSAD=200)
S5 = Trim(63801, 81930)
S6 = Trim(81931, 83390).SMDegrain(thSAD=200)
S7 = Trim(83391, 84190).SMDegrain(thSAD=400)
S8 = Trim(84190, 0).SMDegrain(thSAD=200)

S1 ++ S2 ++ S3 ++ S4 ++ S5 ++ S6 ++ S7 ++ S8

*** frame fixing functions added here ***
So, should I first fix the frames, then denoise (if denoising affects the interpolating process in a bad way), or the other way around (if it improves it rather), or it doesn't matter ? Also, can the order of the filters affect the global processing speed ?


Quote:
Anyway, I'm knackered and gonna get some shuteye, so, find SawBones-v1.05_Beta2-20180104 on SendSpace (below in my Sig) or here:- https://www.sendspace.com/file/ge6c0v
Thanks a lot, you're tremendously helpful. I'll try it right away. Good night too.
abolibibelot is offline   Reply With Quote
Old 4th January 2018, 04:08   #32  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
So, after replacing the SawBones.exe file with the 1.05 beta version, I tried to edit the .ini file, changing the first interpolate hotkeys to ^+!{x} (x, c, v, b, n for 1, 2, 3, 4, 5), but it doesn't work, the former hotkeys are still active (also tried ^+{x}, both can be used for a shortcut). I terminated the SawBones process, closed VDFM, re-opened VDFM, re-launched SawBones, to no avail.

I still get random erroneous characters like :
Code:
I1  2561
I1  25612
I1  25616
I1  25621
I1  25623
I1  25627
I1  25633
I1  25636
I1  25638
I1  25-50
I1  2565(
But at least I'm moving forward at a less excruciatingly slow pace !
abolibibelot is offline   Reply With Quote
Old 4th January 2018, 20:26   #33  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
OOps sorry, I re-posted the same link as the previous one, I'de copied zip to a temp folder, and then from inside SentSpace wizard, went to wrong temp folder and re-uploaded the previous version, again.

Sorry again, [EDIT: I told you I was Knackered ]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 5th January 2018 at 01:05.
StainlessS is offline   Reply With Quote
Old 5th January 2018, 01:08   #34  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Here SawBones-v1.06_Beta-20180105.zip:- LINK REMOVED

Several bug fixes, I think that you may find all of your problems have disappeared.

I had done a few silly mistakes that did not affect me, only non qwerty users.

I need a good slap on the wrist, sorry [Again].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 4th December 2018 at 17:13.
StainlessS is offline   Reply With Quote
Old 10th January 2018, 04:55   #35  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
About Shortcuts and what I said about it not being possible to link a hotkey with the program that set it,
well, just updated the whole lot [EDIT: About 200 utils] of my NirSoft catalog of utils, and ShortcutsMan, now identifies the program that sets a particular hotkey.

https://www.nirsoft.net/utils/shman.html

NOTE, I had to disable Comodo DNS and switch to Open DNS, as Comodo just would not let me go there, a real pain sometimes that
Comodo stuff. NirSoft is an absolutely brilliant collection of utils, but gets a bad rep with AV software as it has quite a few
password viewing/recovery utils etc, so should perhaps be shown as Pups (Potentially Unwanted Programs), but Comodo DNS
dont give me the opportunity to override it, so Comodo DNS is now out.



Aint nuttin to be scared of, even M$ bundles NirSoft's USBDeview with some stuff.

EDIT: Also InstalledCodec is NirSoft, I'm sure many already use that.
EDIT: Also, the many Live boot CD's that are knocking about, quite often use a dozen or more Nirsoft utils,
Hiren CD/USB probably uses about 50+ Utils from Nirsoft.

EDIT: The linked page makes no mention of OS's after XP, just tried with Windows 10 and works fine.

EDIT: Shortcuts Map, also works (only tested on XP) if you are scared of nirSoft:- http://www.zealsoft.com/shortcuts/index.html

EDIT: One of the NirSoft utils is called something like QuickDNS, lets you switch DNS at the click of a button,
gonna use that and Comodo as primary DNS except where is being awkward.

EDIT: To config Comodo Firewall for maximum security search "How to configure Comodo Internet Security",
on youtube clip @ 33:58 or here:- "https://www.youtube.com/watch?v=4hCoT3fCTxM
You can also set it up with multiple DNS in "Network Zones" (not shown in clip), so that clicking alternate DNS in NirSoft QuickDNS is all that is needed to switch. [You set multiple IP addresses in a Network Zone, and use the named NetWork Zone rather than IP addresses when configuring the firewall 'Application Rules' for svchost.exe].
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 4th December 2018 at 15:33.
StainlessS is offline   Reply With Quote
Old 13th January 2018, 23:52   #36  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
abolibibelot,

You do not seem to have been online since the 4th, please if you do come back respond, give us a clue, please. You may assist a lot more than yourself. thanx.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 4th December 2018, 04:36   #37  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
So I'm revisiting this thread only now, sorry for being so slow... _

I managed to finish that daunting task in May, after several delays, ending up with more than 4800 FrameSurgeon commands created by checking about 35min. of 29.97 FPS footage frame by frame, which amounts to about 50.000 frames, most of which showing a wooden coffin with my grandmother inside... Sawbones was a huge time saver, and a definite sanity saver !

@StainlesS : On what particular subject did you need a feedback ?
As I said, there were some errors every now and then, some digits substituted by letters or other characters which I had to manually correct. It may or may not depend upon the speed at which I pressed the 4 keys, in a quite awkward hand position (CTRL + ALT + SHIFT + [number]), sometimes in very quick succession once I got immersed in the task, checking ~5 frames per second. I began with v. 1.04 and ended with v. 1.09.

Right now I'm trying to improve that movie ever-so-slightly, by performing the interpolations on the source files rather than the final export from the NLE software as I did previously (some damaged frames were at crossfades so I couldn't repair them satisfyingly). I managed to calculate the shifted values for each script by examining the script opened in AVSPMod, the timeline in the NLE software (positioning each cut sequence next to the complete source file, at the corresponding position), and the first version of the completed movie opened in VirtualDub2.

I'm also looking for possible improvements in interpolation functions over the past few months. FrameSurgeon, although a very good performer overall, sometimes generates ugly artifacts on frames with fast action.
But first I have to solve an issue with the Morph function, which I used for some of those frames on the rare occasions where it produced a better result than FrameSurgeon : with the same command as before, for instance Morph(137,139), I obtain a blend of frame 137 and the last frame of the input, instead of frame 139. I may have to create a dedicated thread for that.
abolibibelot is offline   Reply With Quote
Old 4th December 2018, 17:12   #38  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Quote:
On what particular subject did you need a feedback ?
Quote:
Originally Posted by StainlessS View Post
Here SawBones-v1.06_Beta-20180105.zip:- LINK REMOVED
Several bug fixes, I think that you may find all of your problems have disappeared.
I had done a few silly mistakes that did not affect me, only non qwerty users.
Since then has elevated to v1.09, where I had to guess whether it worked for you or not (guess link posted day after your previous visit was probably OK).

Quote:
As I said, there were some errors every now and then, some digits substituted by letters or other characters which I had to manually correct.
Yep, probably fixed as stated above.

Best source to use is always gonna be from lossless (ideally AVI, reliable frame exact), also note, FrameSurgeon switches OFF scene change detection [thSCD1 & thSCD2] in MvTools, (as Sawbones/FrameSurgeon is user driven, and user presumably thought result was good).
Where bad result, dont mark for use in Framesurgeon, must process later (perhaps with some mvtools solution and with thSCD1 & thSCD2 not switch off, where will probably result in blend / or frame copy depending upon mvtools blend arg).

Quote:
and the last frame of the input, instead of frame 139. I may have to create a dedicated thread for that.
I'll take a look and see if I can spot an error in source.

EDIT: Maybe I should make thSCD1 & thSCD2 switch off optional.

EDIT: SawBones/FrameSurgeon thread with current v1.09:- https://forum.doom9.org/showthread.p...light=SawBones
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 4th December 2018 at 17:18.
StainlessS is offline   Reply With Quote
Old 4th December 2018, 19:39   #39  |  Link
abolibibelot
Registered User
 
Join Date: Jun 2015
Location: France
Posts: 38
Quote:
I'll take a look and see if I can spot an error in source.
Just to be clear, I have this issue with Morph, not FrameSurgeon. I created a new thread which details this particular issue (among other things – perhaps too many things at once !...). I verified, the code is strictly identical to what I copied from this thread in January, and it worked flawlessly then :
https://forum.doom9.org/showthread.php?t=161154
As I said in that thread I created today, StaxRip apparently changed something in the Avisynth+ directory, but I can't figure out what exactly, or determine if it's indeed related with that issue.

I also get this message when opening AVSPMod :
“Error parsing plugin string at position 0:”
And nothing else, so I don't know what the exact problem is...

Quote:
Best source to use is always gonna be from lossless (ideally AVI, reliable frame exact)
Well, as far as I understand it, loading any source in Avisynth produces the equivalent of a lossless video stream for all the processing filters which are applied in the script... Or did you mean something else ?

Quote:
also note, FrameSurgeon switches OFF scene change detection [thSCD1 & thSCD2] in MvTools, (as Sawbones/FrameSurgeon is user driven, and user presumably thought result was good).
I'm not sure I understand that part... What does switching off scene change detection entail in this case ?

Quote:
Where bad result, dont mark for use in Framesurgeon, must process later (perhaps with some mvtools solution and with thSCD1 & thSCD2 not switch off, where will probably result in blend / or frame copy depending upon mvtools blend arg).
Not sure I understand this either !
I've read threads where it was reported that MVTools would produce that kind of artifacts with sources in resolutions higher than 1280x720 :
https://letransfert.soforums.com/t61...S-MVTOOLS2.htm
https://forum.doom9.org/showthread.php?t=165075
Those threads are several years old, do you know if there has been any progress since then ?

Thanks for your quick feedback !
abolibibelot is offline   Reply With Quote
Old 4th December 2018, 20:17   #40  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,012
Which Morph() function, 2nd post ? (there are several with same name).
EDIT: In this thread:- https://forum.doom9.org/showthread.php?t=161154

No idea about AvsPMod, I dont use it.

AviSource is frame accurate, others, not always so. (Other source filters may deliver wrong frame, unless accessed linearly).

If mvTools thinks bad match (via thSCD1, & thSCD2) then skips interpolate and instead either uses simple blend, or copies previous
frame (depends upon mvtools MFlowiInter Blend arg).

Quote:
would produce that kind of artifacts with sources in resolutions higher than 1280x720
Not limited to higher rez.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

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

Last edited by StainlessS; 4th December 2018 at 20:48.
StainlessS is offline   Reply With Quote
Reply

Tags
avisynth, bad frame, interpolate, morph, stabilizer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Forum Jump


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


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