MSP/VS/MF: Encode MPEG's from clips with fast motion

For VideoStudio, MediaStudio Pro, VideoGraphics Lab, Cool3D

Moderator: Ken Berry

Terry Stetler
Posts: 973
Joined: Thu Mar 17, 2005 3:34 pm
Location: Westland, Michigan USA
Contact:

MSP/VS/MF: Encode MPEG's from clips with fast motion

Post by Terry Stetler »

Flowing water, sunlit waves and fast sports action are among the toughest things to encode to MPEG or other temporal compressions (DivX, WMV etc.) without generating artifacts along the way. Setting a quality of 100 and a high CBR bitrate can improve things, but because of the complex lighting and motions in such content this is frequently where the "normal" settings are not enough and the Advanced MPEG menu comes into play.

Motion search parameters:

Once the bitrate, CBR and quality are set next click on the Advanced menu button in the Compression tab. Once the Advanced menu opens you'll quickly realize that there are a ton of MPEG settings you never knew were there. For now ignore 98% of them and just deal with the following settings that deal with motion.

MPEG deals with motion by using what are called "motion vectors" to calculate how much an object has moved between frames. As long as an objects motion is within the default search parameter set by the encoder all is well, but let the motion exceed this value and artifacting is a likely result. Unfortunately many, if not most, encoders define the motion search area as small a box a few pixels square. OK for talking heads or birthday parties, but not so good when you're dealing with waterfalls or race cars.

The fix: increase the area and accuracy of the motion search.

Start by browsing to the "Advanced Video Settings tab" as shown below;

Image

Once there check both the "Do half-pel search" box and the "Enable" box for "Auto set motion vectors". Half-pel (half pixel element) will enable subpixel searches, which are more accurate. Taking manual control over the horiz and vert motion vectors will help with pixelization due to fast object motion by searching for these changes over a larger area than the defaults would permit.

Now set a value of 16 or more in both the "Horz pel movement" and "Vert pel movement" spin boxes. Values can go much higher than this, so there's a lot of room for adjustment if the need arises. You can even define the search area as a rectangle to more closely tailor it to the situation at hand.

An example would be to set a wide rectangular motion search, say 32 horizontally by 8 vertically, when encoding car races. This would restrict the highest quality motion search to where it's most likely to be found; in the direction of the race cars motion. Turn this same rectangular search area vertical (8 horiz x 32 vert) and it's perfect for waterfalls. Keep the search pattern square for those situations where the motion is unpredictable (baseball, football, soccer, breaking waves etc.)

You might also want to increase the "Noise sensitivity" setting from its default value of 5 (3-7 is typical for DV clips) to a higher value more often used for analog captures (5-14 is typical for analog). I'd probably start with 10 or so. This could help with any pixelizations already in the camera footage due to the lighting, motion etc. Camera codecs are very good, but not perfect.

GOP adjustments:

MPEG GOP's (group of pictures) consist of mainly calculated frames (P and B frames) between widely spaced real bitmap data (I frames). More calculated frames, which are stored as motion vectors and not bitmaps, mean smaller file sizes.

MPEG's encoded for NTSC DVD generally use a GOP size of 15 while those for PAL DVD use a GOP size of 12, meaning each GOP equals about 1/2 second of video. In either case all but one of the pictures in each GOP will be calculated B and P frames and just one will be a real bitmap.

Because of this reducing the number of P & B frames and increasing the number of I frames can up the quality of high motion video by lessening the encoders dependence on motion vector calculations, but this comes at the cost of increased file size.

Yup....another tradeoff situation :)

If you want to try this technique browse to the MPEG Advanced/Video Settings menu and reduce the I frame value to 6 as shown in this image;

Image

As indicated in the above image (NTSC shown) this will reduce the number of P and B frames per I frame and therefore increase the number of I frames (real bitmaps) per second. Generally speaking more I frames per second = higher quality.

