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 > VirtualDub, VDubMod & AviDemux

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd December 2018, 09:31   #1  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Deshaker on Virtualdub2 - no logfile written

Trying to implement a very basic deshaking filter on a video from tripod (strong winds)

Tried to follow such threads as:

https://forum.doom9.org/showthread.php?t=173953
https://forum.doom9.org/showthread.php?t=173956

however it was a bit complex so as a start, just tried deshaker 3.1 from: https://www.guthspot.se/video/deshaker.htm

following the simple short guide, for some reason the LOGFILE is not written on first pass, and as a result, get this notice on output pane:

Code:
 "This frame was not processed in pass 1"
FAQ says it might be permissions...

Tried both methods to preview Preview Input... and "Run video analysis pass" but nothing produced a logfile, attempted to write to same TEMP directory as all other files, so plenty of space and good permissions.

Any clue what can go wrong?

This is avisynth 2.60 build: Mar 31 2015 ...

maybe i should be using something newer? or avisynth+ ? If so, how does one have them installed in parallel and choose which one to pick up for each encoding session?

Thanks in advance.
Stormy.
stormy1777 is offline   Reply With Quote
Old 2nd December 2018, 11:29   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
I've not used deshaker until now, but you already have the plugins required for the Stab function. Maybe give that a try. I've used the standard version and never experienced the green tinting issue mentioned in the wiki. It could have been caused by an old version of a plugin, or maybe I've been lucky.

For deshaker... the output directory and file name for the log file are entered into different columns in the configuration. Did you do it that way? VD2 is in Full Processing mode? Can you see deshaker doing it's thing if you preview the output in first pass mode? Deshaker was definitely in first pass mode? If so, I think it could only be how the directory and file name are specified for the log file.


Last edited by hello_hello; 2nd December 2018 at 11:32.
hello_hello is offline   Reply With Quote
Old 2nd December 2018, 13:28   #3  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
Quote:
Originally Posted by hello_hello View Post
Tractators! I've seen them!
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 2nd December 2018, 16:23   #4  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by davidhorman View Post
Tractators! I've seen them!
Are you old like me?
Well done though. I doubt I could've recalled the correct story/episode from just that screenshot. Then again, I started to lose interest after Tom Baker. And don't get me started on the reboot.....

Edit: I just tried your "I'm the Doctor" link. Blocked where I am by MGM Distribution on copyright grounds, but I got there via a proxy server. You're killing me!
At least it's only up to 2011. Anything much later than that and I'd be force to write an essay on unbelievably shite it is.

Last edited by hello_hello; 2nd December 2018 at 16:47.
hello_hello is offline   Reply With Quote
Old 2nd December 2018, 22:09   #5  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Thanks Hello^2!!

Quote:
Originally Posted by hello_hello View Post
Stab
?

Code:
This filter may not be suitable for color footage; apply with caution
I'll skip the pleasure on that one

This is so funny.... honestly, I cannot make this stuff up

Yes, it is definitely in pass 1, and dir/file are in right fields, I did not see any white dots like in your screenshot, so played with resizing that output pane, it was on 66%, took it to 100%, nothing, went to 200% and suddenly saw the white dots for brief moment, however, view/preview or playback did NOT produce the pass1 file

Turns out that only when moving the video forward/backwars in time using the ARROW (frame by frame) creates the file?!!

That operation, moving of video frame by frame DID the trick! Tried the video preview, preview filter or playback, these went all the way, but, no deshaker file was found

Found some weight to put on the right arrow key so it presses it for 20 minutes then will try pass2 very strange...

I'll post any update as time makes that possible

Stormy
stormy1777 is offline   Reply With Quote
Old 2nd December 2018, 23:11   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Stormy,

You need to "Output Playback" [3rd button from the left] or Menu/File/Preview Output From start/ [or F5],
The 2nd button only plays input file, but you must play output [ie passes input -> filters -> output].

EDIT: Show both panes, only the output pane will show Motion Vectors (if that option is enabled).

EDIT: Or "File/Run Video Analysis Pass" as Hello_hello suggests below (full speed scan).
__________________
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 December 2018 at 23:51.
StainlessS is offline   Reply With Quote
Old 2nd December 2018, 23:41   #7  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by stormy1777 View Post
Code:
This filter may not be suitable for color footage; apply with caution
I'll skip the pleasure on that one
I haven't used it regularly, but I've used it now and then for quite a while and never experienced the green tint problem. That's why I mentioned it earlier, although the way your luck seems to be going....

