logo Sign In

GOUT image stabilization - Released — Page 28

Author
Time
*INFILE           c:\program files\avisynth 2.5\scripts\stabilize.avs
*OUTFILE          C:\Program Files\AviSynth 2.5\Scripts\stabilize 400.m2v
*BITRATE          4841
*MAXBITRATE       8000
*FRAMES           0 174257
*NOSMP
*PROFILE          best
*AUTOGOP          12
*PROGRESSIVE
*AVSMEMORY        100
*AVSRELOAD
*PULLDOWN
*CUSTOMMATRIX
   8   8   8   9  11  13  14  17
   8   8   9  11  13  13  14  17
   8   8  11  12  13  14  17  94
   9  11  13  13  14  17  17  94
  11  11  13  13  14  17  94  94
  13  13  14  16  17  20  94  94
  13  13  14  17  94  94  94  94
  13  14  17  94  94  94  94  94
 
  12  12  13  14  15  16  22  26
  12  13  14  15  16  22  26  32
  13  14  15  16  22  26  32  41
  14  15  16  22  26  32  41  53
  15  16  22  26  32  41  53  94
  16  22  26  32  41  53  70  94
  22  26  32  41  53  70  94  94
  26  32  41  53  94  94  94  94
*LUMGAIN          2

 

nebis, here's the contents of my HCenc .ini file that shows the custom matrix. Notice I also have the LUMGAIN set to 2.

-G

 

Author
Time

g-force, just out of curiosity, I wonder if you see the same thing I'm seeing in the magic tree scene in ESB - which is some "shakiness" in Luke's close-up immediately before and after Vader's helmet exploding (especially after).

Author
Time
Mielr said:

g-force, just out of curiosity, I wonder if you see the same thing I'm seeing in the magic tree scene in ESB - which is some "shakiness" in Luke's close-up immediately before and after Vader's helmet exploding (especially after).

I wish I could tell you. I have wiped ESB from my hard drive. So this is not on the original GOUT? Would you be able to check it with the new version of the script?

-G

Author
Time
 (Edited)
Mielr said:

g-force, just out of curiosity, I wonder if you see the same thing I'm seeing in the magic tree scene in ESB - which is some "shakiness" in Luke's close-up immediately before and after Vader's helmet exploding (especially after).

 

I know this was directed to g-force,but I want to chime in and say I see this,and you are right,it is a lot more noticeable after the helmet explodes,and that is some serious shake,I wish I would have caught this a lot sooner.

@ Mielr,so how do you set a DL layer break to be the same as the retail?

 

Author
Time
 (Edited)
g-force said:

Thank you for the constructive criticism. You have inspired me to try out some things I've been kicking around. I have updated my script to 6.00. Turns out that I've nearly eliminated the problems you're showing with the Stormtroopers in smoke and the Rebel pic immediately following it, and it seems to have not hurt the stabilization too much! Please try it out and let me know what you think. (screen caps are nice BTW)

g-force said:

neebis, here's the contents of my HCenc .ini file that shows the custom matrix. Notice I also have the LUMGAIN set to 2.

Thanks very much for the updated script and your HCenc matrix. I'll start testing some clips for my next encode.

In the meantime, I already did a couple encodes, trying to get decent output out of HCenc as well as testing the audio, subtitles and chapters in a fill mux. I started out with Rejig, which crashed on me, then I tried Muxman which worked fine in terms of audio and video, but I think I have to do chapters manually (rather than importing the PGCDemux celltimes) as well as manually switch the subtitle colors. I might look around for other all-in-one muxing options. What do you use to mux?

After a couple tries, I ended up with a pretty good result from the HCenc FOX1 matrix with the following settings:

profile: best

dc prec: 10

avg bitrate: 8600

max bitrate: 9200

AQ: 2

VBR bias: 70

Lumagain: 3

mask: 60/60