These settings will make for slower rendering, but should reduce pixelization due to objects moving rapidly between frames. If the pixelization is reduced but not gone up the motion vector settings by a few numbers and see what happens.

Needless to say I'd start by rendering a short preview range of a troublesome portion of the project until it looks good and only then render the whole project.
Last edited by Terry Stetler on Wed Feb 01, 2006 1:33 am, edited 1 time in total.
Terry Stetler
Helge
Posts: 177
Joined: Thu Jan 05, 2006 12:53 pm
Location: Germany

Post by Helge »

Thanks Terry,
for that good explanation. Also I know a lot about mpeg, I avoided it til now to modify the gop structure, because I was not sure that this does not cause compatibility problems with some dvd players. But if I have sequences of still images (slideshows) I was attempted to increase the I-frame distance. Would this be save? And how would this affect the transitions? (e.g. an image stands for 6 seconds after which a transition of one second follows.) I usually use VBR for this.
I hope you continue to explain the remainig 98%. I am sure I would still learn much.
Terry Stetler
Posts: 973
Joined: Thu Mar 17, 2005 3:34 pm
Location: Westland, Michigan USA
Contact:

Post by Terry Stetler »

As for how large a GOP you can set for DVD: 18 is the limit for NTSC and 15 is the limit for PAL. These are known as "long GOP". A "short GOP" would be the 6 frame GOP I noted in my example.

Long duration stills are the perfect place for using VBR and "long GOP" because so little changes over time, which is exactly what both are best at. The "short GOP" trick I posted is for the opposite situation where you have lots of changes over a short time.

Different strokes for different situations and the modern decks I've used can handle it just fine. The only problem will likely be older decks, and IMO the Chinese decks are so cheap replacing these oldsters is probably long overdue.

ex: I now have $35 Norcent decks that'll play anything round with a hole in it while my $200-300 decks from just 3-4 years ago have trouble playing any recordable media beyond DVD-R.

Changing GOP's shouldn't affect transitions even if the sources are MPEG since MSPro8 transforms B and P frames into I frames on the timeline for editing.

With any source on export I, B & P would be encoded again and the motion calculations should be able to handle transitions as long as their duration isn't shorter than 1/2 second, the approximate length of a "long GOP".

Since a transiton this short in duration can be visually annoying IMO they should be avoided anyhow.
Last edited by Terry Stetler on Thu Feb 02, 2006 5:11 am, edited 1 time in total.
Terry Stetler
Helge
Posts: 177
Joined: Thu Jan 05, 2006 12:53 pm
Location: Germany

Post by Helge »

Thanks again, Terry, for that detailed information.
studiolynga

Advanced settings?

Post by studiolynga »

How do You do it?
I cant get the advanced MPEG settings to show up in MSP8.
MSP7 works fine, I just did as You wrote in a message here
on the Forum, but with MSP8 I nothing happens.
Terry Stetler
Posts: 973
Joined: Thu Mar 17, 2005 3:34 pm
Location: Westland, Michigan USA
Contact:

Post by Terry Stetler »

This works in Win2K and XP;

Check the copy of MSP.INI in

C:\documents and settings\all users\application data\ulead systems\ulead mediastudio pro\8.0\

Now look for this heading and entry;

[VIODRIVER]
Advance=1

If Advance=1 isn't there enter it and save MSP.INI back out to that location.

The Advanced button should appear on the export dialogs MPEG/Options/Compression tab.

Once set the Advanced option should appear when you restart MSPro8.
Terry Stetler
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

Video Studio & Movie Factory Users can do this also.

Follow Terrys instructions in the post above but alter the following ini file
VideoStudio
C:\Documents and Settings\All Users\Application Data\Ulead Systems\Ulead VideoStudio\9.0\uvs.ini
(Alter 9.0 above for your version of Video Studio)

MovieFactory
C:\Documents and Settings\All Users\Application Data\Ulead Systems\Ulead DVD MovieFactory\5.0\DVDMF.ini
(Alter 5.0 above for your version of MovieFactory)

