Happy Otter Scripts for Vegas Pro

Comments

Eagle Six wrote on 12/3/2018, 10:17 AM

Test of comparation between Vegas native slow motion, HappyOtter slow motion and Twixtor slow motion

in a video recorded at 60p. The slow motion is 1/4 of the original speed.

Thank You Joelson for the comparison. Twixtor appears to hold better resolution, and both Happy Otter and Twixtor have difficulty with the background (for example, when arms are against the fence bars), but of course better than Vegas. If I made a closer examination I would probably give Twixtor the better job, but not by very much. It has always has been my experience certain scenes make for better slow motion than others and the background plays a huge part in the success.

System Specs......
Corsair Obsidian Series 450D ATX Mid Tower
Asus X99-A II LGA 2011-v3, Intel X99 SATA 6 Gb/s USB 3.1/3.0 ATX Intel Motherboard
Intel Core i7-6800K 15M Broadwell-E, 6 core 3.4 GHz LGA 2011-v3 (overclocked 20%)
64GB Corsair Vengeance LPX DDR4 3200
Corsair Hydro Series H110i GTX 280mm Extreme Performance Liquid CPU Cooler
MSI Radeon R9 390 DirectX 12 8GB Video Card
Corsair RMx Series RM750X 740W 80 Plus Gold power pack
Samsung 970 EVO NVMe M.2 boot drive
Corsair Neutron XT 2.5 480GB SATA III SSD - video work drive
Western Digitial 1TB 7200 RPM SATA - video work drive
Western Digital Black 6TB 7200 RPM SATA 6Bb/s 128MB Cache 3.5 data drive

Bluray Disc burner drive
2x 1080p monitors
Microsoft Window 10 Pro
DaVinci Resolve Studio 16 pb2
SVP13, MVP15, MVP16, SMSP13, MVMS15, MVMSP15, MVMSP16

Yarin VooDoo wrote on 12/4/2018, 9:32 AM

This extension for VEGAS seems to be very interesting, thanks for the public beta.

I've started to do some tests, however it seems that the render through avisynth (eg. slow motion) returns files with incorrect framerate: if I start from a 50p video I get a 59.94p video, while if I start from a 25p video I get a video 29.97p.

Has anyone else got these results?

NickHope wrote on 12/4/2018, 9:55 AM

@Yarin VooDoo Are you using AviDub or RenderPlus? They both use AviSynth and can both do slow motion.

Yarin VooDoo wrote on 12/4/2018, 10:05 AM

I made first tests using RenderPlus and using AviSynth script for slow motion.

I've checked inside the script, but this seemsto be right as it assumes the framerate from source file, I don't know how RenderPlus works internally, maybe it transfer different settings to the AviSynth?

Eagle Six wrote on 12/4/2018, 10:14 AM

Yarin, RenderPlus works fine on my 50p sample. 50p source, RenderPlus 4x Slow Motion, render to 50p delivery.

System Specs......
Corsair Obsidian Series 450D ATX Mid Tower
Asus X99-A II LGA 2011-v3, Intel X99 SATA 6 Gb/s USB 3.1/3.0 ATX Intel Motherboard
Intel Core i7-6800K 15M Broadwell-E, 6 core 3.4 GHz LGA 2011-v3 (overclocked 20%)
64GB Corsair Vengeance LPX DDR4 3200
Corsair Hydro Series H110i GTX 280mm Extreme Performance Liquid CPU Cooler
MSI Radeon R9 390 DirectX 12 8GB Video Card
Corsair RMx Series RM750X 740W 80 Plus Gold power pack
Samsung 970 EVO NVMe M.2 boot drive
Corsair Neutron XT 2.5 480GB SATA III SSD - video work drive
Western Digitial 1TB 7200 RPM SATA - video work drive
Western Digital Black 6TB 7200 RPM SATA 6Bb/s 128MB Cache 3.5 data drive

Bluray Disc burner drive
2x 1080p monitors
Microsoft Window 10 Pro
DaVinci Resolve Studio 16 pb2
SVP13, MVP15, MVP16, SMSP13, MVMS15, MVMSP15, MVMSP16

NickHope wrote on 12/4/2018, 10:27 AM

@Yarin VooDoo If you're using Advanced mode, the frame rate is controlled in the box shown in blue on this screenshot. The tooltip is self-explanatory. To get to that window you click the blue gear icon.

I just tested a slomo render from a 50p file with "Same" selected and I got a 50p result.

wwaag wrote on 12/4/2018, 10:59 AM

@Yarin VooDoo

