Tricky Stabilize Question

Comments

John222 wrote on 2/14/2014, 11:32 AM
I just wanted to come back and close a few items here so people searching will find the resolutions to the hurdles I encountered.

Background
I'm using Windows 8.1 on a 64 bit computer and I just recently upgraded my camcorder to a Panasonic TM700.


Hurdle #1 - Could not get Vegas / Deshaker script to run with my 64 bit operating system. I gave up, no solution. And I don't care at this point.

Hurdle #2 - Getting 1920x1080 60P files from Vegas to a intermediate file which would be recognized by VirtualDub. John Meyer suggested I eliminate the intermediate file and try frame serving directly. Well, I had to downgrade to 32bit VirtualDub and 32bit deshaker, but it worked fantastic. As suggested, I used Debugmode Frameserver.

Hurdle #3 - A/V Sync. No matter what I did, the deshaked files always had the audio trailing the video by 338ms. I tried everything, must have screwed with it for 8 hrs. VirtualDub instructions indicate I should be putting a negative value into the audio delay... Wrong!. I had to put a positive 338ms in there to correct the shift.

Well, that sums it up. VirtualDub/Deshaker is now working 100% to my satisfaction. Hope this helps someone else. And a special thanks to John Meyer.
johnmeyer wrote on 2/14/2014, 12:58 PM
I should have responded to your audio sync issues back in January. That sync problem got introduced with the newer version of Deshaker that came out a few years ago. If you ever need to do any of this again, send me a short clip and I'll recreate the steps needed to adjust the workflow to eliminate the problem (I can't remember off the top of my head exactly what is needed).

I did incorporate the fixes into my scripts, which I now use with the latest versions of Deshaker. However, I never released these scripts because most people prefer using the much friendlier version of my older scripts that are incorporated into the excellent GUI another person added to my work (New Deshaker. Also, I quite frankly didn't want to deal with the support that comes when releasing any new code.

So, bottom line, the sync issue is fixable.

[edit]I just took a quick look at my unreleased, updated scripts, and the main issue is that the newer Deshaker automatically adds the 30 frames of blank video, so the script no longer needs to do this. There were some other issues related to this change in how the newer Deshaker works.

riredale wrote on 2/14/2014, 9:25 PM
DeShaker is great, but why on earth do a manual installation rather than the "package" that was put together a few years back? Does the package not work with W64?

Installing it automated the installation of VirtualDub and made the whole thing effortless and foolproof. You call the procedure as a script and the results are delivered as a Take. No audio sync issues whatsoever.

I have to sign off now but if no one can find the website I will look later.

EDIT: Oops, didn't read the last response above me before posting. John has the link.
John222 wrote on 2/15/2014, 5:24 PM
riredale

1. It doesn't matter which Deshaker I use, the audio is out of sync with the video. With every clip I have to ungroup and drag the audio to the right approx. 338 to 500ms. Using the stand alone software I can go into VirtualDub and apply the audio delay adjustment and save it as a preset. I can't find a way to adjust that preset with the New Deshaker.

Frame serving to the standalone Deshaker works very good, every time and there no need for an intermediate file.
johnmeyer wrote on 2/15/2014, 8:06 PM
As I said before, if you can post a 5-15 second clip, I can figure out how to stabilize it without the audio delay.
John222 wrote on 2/16/2014, 1:29 PM
Well John, apparently I was wrong about everything. I got up today and made you a before and after clip using the New Deshaker script.. I then rendered the clip to an avi file and played it back just confirm it to be out of sync. It wasn't.... It was in perfect sync. .. To make a long story short, my computer is having a a little difficulty digesting the uncompressed file that's returned from deshaker. I then went back to the deshaken clip on the time line and highlighted an area and did a shift B. It then played back perfectly. Finally I went back to some of the previous clips where I adjusted the audio delay and found that while they played back fine on the time line, when rendered to an avi, they are out of sync.


I feel like a fool, but at least I learned a lot in the process.
riredale wrote on 2/16/2014, 2:29 PM
I don't think you need to beat yourself up on this, some of this stuff is pretty complicated, which is I guess why it's fun to finally get things working right. Besides, I mess up about once a day, so join the crowd.

It's been a while since I dug into my configuration of the New Deshaker setup, but as I recall I have the intermediate process rendered into MJPEG and the final output into m2t, so no enormous uncompressed files are involved. I'm sure John or others can suggest other codecs that could be used.
johnmeyer wrote on 2/16/2014, 4:54 PM
Great job of figuring out the problem!

There are several codec alternatives to using "uncompressed." The most obvious is to use HuffYUV or the slightly faster and newer version of that, Lagarith. Both are lossless (and free), but result in files that are about half the size of uncompressed. This is usually enough compression so that the hard drive can keep up with reading the files without falling behind when doing previews in Vegas.

I am also a big fan of Cineform. It used to be expensive, but you can get a reasonably serviceable version for free from the GoPro site (they own Cineform). This free version doesn't let you use some of the more professional settings, but the encoding is usually very, very good.

MJPEG is another good choice, but I don't know whether you can get a free MPJEG encoder anywhere.

Once you install one of these codecs, you can get the codec "code" from the VirtualDub compression dialog. Enter this code in whatever Vegas script you are using and it will pass this to VirtualDub so it will return the video in that format. You can also use one of these codecs to export video from Vegas to Deshaker, rather than using the default uncompressed format. I don't usually do this because you can end up with levels issues if you don't get everything just right. Actually, this issue exists when just using a codec to return the video from VirtualDub. I always recommend deshaking a few seconds and then doing an A/B comparison using the "T" key in Vegas to alternate between the original and the deshaken take. You will of course see movement, since the deshaken video has been moved, but you should see no changes in contrast or levels.