You now have the ability to alter the GOP structure in just the same way as Terry described.

Steve J

Disclaimer
This is not an official solution by Ulead. Editing a critical program file and any other changes to it can cause the program not to run properly. If you encounter problems with the software and ask for Technical support, the TS guys may not be able to give the exact solution because the program has been tampered. Tech Support can never know for sure what other values are changed so its better to be safe. Its like voiding the warranty of a certain electrical device by removing a jumper or modifying its circuit. Make sure you backup those files and revert it to the original one and then ask for TS assistance.

It is covered in the EULA under "2. Use of Software: You may not: 4) reverse engineer, decompile, or disassemble or otherwise attempt to discover the source code of the software"
nyco_ork

Post by nyco_ork »

Steve,

Lance Carr just sent me to this thread. You guys are a big help.

Thanks

RIchard
maddrummer3301
Posts: 2507
Joined: Fri Dec 10, 2004 10:24 pm
Location: US

Post by maddrummer3301 »

Hi,
I've enabled the Advance=1 on the other versions of ulead products and it works.

Using MovieFactory 5 doing this is causing the Variable_Bit_Rate Encoding engine not to work properly on my systems.
The results being a low bit rate in the final encoded video file.
So if someone notices some loss of resolution or poor quality video check the final encoded bit-rate on the dvd using a bit-rate analyzer. Many desktop dvd players have this feature and it's also in the software players such as Nero Showtime, power dvd etc.

Example: Exporting or making my "Project Properties" to a Variable Bit Rate of 6000 through 9800 will be encoded to approx 4200.
So, basically anything higher than 4200 ends up back to 4200kbs on my systems.

Posted this because there have been posts that the VBR of MF5 is broken.
It appears only to not work properly if the Advance=1 is inserted into the configuration file.

A good reason for the "Disclaimer" from ulead.
Quote:
"Disclaimer
This is not an official solution by Ulead. Editing a critical program file and any other changes to it can cause the program not to run properly. If you encounter problems with the software and ask for Technical support, the TS guys may not be able to give the exact solution because the program has been tampered etc"

MD
blplhp
Posts: 338
Joined: Wed Aug 02, 2006 10:12 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Dell Motherboard
processor: AMD Phenom II 6-Core 1055T
ram: 6GB
Video Card: ATI Radeon HD5670
sound_card: Soundblaster
Hard_Drive_Capacity: 1TB
Location: Coconut Creek, Florida USA

Post by blplhp »

Hi Terry,

I came across this thread recently and I had a few questions regarding this idea of adjusting the MPEG Output Settings. Whether I deal,with photography or videography, I am an image quality nut. I like to pixel peep my photos, I scrutinize my photo printer for high quality print-outs and I like to have the highest quality video playback from my DVD creations. I am using VS10+, I have a Sony Digital 8 camcorder and a new Canon A630 digicam.

Most of my video recordings are of my children around the house (sometimes of them running around, sometimes of quiet scenes), recording my son's sporting events and even recording events at themeparks and the like.

Do you think that I would benefit in increased video quality if I added the Advance =1 to my uvs.ini file and made the exact changes you mentioned (I-Frames to 6 and enable set motion vectors to 16 horiz. and 16 vert.). I typically create my video files using VBR 8000 kbps and run the quality slider to 100%.

Thanks. If anyone else has any thoughts, please let me know as well.
Cheers,

Bryan P.


X2 Pro
X3 Pro
Adobe Elements 8
Sony DCR-TRV315 Camcorder
Canon G10
Canon 40D
sjj1805
Posts: 14419
Joined: Wed Jan 26, 2005 7:20 am
operating_system: Windows XP Pro
System_Drive: C
32bit or 64bit: 32 Bit
motherboard: Equium P200-178
processor: Intel Pentium Dual-Core Processor T2080
ram: 2 GB
Video Card: Intel 945 Express
sound_card: Intel GMA 950
Hard_Drive_Capacity: 1160 GB
Location: Birmingham UK

