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. |
![]() |
#42 | Link |
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
This is a little complicated.
![]() There are three types of blocks: A. Ok blocks. Have white motion vectors. B. Blocks discarded due to bad motion vectors. Have red vectors. C. Blocks discarded due to bad match. Have no motion vectors. Which percentage do you want to see? The deep analysis kick-in percentage is compared to the ratio B / (A + B) and the frame discard limit is compared to the ratio A / (A + B + C). I think it makes sense to do that but it's somewhat confusing I guess, especially since it's not documented. ![]() |
![]() |
![]() |
![]() |
#43 | Link | |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
Quote:
![]() Maybe simply print both? I used the "skip frame" setting to adjust the sensitivity for big objects moving in the scene. Is this the right setting to tune? (when NOT using deep analysis) Just another question: if I use scale=quarter does this imply that the found motion is only accurate to +/- 4 pixels (which seems not true) or how else can this value be understood? |
|
![]() |
![]() |
![]() |
#44 | Link |
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
Hmm... I'm not sure I want to print both. We'll see.
The "skip frame" setting is basically just there because if very few motion vectors were good, Deshaker probably got everything wrong so it's probably best to skip the frame completely. There are many ways to deal with big moving objects depending on how big they are, how fast they move and for how long they're in the picture. Skipping the frame completely should only be done as a last resort, or if you're lazy ![]() Quarter scale indeed means that the matching occurs on images that are reduced to 1/4 of the original width and height, but the accuracy is usually better than 4 pixels anyway for two reasons: 1. I sort of use sub pixel accuracy when calculating the best shift for a block. (I do this by fitting a 2nd degree function through the best shift and its two integer neighbors, and their "match probability values", and take the shift where this function has its max.) 2. Any impreciseness in the block vectors will be evened out when I combine them all for the total motion of the frame. That said, I don't really recommend using quarter scale anyway. Personally I always use full scale. |
![]() |
![]() |
![]() |
#46 | Link |
brontosaurusrex
Join Date: Oct 2001
Posts: 2,392
|
trying to batch version 2.0 via vdub.exe, but some (most) of the settings for 2nd pass get lost somewhere, should those be in job scripts?
Code:
for example, this seems to be 2nd pass VirtualDub.video.filters.Add("Deshaker v2.0"); VirtualDub.video.filters.instance[0].Config("9|1|30|4|1.09402|1|1|0|640|480|1|2|1|400|400|400|1500|4|1|1|2|5|40|300|4|C:\\deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|15|15|5|15|0|0|30|30|0|0|0|0|1|0|0|10|1|15"); |
![]() |
![]() |
![]() |
#48 | Link |
brontosaurusrex
Join Date: Oct 2001
Posts: 2,392
|
i did a little batch (which is called from total commander):
Code:
@ECHO OFF for /f "delims=+++++" %%i in (%1) DO vdub /i "t:\path\vdubdeshake1.script" "%%i" "%%~pi%%~ni_deshaked.avi" ¦ vdub /i "t:\path\vdubdeshake2.script" "%%i" "%%~pi%%~ni_deshaked.avi" vdubdeshake1.script Code:
VirtualDub.Open(VirtualDub.params[0]); VirtualDub.audio.SetSource(1); VirtualDub.audio.SetMode(0); VirtualDub.audio.SetInterleave(1,500,1,0,0); VirtualDub.audio.SetClipMode(1,1); VirtualDub.audio.SetConversion(0,0,0,0,0); VirtualDub.audio.SetVolume(); VirtualDub.audio.SetCompression(); VirtualDub.audio.EnableFilterGraph(0); VirtualDub.video.SetInputFormat(0); VirtualDub.video.SetOutputFormat(7); VirtualDub.video.SetMode(3); VirtualDub.video.SetFrameRate(0,1); VirtualDub.video.SetIVTC(0,0,-1,0); VirtualDub.video.SetRange(0,0); VirtualDub.video.SetCompression(); VirtualDub.video.filters.Clear(); VirtualDub.video.filters.Add("Deshaker v2.0"); VirtualDub.video.filters.instance[0].Config("9|1|30|4|1.09402|1|1|0|640|480|1|2|1|400|400|400|1500|4|1|1|2|5|40|300|4|C:\\deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|15|15|5|15|0|0|30|30|0|0|0|0|1|0|0|10|1|15"); VirtualDub.audio.filters.Clear(); VirtualDub.project.ClearTextInfo(); VirtualDub.SaveAVI(VirtualDub.params[1]); VirtualDub.audio.SetSource(1); Code:
VirtualDub.Open(VirtualDub.params[0]); VirtualDub.audio.SetSource(1); VirtualDub.audio.SetMode(0); VirtualDub.audio.SetInterleave(1,500,1,0,0); VirtualDub.audio.SetClipMode(1,1); VirtualDub.audio.SetConversion(0,0,0,0,0); VirtualDub.audio.SetVolume(); VirtualDub.audio.SetCompression(); VirtualDub.audio.EnableFilterGraph(0); VirtualDub.video.SetInputFormat(0); VirtualDub.video.SetOutputFormat(7); VirtualDub.video.SetMode(3); VirtualDub.video.SetFrameRate(0,1); VirtualDub.video.SetIVTC(0,0,-1,0); VirtualDub.video.SetRange(0,0); VirtualDub.video.SetCompression(0x64737664,0,10000,0); VirtualDub.video.filters.Clear(); VirtualDub.video.filters.Add("Deshaker v2.0"); VirtualDub.video.filters.instance[0].Config("9|2|30|4|1.09402|1|1|0|640|480|1|2|1|400|400|400|1500|4|1|3|2|5|40|300|4|C:\\deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|0.7|15|15|5|1|1|1|15|15|0|0|0|0|1|1|0|10|1|15"); VirtualDub.video.filters.Add("sharpen"); VirtualDub.video.filters.instance[1].Config(5); VirtualDub.audio.filters.Clear(); VirtualDub.project.ClearTextInfo(); VirtualDub.SaveAVI(VirtualDub.params[1]); VirtualDub.audio.SetSource(1); VirtualDub.Close(); - use previous and future frames... - edge compensation mode... - ect... (everything seems default) EDIT: for some unknown reason things are working now...., weird. ------------ other than that, how would i generate a unique name for deshaker log? (like input_filename_deshaker.log) - using this method? EDIT2: solved Last edited by smok3; 30th January 2007 at 21:20. |
![]() |
![]() |
![]() |
#49 | Link |
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
Weird, but good
![]() About unique log files, I don't know. I'm no script guru at all. But I wouldn't really recommend running deshaker in batch mode at all. The results will rarely be perfect unless you do some supervision. |
![]() |
![]() |
![]() |
#50 | Link |
brontosaurusrex
Join Date: Oct 2001
Posts: 2,392
|
yes, the idea is to do some short segments using gui, then save those to this 2 scripts and run batch only after that. About unique log name, on 2nd thought it is almost not important since a lot seems to depend on 1st pass anyway, but i will do some renaming in original .bat like;
rename c:\deshaker.log to InputFilepath/InputFilename_deshaker.log (at the end of the script) Last edited by smok3; 30th January 2007 at 21:16. |
![]() |
![]() |
![]() |
#51 | Link |
Registered User
Join Date: Jan 2007
Posts: 3
|
Deshaking a near-black scene
Just discovered Deshaker and it worked miracles on some handheld ski footage (bit hard to hold the camera still while skiing downhill). I am, however, having problems with another clip that I was hoping to "stabilize". This is a shot from a "fixed" camera (sitting on a deck rail - no tripod available) of the moon rising over the mountains. The clip is 15 minutes long, but will be compressed to about 7 seconds for "effect". Unfortunately, the camera was on the deck, and so was the beer, and whenever someone stepped out on the deck for a beer, the camera shook ever so slightly. I figured Deshaker would have no problems with this clip, but I can't figure out how to adjust the settings to make it work. The frame is mostly black, other than a few lights in fixed positions, car headlights moving through the frame, and then the moon rising. I assume that the easiest way for Deshaker to do its magic is to have it lock on to one of the "fixed" features in the frame, but I can't figure out how to tell it what to lock on to. I've tried isolating several parts of the frame, but it won't "lock on" - I guess it assumes that the black is background and the lights are "moving objects". Anyway, any suggestions from the pros here on how to deshake this scene? I've attached a frame with the "fixed" lights circled - those are the features I need to "lock on" to (i.e. they shouldn't move). Any suggestions would be appreciated! Thanks!
|
![]() |
![]() |
![]() |
#54 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,652
|
I second that - deshaker is fantastic. I do have one question though...
In the documentation, it says: Quote:
David |
|
![]() |
![]() |
![]() |
#56 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,652
|
Guth, are you still working on deshaker? In addition to my previous question, is there any chance that a future version might include perspective correction?
![]() I ask because some stabilised videos suffer from a slight warping if the input is shakey enough (as my time lapse videos can be, and I've seen the same effect on normal video). If deshaker asked for the FOV of the images, it could correct in a more realistic way, rotating the input images in three dimensions rather than just shifting horizontally and vertically. David |
![]() |
![]() |
![]() |
#57 | Link |
C64
Join Date: Apr 2002
Location: Austria
Posts: 830
|
I just saw that there is a new Version 2.2.
@guth: I have two questions: (1) You wrote "Improved handling of new scenes ... allows pass 2 to take appropriate action". Would you mind giving some details what this action is? Is there a forced "jump" in the resulting deshaking shifts or the like? (2) regarding the new "Remember discarded areas" option: how is this related to the "blocks OK" percentage? |
![]() |
![]() |
![]() |
#58 | Link | ||||
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
Sorry for not replying. I didn't get any notifications of any activity in this thread.
Quote:
![]() Quote:
![]() Quote:
![]() Quote:
1. The end of scene 1 and beginning of scene 2 are basically placed at "zero correction". And there's no smoothing over the scene cut, so if scene 1 ends by panning to the right, scene 2 can start by panning to the left, abruptly. 2. It doesn't attempt to use frames from another scene when using previous and future frames to fill in the border. I'm not sure I understand your question. Basically, what I do is use the pattern of good/bad blocks for one frame as a starting point for the next frame. This usually results in that it is able to continue locking to the background when large objects enter the scene. |
||||
![]() |
![]() |
![]() |
#60 | Link |
Registered User
Join Date: Apr 2003
Location: Uppsala, Sweden
Posts: 157
|
It's not quite that simple, I'm afraid. The motion blur occurs *within* each frame not *between* them. Matching between two motion-blurry frames will be extremely unreliable so you wouldn't be able to get any good information about direction, and specially not about the amount of motion blur, since it can be much different from the amount *between* the frames (the shutter speed doesn't always equal the "frame speed").
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|