I still haven't burned a disc, but after scanning through the HCenc output on my PC, I will change the adjustments I made to your script. HCenc seems to exaggerate the saturation, so I'll dial that back down from my previous setting. Also, the grain is obviously tough to compress and the final output was a bit noisier than I'd like, so I'll see if I can start with less grain, but slightly more sharpness, to see if I can squeeze a bit more detail out before re-encoding (maybe your new script is already moving in that direction).

Maybe it was already mentioned, but when comparing processed shots to the source, I have noticed a number of shots on the source with trails/ghosting in the original video, not to mention annyoing EE outlines or halos around sharp edges in a lot of shots. Of course, your script squeezes the best presentation out of this subpar source and makes it much more watchable than what George originally stuck us with.

Author
Time
 (Edited)
neebis said:
then I tried Muxman which worked fine in terms of audio and video, but I think I have to do chapters manually (rather than importing the PGCDemux celltimes)

Click the File menu at the top of Muxman's window to import PgcDemux's Celltimes.txt

 

However, in practice you must take into account the “fuckwit factor”. Just talk to Darth Mallwalker…
-Moth3r

Author
Time
dark_jedi said:

@ Mielr,so how do you set a DL layer break to be the same as the retail?

I know you can set an exact layerbreak with PGCEdit, but it's more involved than letting Imgburn do it automatically:

PGCEdit Layer Break

 

Author
Time
 (Edited)
Darth Mallwalker said:

Click the File menu at the top of Muxman's window to import PgcDemux's Celltimes.txt

Great, thanks. I didn't see that before.

 

Author
Time
 (Edited)
neebis said:
dark_jedi said:

@ Mielr,so how do you set a DL layer break to be the same as the retail?

I know you can set an exact layerbreak with PGCEdit, but it's more involved than letting Imgburn do it automatically:

PGCEdit Layer Break

 

I defer to neebis on that one. :-)

There really isn't a problem with your layer breaks - but you got real lucky because they came very close to being in the middle of a sentence on a couple of them (especially on SW, which is why I assumed it was deliberate on your part). I know that on computers the layer-switch is usually seamless, but on a lot of DVD players (especially older ones like mine) there's a slight pause.