Post by sjj1805 »

I think the idea of increasing the total number of I frames in your project is to improve matters where there is fast motion such as during a sporting event.

The best way of finding out is to create two identical video clips of a few minutes duration. One clip has the normal I frame gap, the other has the gap reduced. Here you can go overboard and reduce it to something ridiculous (as it is only a test and not your 'real' project). Burn both videos to a hard drive folder. It would also be worthwhile placing a brief title clip to identify which is which (to assist in the following playback process).

Now play each one back with a software player such as PowerDVD or WinDVD 7. To make it even easier to compare use the players 'playlist' option with repeat play. Now you can judge for yourself if there is any improvement or degradation.

It would also be interesting to hear the results of such a test and so if you do so please post your finding here.
maxfrost01
Posts: 274
Joined: Tue Jun 27, 2006 3:49 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Intel Corporation DX58SO AAE29331-501
processor: Intel i7 920 2.67GHz
ram: 6 GB
Video Card: NVIDIA GeForce 7600 GS
sound_card: High Definition Audio Device
Hard_Drive_Capacity: 2.2 TB
Location: London

Post by maxfrost01 »

Hi,

I followed this thread and made the Advance=1 entry. I think this made a noticeable improvement to the quality of my DVDs. Really pleased.

However....I've now moved from XP to Vista and I don't know how to make the entry to 'release' the Advanced button.

Any Vista users who can help?

(PS: I've downloaded the Vista patch from the Ulead website and 10+ seems to be running okay other than being less stable - too many crashes).
Max
maxfrost01
Posts: 274
Joined: Tue Jun 27, 2006 3:49 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Intel Corporation DX58SO AAE29331-501
processor: Intel i7 920 2.67GHz
ram: 6 GB
Video Card: NVIDIA GeForce 7600 GS
sound_card: High Definition Audio Device
Hard_Drive_Capacity: 2.2 TB
Location: London

Post by maxfrost01 »

Hi,

I followed this thread and made the Advance=1 entry. I think this made a noticeable improvement to the quality of my DVDs. Really pleased.

However....I've now moved from XP to Vista and I don't know how to make the entry to 'release' the Advanced button.

Any Vista users who can help?

PS: I've downloaded the Vista patch from the Ulead website and 10+ seems to be running okay other than being less stable (too many crashes).
Max
maxfrost01
Posts: 274
Joined: Tue Jun 27, 2006 3:49 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Intel Corporation DX58SO AAE29331-501
processor: Intel i7 920 2.67GHz
ram: 6 GB
Video Card: NVIDIA GeForce 7600 GS
sound_card: High Definition Audio Device
Hard_Drive_Capacity: 2.2 TB
Location: London

Post by maxfrost01 »

Hi,

I followed this thread and made the Advance=1 entry. I think this made a noticeable improvement to the quality of my DVDs. Really pleased.

However....I've now moved from XP to Vista and I don't know how to make the entry to 'release' the Advanced button.

Any Vista users who can help?

PS: I've downloaded the Vista patch from the Ulead website and 10+ seems to be running okay other than being less stable (too many crashes).
Max
Barney1
Posts: 55
Joined: Wed Mar 05, 2008 5:07 am
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Asus IPIBL-TX Burbank-GL8E
processor: Core 2 Quad Q6600 2.4GHz 1066 MHz 8 MB L2
ram: 4GB
Video Card: GeForce 8400GS
sound_card: Integrated 7.1 Sound
Hard_Drive_Capacity: 200GB
Monitor/Display Make & Model: HP w2207
Location: Cleveland, Ohio
Contact:

Post by Barney1 »

maxfrost1,

Have you been able to get the advance settings to work in Vista?
I did, but its not working correctly
Thanks!
Post Reply