A couple of tips. First, if you want to see the Avisynth script that is being generated, you can open the file using any text editor. For RenderPlus it can be found here: "C:\ProgramData\HappyOtterScripts\Magix Vegas Pro\RenderPlus\RenderPlus.avs". For AviDub, it can be found here: "C:\ProgramData\HappyOtterScripts\Magix Vegas Pro\AviDub\AviDub.avs".

Second, you can easily create an Avisynth script in RenderPlus and then use that script in AviDub. Simply check the box shown and then enter the script name. You can load that script into AviDub. In this way, you can create scripts using the RenderPlus GUI.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Jep wrote on 12/14/2018, 5:33 PM

Many thanks for Happy Otter Scripts wwaag. I've been playing around with it for a day and it looks really interesting - though honestly it's a bit above my skill levels. 😎

I'm wondering if it is possible to crop a video when using Render or RenderPlus. I can't seem to find an option - is it possible to edit one of the scripts to achieve that?

I very much like the Slomo results. Excellent IMO.

In your initial post you mentioned

-frame rate changes using motion vector tools

Does that feature interpolate or just add additional frames? If it interpolates I'd very much like to know how to go about using that feature.

Again many thanks and apologies if my questions are a bit dumb.

john_dennis wrote on 12/14/2018, 5:55 PM

"I'm wondering if it is possible to crop a video when using Render or RenderPlus. I can't seem to find an option - is it possible to edit one of the scripts to achieve that?"

If you want to trim parts of the video that you don't expect to ever use, SmartVideoTrim.

john_dennis wrote on 12/14/2018, 6:06 PM

If you want to change pixel dimensions, example: 1920x1080 source to 1280x720 output, change the Project Properties. Render Plus renders at the project pixel dimensions.

Former user wrote on 12/14/2018, 7:38 PM

Did anyone get an error during install at the end, where it registers the product?

My antivirus detected suspicious activity & quarantined a profile. This caused the first error, but since restoring and ignoring that file I keep getting same error.

edit: Turns out I had to restart computer before antivirus allowed that file to installed again. Iinstall is now fine

Jep wrote on 12/15/2018, 12:17 AM

"I'm wondering if it is possible to crop a video when using Render or RenderPlus. I can't seem to find an option - is it possible to edit one of the scripts to achieve that?"

If you want to trim parts of the video that you don't expect to ever use, SmartVideoTrim.

Thanks for your reply John. When I say crop I don't mean trim out sections of video to make smaller clips. I want to crop black borders from the edge of a video. I know I can use the crop tool on the Vegas timeline to do this, but I find it easier and more accurate to specify the amount to crop in pixels in Avisynth scripts. Not a major issue though - but it would be nice to know how to do it.

NickHope wrote on 12/15/2018, 12:24 AM
I'm wondering if it is possible to crop a video when using Render or RenderPlus. I can't seem to find an option - is it possible to edit one of the scripts to achieve that?

@Jep You can do it with a custom AviSynth script in RenderPlus, accessed by choosing "advanced" then clicking the "gear" icon. Unfortunately I've only got time right now to give you a hint. Your custom .avs script needs a line like this in it, where this crops 8 pixels from each size:

Crop(8,8,-8,-8)

You can resize afterwards if you want, for example to restore the original resolution, using a line such as this after the crop line:

Spline36Resize(1920,1080)

More here: http://avisynth.nl/index.php/Crop

I threw the crop line into a simple custom script and unfortunately lost contrast in the final render. Hopefully someone else can advise you how to remedy that before I have more time next week to work it out.

-frame rate changes using motion vector tools

Does that feature interpolate or just add additional frames? If it interpolates I'd very much like to know how to go about using that feature.

It does frame interpolation using the MFlowFps filter within MVtools, originally based on a recipe from @johnmeyer

NickHope wrote on 12/15/2018, 12:39 AM

p.s. The stock scripts that HOS uses are in C:\ProgramData\HappyOtterScripts\AvisynthScripts and you can copy and modify those to create custom scripts. Some of those scripts refer to .avsi scripts which are (for x64) in C:\Program Files\HappyOtterScripts\AvisynthRepository\AVSPLUS_x64\plugins

Jep wrote on 12/15/2018, 7:51 PM
I'm wondering if it is possible to crop a video when using Render or RenderPlus. I can't seem to find an option - is it possible to edit one of the scripts to achieve that?

@Jep You can do it with a custom AviSynth script in RenderPlus, accessed by choosing "advanced" then clicking the "gear" icon. Unfortunately I've only got time right now to give you a hint. Your custom .avs script needs a line like this in it, where this crops 8 pixels from each size:

Crop(8,8,-8,-8)

You can resize afterwards if you want, for example to restore the original resolution, using a line such as this after the crop line:

Spline36Resize(1920,1080)

More here: http://avisynth.nl/index.php/Crop