Quote:
Originally Posted by stormy1777 View Post
Found some weight to put on the right arrow key so it presses it for 20 minutes then will try pass2 very strange...
The "File/Run Video Analysis Pass" method worked for me, and should be the fasted way to do it. I don't know why it's not working for you.

I did notice any path you enter for the log file doesn't stick after VD2 is closed. It defaults to an Application data folder.
It'd save with "File/Save processor Settings" but you'd still have to load the saved file each time you start VD2.
hello_hello is offline   Reply With Quote
Old 3rd December 2018, 07:09   #8  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Well, yeah I guess it's "just me" that's fine using latest of VD2/43073, only thing i suspect maybe is the (maybe older) avisynth 2.60 build: Mar 31 2015 , but otherwise I've done the F5, preview, play output (3rd button), none of them produce the logfile, only the RIGHT arrow pressed continuously, so it disables this keyboard for ~25 minutes

F5/play output plays for ~10 seconds, then stops completely, the dub shows it is in progress, times change, but no cpu is consumed.

Got the logfile (with a paperweight on the right arrow key , but pass2 showed no improvement, then read on the deshaker website

https://www.guthspot.se/video/deshaker.htm

Two interesting things, one:

Quote:
For best results, always try to make sure the white vectors end up on the background in the frames during pass 1, i.e. try to make Deshaker completely ignore objects moving in front of the background.
I guess the "white dots" are the "vectors", and in my case they are on a foreground TREE (that moves with the WIND - how funny), ok, so used the IGNORE PIXELS "inside" and it removed all white dots on the TREE

also from start had unchecked "detect rotation/zoom" since camera is fixed on tripod

As a SIDE TOPIC from the other thread about filesizes being different each encode session, it says sometimes decoders are not frame-accurate, very interesting (I'll get back to that thread as time permits):

Quote:
Also, you should be aware that not all video decoders are frame accurate, which means that a certain frame might get a different frame number in each Deshaker pass, which means that completely wrong compensations will be made to the frames

finally, noticed StainlessS:

Quote:
EDIT: Show both panes, only the output pane will show Motion Vectors (if that option is enabled).
so, decided to disable it on pass1, and output panes showed these nice colors, two images alternating as frames are moved, not sure if this is valid.. sounds like some sort of corruption as time permits I'll get another pass1 file with areas ignored and report back...

Stormy
Attached Images
  
stormy1777 is offline   Reply With Quote
Old 3rd December 2018, 07:46   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
The only other possibility that comes to mind is to make sure the "View/Drop Frames When Behind" option is unchecked, but I'm not really sure when it actually applies.

Have you tried this? I'm not sure if it's a new thing as I only discovered it today. It's under the (edit) Options menu. The second screenshot is while running an analysis pass.




Last edited by hello_hello; 3rd December 2018 at 08:48.
hello_hello is offline   Reply With Quote
Old 3rd December 2018, 08:23   #10  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
That "drop when behind" is in the OPTIONS menu, not view, and it was unchecked

However, that got me to revisit the Ctrl-R window, see prior screenshot; I'm telling VD to change to 165 FPS (to "trim" down the long video), then saying "convert to 25fps" for "normal viewing", I don't want to end up with videos at 100+ fps for no good reason ...

The thing that DISABLES writing of the logfile is the option to convert to 25fps, just telling it to change fps rate to 165 is fine and log file is PRODUCED even with "run video analysis pass".. as soon as the "convert to 25fps" is set, the deshaker logfile is NOT PRODUCED

I guess this is some sort of "bug" or logic issue, but not sure how to proceed, I'm now trying pass1 withOUT convert to 25fps, and pass2 with convert to 25fps, not sure if that is "valid" sure beats the paperweight method

Stormy.
stormy1777 is offline   Reply With Quote
Old 3rd December 2018, 08:39   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
That sort of thing would probably cripple the deshaker plugin anyway, assuming changing the frame rate to 25fps drops frames before any filtering is applied. You might have to output an intermediate lossless file with deshaker applied, then encode the lossless version while applying the frame rate stuff.

It pays to upload screenshots to a site like this one (no registration required), and paste the thumbnail links here, otherwise you can wait a long time for attachments to get approved, assuming a mod notices them.

Last edited by hello_hello; 3rd December 2018 at 08:42.
hello_hello is offline   Reply With Quote
Old 3rd December 2018, 09:57   #12  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
ok, you'r right, thanks for the tip to separate the processing.. more clear now... got lots of 'skipping due to too few blocks are ok', now got a "brilliant" (or not) idea to add GREYSCALE filter before deshaker, it seems to have helped find more movement i think; the uncompress first pass says it will run for 2hrs 7fps projected filesize 220GB I got 2hrs to find space for such a monster!!! or maybe there is a better lossless than RGB (which is the first option in VD2) ?
stormy1777 is offline   Reply With Quote
Old 3rd December 2018, 11:35   #13  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
PROGRESS!!! With the greyscale filter, and lossless first pass produced a nice file that has different values (before values were almost constant throughout).

Saved a small 20 sec section, and shaking is greatly reduced.

For pass2 (filesize concern), choose "FFMPEG / x265 lossless" that came to reasonable size, also found that x264 has a "single pass lossless", which resulted in even smaller file, so i'll go with that since the final codec will be x264...

Strange sizes though: for same segement, x265-lossless size was 318MB, 264-lossless: 249MB, also, for entire video, original size is 1.8GB, but the x264lossless shows as final size 13GB, almost 10x more, anyways, that's not a concern since will reprocess that with compression on next step, just curious why lossless can't do it with roughly same original filesize

I think in few more hours we'll have a happy ending

Stormy...
stormy1777 is offline   Reply With Quote
Old 3rd December 2018, 16:11   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
just curious why lossless can't do it with roughly same original filesize
Because original file is not compressed losslessly.
Lossless throws away small differences (where assumed not visible, a man on a galloping horse may not see it,
pretends that they are not different) and that is where major saving are made,
lossless compresses everything so as to get back exactly the same as the source, where the major savings cannot be made.
Lossless(or near lossless) used where clip will be further processed, Lossy where no more editing to be done for final render.
__________________
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 December 2018 at 22:29.
StainlessS is offline   Reply With Quote
Old 3rd December 2018, 16:14   #15  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
The Lagarith Lossless Codec might be worth trying. It'll probably be faster than x264/x265 lossless, although I don't know for sure as I haven't used the latter two for lossless encoding. FFmpeg Huffyuv Lossless should be reasonably fast. It appears to default to RGB, which probably doesn't matter as I think deshaker is an RGB filter so it'll be converted anyway. If you don't tell FFmpeg Huffyuv to convert to YV12, you might have to ensure the lossless version is converted to YV12 yourself for x264 encoding.

Lossless files are always much larger than the lossy sources used to create them, as they don't throw information away, whereas you can achieve the same file size with lossy re-encoding, but there's always a loss of quality, at least in theory. How perceivable it is depends on the bitrate etc.
Some lossless formats compress more than others. It tends to be a speed vs compression thing. If you want to see really big files, try the Uncompressed RGB/YcbCr option for creating the lossless output (Edit: Whoops, I missed where you said you already tried that).

I don't know enough abut how deshaker works to comment on using greyscale for the first pass.

Last edited by hello_hello; 3rd December 2018 at 16:28.
hello_hello is offline   Reply With Quote
Old 3rd December 2018, 16:22   #16  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Lagarith may be better compression if many identical dupes present in source. (where it outputs 'null frames')
__________________
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 3rd December 2018, 22:11   #17  |  Link
stormy1777
Registered User
 
Join Date: Jul 2002
Posts: 241
Thanks friends, I almost feel like Dorothy in Wizard of OZ, so many helpers, where are the flying monkeys ??

It was a BIT bumpy but very JOYFUL ride managed to learn/use deshaker.. it wasn't a HUGE improvement, but it did DO something, i guess if someone has the time to play with all the knobs you can get it better, but for now, this will do...best lesson is to make sure source is better to begin with

As for filesize/lossless, sure, totally understand that lossLESS will not "throw away" data, however, my difficulty is that the SOURCE is already the Maximum data that can ever exist, by INCREASING the filesize it will not ADD more information .. in theory, poor-man's loss-less should be OS COPY of the file...

Anyways, I was thrown away by the RGB-lossless (first option in VD2) wanting to produce 300GB file or something crazy like that; later found the others which yield a much much smaller file even from the original source, and still are regarded loss-less, which makes more sense...

BTW: The x264-lossless produced 12.8GB, then tried the Lagarith on that file, and it grew to 30GB (no audio, just video).. there is very little movement/motion.. without running a scientific comparison, seems the x264-lossless has smallest filesize.

we're all good, until the next bump in the road

Cheers.
Stormy.
stormy1777 is offline   Reply With Quote
Old 4th December 2018, 00:52   #18  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by stormy1777 View Post
As for filesize/lossless, sure, totally understand that lossLESS will not "throw away" data, however, my difficulty is that the SOURCE is already the Maximum data that can ever exist, by INCREASING the filesize it will not ADD more information
The source is created using lossy "compression" though.
hello_hello is offline   Reply With Quote
Reply

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 08:35.


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