Even on the retail discs, the placement of the layer-switches aren't ideal, IMO, especially on ROTJ- I'd have definitely moved that one up to a better place (but they didn't ask me, so there you go.) ;-)

 

Author
Time
 (Edited)
dark_jedi said: I know this was directed to g-force,but I want to chime in and say I see this,and you are right,it is a lot more noticeable after the helmet explodes,and that is some serious shake,I wish I would have caught this a lot sooner

g-force said:

Mielr said:

g-force, just out of curiosity, I wonder if you see the same thing I'm seeing in the magic tree scene in ESB - which is some "shakiness" in Luke's close-up immediately before and after Vader's helmet exploding (especially after).

I wish I could tell you. I have wiped ESB from my hard drive. So this is not on the original GOUT? Would you be able to check it with the new version of the script?

-G

 

No, it's not on the GOUT.

Unfortunately, I can't try the new version of the script because I didn't do it myself in the first place, I only saw the finished product. :-/

Author
Time
 (Edited)
Thank you for the constructive criticism. You have inspired me to try out some things I've been kicking around. I have updated my script to 6.00. Turns out that I've nearly eliminated the problems you're showing with the Stormtroopers in smoke and the Rebel pic immediately following it, and it seems to have not hurt the stabilization too much! Please try it out and let me know what you think.

Well, I just spent some time testing the latest script with various clips. It's definitely an improvement in the smoky areas, bringing back detail. Compared to my previous encode with 5.02, the grain removal seems to be more subtle, but still a nice cleanup of the source.

After trying different settings back and forth and encoding clips both with Lagarith and then with HCenc, I ended up with a "less is more" approach to the settings. I went with the following alterations:

Levels(6,1.08,255,0,255)
Tweak(sat=1.06,hue=-2)

MT_MakeDiff(last,last.RemoveGrain(12,-1).RemoveGrain(12,-1))

With these settings in the v6.0 script, the overall look of the processed frame is quite close to the original with a tiny bit more contrast, minus the gate weave/wobble with reduced aliasing, grain and noise.

In my tests, a higher contrast (level setting) improved the depth, definition and perceived sharpness, but it was at the expense of highlighting the grain and noise. Various attempts to improve detail by changing the sharpness setting also had the same effect of making things worse. So, I went with a flatter, less contrasty image with less noise as compared to my previous full encode (and screenshots). In still frames, the result looks quite close to the original with a subtle bump in contrast and reduced grain. In motion, you see the other effects.

I'm running another full encode now and I think this will probably be what I stick with unless there are major issues when I play it back from disc.

Author
Time

Nice critique neebis, It's much appreciated.

-G

Author
Time

Well I just did a test of v6 with ESB on that Magic Tree scene,and the shakiness is still there,right after the helmet explodes it is like the whole image jitters around.

Author
Time
Well, it looks like I'd better stop my ANH encode (again) and take a look at ESB. -G
Author
Time
I got a chance to look at this last night, and it is definitely because of the slow motion. I can't think of a good fix for this, so I will eventually update the script to shut off the stabilization during that scene. Am I right in thinking that this is the only slow motion scene in the trilogy? -G
Author
Time

Not quite - Obi-Wan's death has slo-mo, but it's "fake" slo-mo, as in it was shot at 24fps and the framerate was changed in post.  IIRC, the "Magic Tree" slo-mo was actually shot at a different framerate than 24fps, making it "true" slo-mo.

Author
Time
ChainsawAsh said:

Not quite - Obi-Wan's death has slo-mo, but it's "fake" slo-mo, as in it was shot at 24fps and the framerate was changed in post.  IIRC, the "Magic Tree" slo-mo was actually shot at a different framerate than 24fps, making it "true" slo-mo.

I had a quick look at the shot after Vader's helmet explodes earlier and at least that part of it looked like step-printed 24fps for "fake" slo-mo to me.

 

Author
Time
 (Edited)

Well, I finished my full encode to Lagarith and then MPEG2 with HCenc and v6.0 of your script. I used the settings I posted in my previous post. It only took about 36 hours compared to 50+ for the v5.02 script. The Lagarith file size was about 17% smaller, which I think must be mostly due to the reduction in grain and noise.

Here are the shots from the final HCenc MPEG2 output (as opposed to my last shots which were stills from the intermediate lossless Lagarith file).

http://imgur.com/UiFJQ.jpg

http://imgur.com/3bY4n.jpg


http://imgur.com/NHm97.jpg


http://imgur.com/uxLgg.jpg


http://imgur.com/VvSYu.jpg


http://imgur.com/TzTdH.jpg


http://imgur.com/qCUnR.jpg


http://imgur.com/Ppuyj.jpg


http://imgur.com/yMAgZ.jpg


http://imgur.com/2CEcY.jpg

I think this is a keeper, although I haven't authored it yet. My earlier impressions from my test clips hold up.


Judge for yourself against the apt irrelevance screenshots. There is definitely a slight loss of detail and sharpness, but you gain a stable picture, less aliasing and a bit of contrast, not to mention a proper 16:9 anamorphic encode.

Scanning through, I found a couple shots which seem to have slightly more wobble/jitter than the v5.02 file, but that old one still has some jitter, so I'm not going to worry about it. The other improvements are worth the tradeoff.

For your reference, those couple shots are:

50:41 - Vader and Tarkin, slight wobble in the background

1:25:48 - Luke and Leia at the retracted bridge (before the swing), the matte painting seems to wobble slightly more in v6.0 than v5.02

I'm going to play with audio and maybe menus, then author this one. I'll let you know if I note anything else when I finally burn the disc and play it in a regular player. Then I may take a breather before moving on to Empire.

Thanks again for all your work on this script.

Author
Time
Glad you like it, neebis. Yeah, in the process of fixing the artifacts caused by the motion compensation, I had to give up some of the jitter reduction. I think it's a good tradeoff, as I would rather do less harm. When I have time, I plan to incorporate the ESB fix, so I would hold off on that one if I were you. -G
Author
Time

I think it looks good. But I never understand why people dont like grain...

Author
Time
 (Edited)

Well, I burned a disc and tested in on my Blu-ray player and projector. Upconverted, it looks very good, actually better than on my PC, since the color space difference and PC decoder tends to show more artifacts and noise. I'm very happy with it. It's the best DVD presentation I've seen of ANH in it all it's 1993 glory. (No more Death Star shock ring!)

I used VOB Blanker to combine the muxman video/audio with the orignal menus, although only the Main and Chapter menus work. My first disc didn't play the mxuman forced subtitles becuase VOB Blanker used the original IFOs to try and force a non-existant stream. I had to mess around with IFOEdit and PGCEdit to disable the other streams and get the forced subtitles to work in the combined disc (original menus with new movie).

Anyway, this one is going on the shelf until George becomes one with the Force and his estate finally decides to properly restore and release this piece of film history in it's original form.

 

Author
Time
 (Edited)
budwhite said:

I think it looks good. But I never understand why people dont like grain...

Well, all my testing and tweaks were intended to retain as much original film grain as possible and lose the analog video noise (in addition to reducing the wobble and aliasing). I know some of the doom9 filters were designed to completely kill original film grain and I cringe when I see shots of completely grain-free processed films with a flat, antiseptic, digital look. I always appreciate good Blu-ray transfers that retain all the grain you would see in a theatrical print.

budwhite said:

Have you relaced the sound also?

Yes, I went with the DC48 Belbucus LD mix, encoded with Aften at 448 as 2-channel Prologic. So as I said, it's the 1993 presentation. I tested hairy_hen/Satanika's mix as well, but the '93 Prologic worked fine and sounded great on my receiver and I didn't really want any extra changes or generational loss, resampling or any other artifacts from the upmix process. Now that I have the video done, I can always mix hairy_hen/Satanika's 5.1 or the mono mix or some other mix if I want to make another disc. The video takes so much space that there's only room for one track per disc.

Author
Time
neebis said:
budwhite said:

I think it looks good. But I never understand why people dont like grain...

Well, all my testing and tweaks were intended to retain as much original film grain as possible and lose the analog video noise (in addition to reducing the wobble and aliasing). I know some of the doom9 filters were designed to completely kill original film grain and I cringe when I see shots of completely grain-free processed films with a flat, antiseptic, digital look. I always appreciate good Blu-ray transfers that retain all the grain you would see in a theatrical print.

That's good to hear.

Patton is a horrible example when reducing grain gone wrong. People look unnatural and waxy.

 

Author
Time
 (Edited)
dark_jedi said:

@ Mielr,so how do you set a DL layer break to be the same as the retail?

Following up on this, now that I've finished my disc...

You options for layer break will depend on the size of your encoded video. My video was very high bitrate, so I had limited choices on where to split (otherwise one or the other layer would be to big to fit).

I didn't like the ImgBurn suggested layer break, so I followed this guide and used VOB Blanker to split a cell (without creating another program or chapter) and set my layer break at that exact location. It's not frame accurate though, you can only place the layer break at the nearest start of a GOP. You should check ImgBurn's suggested layer break position and try to find something around that area.

I'm not sure where the retail disc layer break is, but I ended up putting mine right after the scene where Luke is doing saber practice with the remote on the Falcon, where it cuts to a scene on the Death Star behind a conference table. On my set-top player, it cuts to the Death Star shot, then pauses, then the door opens and the scene continues. It was the best I could find given the size of my video, because there's no motion and no dialog or obvious audio to be clipped at the pause.