I threw the crop line into a simple custom script and unfortunately lost contrast in the final render. Hopefully someone else can advise you how to remedy that before I have more time next week to work it out.

-frame rate changes using motion vector tools

Does that feature interpolate or just add additional frames? If it interpolates I'd very much like to know how to go about using that feature.

It does frame interpolation using the MFlowFps filter within MVtools, originally based on a recipe from @johnmeyer

Hi Nick,

Many thanks - that was a great help. I was successfully able to edit one of the existing scripts to create a custom script that cropped and resized exactly the way I wanted to. Just for fun I created another script to see if I could crop, resize and change the framerate - and it worked perfectly as well. Many thanks - you are always so helpful.

One question if I may - you suggested Spline36Resize (which I used). I've always used Lanczos for resizing. Do you think there are significant benefits to using Spline36Resize over Lanczos?

Many thanks again.

 

wwaag wrote on 12/15/2018, 8:15 PM

@ Nick and John Dennis

Thanks so much for answering Jep's questions. Windstorm took out power and internet which was just restored.

@Jep

Glad you got it sorted out with Nick's help. Probably the best strategy for customizing scripts is to first use the Render Plus GUI to whatever extent possible. Then save as a Custom Script and add your changes--for example, cropping. If there is interest, a crop tool could be easily added to the Render Plus dialog--it's only 4 integers and resizer selection is already supported. Glad you find the tools useful.

@Former user

As stated in the install notes, the problem lies from the fact that the beta version is not digitally signed which triggers both Microsoft and other protection schemes to consider the software a possible threat. Glad you got it installed and hope that you find these a useful set of tools.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Musicvid wrote on 12/15/2018, 8:33 PM

Would love to see scalable windows and icons, and a non-dark theme.

With me, it means not being able to use it for more than a few minutes before the eyeballs start to rotate, reptilian style.

Jep wrote on 12/15/2018, 9:04 PM

Would love to see scalable windows and icons, and a non-dark theme.

With me, it means not being able to use it for more than a few minutes before the eyeballs start to rotate, reptilian style.

You can change the colour. Click on the built in ThemeDesigner icon. In the top left hand corner there is a drop down list where you can select a number of different themes. The Vegas 14 theme give the old style Vegas grey colour. Once you've selected your theme, exit ThemeDesigner and click on the paint bucket icon in HappyOtter to apply the theme.

wwaag wrote on 12/15/2018, 9:16 PM

@Musicvid

Jep's right (thanks). There are a number of pre-defined themes based on different Vegas versions. You can also "design your own" theme selecting your own colors. Icons in the toolbars are the same as the Vegas toolbar. Windows are not scalable although you can move most main windows to wherever you like.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Musicvid wrote on 12/15/2018, 10:13 PM

Didn't know that button was there, pointing out my limitations.

I may have to lower screen resolution.

Jep wrote on 12/16/2018, 9:00 AM

After playing around with HOS for a couple of days there are a lot of things I really like about it.

I frequently have to re-encode lossless 30fps .avi files generated by Mirilis Action! to mp4. Up until now I've been using Send2HandBrake with a custom Avisynth script that also changes/interpolates frame rate to 60fps. It works very well and the resulting output appears pretty much identical to the original in terms of colour, brightness, contrast etc. The downside to using this method is that it is extremely slow - HandBrake can only muster a miserly 7fps as it encodes.

So I've been experimenting with RenderPlus using the Change Frame Rate script. The good part is that encoding speed is significantly improved. I calculate I'm getting about 35fps during the render which is a huge improvement. Initially the results looked quite good. But when I made a direct comparison by placing the rendered file on a separate Vegas track over the original and toggling it on and off, the rendered file looks slightly washed out - as if the gamma levels had been raised a bit. I've tried playing around with some of the RenderPlus encoder settings but can't seem to improve the accuracy in terms of colour, brightness, contrast etc. I'm wondering what settings if any might improve that accuracy? Also is there any way to get deep into the h264 settings similar to the HandBrake Advanced settings tab.

Any suggestions would be greatly appreciated.

wwaag wrote on 12/16/2018, 11:47 AM

@Jep

The best way to test for render accuracy is to perform a test render and select add to timeline which you may have already done. Using Video Scopes, you can switch between the original and render. Alternatively, you can click on the 3D Source Alpha button for the top video track and select Difference. The preview window will be black if the two tracks are the same. There is a good discussion of this technique in the following thread. https://www.vegascreativesoftware.info/us/forum/cpu-render-vs-vce--114009/

One note of caution. You must make sure that any output FX that have been applied are considered. E.g. if you apply a Computer RGB to Studio RGB Levels Fx as an Output Fx, then it will also be applied to the rendered file that sits on the top track and the two tracks will always appear different.

If you've done this, then I'd suggest that you post the Avisynth script and upload some sample footage. Regarding Handbrake Advanced Options, I'm not sure exactly what you mean by this. The options shown on the Video tab are pretty much the same as found in HOS. In fact, HOS and Handbrake are the same "under the hood" since they make use of FFmpeg. If you really want to get "into the weeds", you can create Custom Command Lines and access virtually any setting inside the x264 encoder. Hope this helps.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Jep wrote on 12/17/2018, 4:41 AM

@Jep

The best way to test for render accuracy is to perform a test render and select add to timeline which you may have already done. Using Video Scopes, you can switch between the original and render. Alternatively, you can click on the 3D Source Alpha button for the top video track and select Difference. The preview window will be black if the two tracks are the same. There is a good discussion of this technique in the following thread. https://www.vegascreativesoftware.info/us/forum/cpu-render-vs-vce--114009/

One note of caution. You must make sure that any output FX that have been applied are considered. E.g. if you apply a Computer RGB to Studio RGB Levels Fx as an Output Fx, then it will also be applied to the rendered file that sits on the top track and the two tracks will always appear different.

If you've done this, then I'd suggest that you post the Avisynth script and upload some sample footage. Regarding Handbrake Advanced Options, I'm not sure exactly what you mean by this. The options shown on the Video tab are pretty much the same as found in HOS. In fact, HOS and Handbrake are the same "under the hood" since they make use of FFmpeg. If you really want to get "into the weeds", you can create Custom Command Lines and access virtually any setting inside the x264 encoder. Hope this helps.

Thanks again for your prompt feedback wwaag.

I've tried selecting Add To Timeline but for some reason the rendered file is not added to the timeline. So I have to add it manually to a new track to make the comparison. Also I do not have any FX applied to the media or track being rendered.

I've just made some more tests.

The first was just a straight forward render using the Default Avisynth template. I placed the rendered file on a new track above the original and compared it against the original using the 3D Source Alpha/Difference technique you suggested. The preview window is black and visually I can't tell any difference.

The second test I made was Slow Motion set at 2. I used the 3D Source Alpha/Difference to compare the first frame of rendered v source file, and again the preview window was black and visually I couldn't tell any difference.

The third test was using the Change Frame Rate script. Using the 3D Source Alpha/Difference the preview window was not black, and using Source Alpha and toggling the top track on and off there was a noticeable difference between original and rendered footage. The rendered file having that washed out look.

So it would appear that the inaccuracy is somehow caused by the Change Frame Rate script - though I have no idea as to why that should be, but would like to find out.

Can I ask what script RenderPlus uses when set to the Default Template?

Finally, the Avisynth script I use with Send2HandBrake is shown below. It is basically the Send2HandBrake vegas.avs script that has been modified with a slow motion script (the origin of which I can't remember). Doubling the value in the last line from 30.00 to 60.00 returns 60fps output but with the frames interpolated.

OpenDMLSource ("C:\frameserver\source\vegas.avi")
AssumeFrameBased ()
Trim (0, FrameCount-1-Floor(FrameRate))
ConvertToYUY2 (matrix="rec709")
ColorYUV (levels="TV->PC")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2\mvtools2.dll")


# MSuper gets the clip and prepares it for subsequent operations
#  pel=2 defines the accuracy of motion estimation "2" indicates 1/2 pixel

super = MSuper(pel=2)

# MAnalyse will Get prepared multilevel super clip, estimate motion
# The following two lines specify a forward & backward search of images.
backward_vec = MAnalyse(super, overlap=4, isb = true, search=3)
forward_vec = MAnalyse(super, overlap=4, isb = false, search=3)


MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(last),den=FramerateDenominator(last))

assumefps(60.00)

Any ideas on how to improve the quality of the output from the Change Frame Rate script would be greatly appreciated. If you need me to upload sample footage I'll be happy to do that - but it might take a couple of days as I have a lot going on at the moment.

Thanks again for all your help.😉

wwaag wrote on 12/17/2018, 6:11 PM

@Jep

"Can I ask what script RenderPlus uses when set to the Default Template?"

Most HOS tools involving FFmpeg, Avisynth, and VirtualDub are command line driven. You can always see the actual command lines that are being used. For RenderPlus, such information can be found at "C:\ProgramData\HappyOtterScripts\Magix Vegas Pro\RenderPlus". RenderPlus.avs gives the Avisynth script while renderCommandLine.bat is the actual FFmpeg command line. Each tool will have its own folder in which scripts can be found. Particularly useful is the file LastRenderLogFile.txt for diagnosing crashes due to scripting errors.

Uploading sample footage would be best. Time delay is no problem since I am away from my main development machine for this week.

 

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.