Optimizing Video Capture Performance

phd

Super Moderator
Here is some info for optimizing system performance for capture.
Please note that some of this is dated information for older operating systems and some of it is hardware specific.
I have found this useful over the years and for people who find the problem of dropped frames or audio sync in the source files may find this useful as well.
Thanks to Dazzle and Pinnacle for the original information.


From the Dazzle website:

Question
How to obtain optimal video performance, increase system resources, and free up memory in Windows. This will fix video choppiness, audio video sync problems, outputting and capture issues as well as several other multimedia problems. This should be a video creator’s first step towards an enhanced editing and capturing experience.

Answer
Windows OS - Optimal Video Performance
To obtain optimal video performance or get rid of choppy, blocky, or pixilated video:

1 Enable Direct Memory Access (DMA)

2 Lower Hardware Acceleration

3 Get the latest Video Adapter Drivers

4 Get the latest DirectX Drivers and Digital Video Capture Update

5 Delete Temporary Files

6 Lower Screen Resolution and Color Depth to a maximum of 1024x768 16bit

7 Update Windows

8 Update Windows Media Player

9 Turn off the Windows Screen Saver
A Right click on the "Desktop"
B Select "Properties"
C Select "Screen Saver"

10 Close all other Applications (not for Windows 2000 or NT)
A Press "Ctrl-Alt-Delete"
B The "Close Program" dialog will come up
C Select a program other than "Explorer" and "Systray"
D Click End Task
E Repeat the above steps until "Explorer" and "Systray" are the only two programs left

11 Set Windows Virtual Memory - Windows 98, SE, Me only
1 Right click on "My Computer"
2 Select "Properties"
3 Select the "Performance" tab
4 Select the "Virtual Memory" button
5 Select to choose the settings
6 Set both numbers to 256 (maximum and minimum)
7 Click "OK"
8 Click "Yes"
Note: If there are any problems after setting this item, set VM back to let Windows handle the file.

12 Run a Disk Defragmenting program to speed up your computer's ability to access data. - In Windows 98, SE, ME only
1 Click "Start"
2 Click "Run"
3 Type "Defrag"

13 Disable Windows Visual Effects - Windows XP only
1 Open the "System Properties"
2 Click the "Advanced" tab
3 Click the "Performance - Settings" button
4 Click the "Adjust for best performance" radio button
5 Click "OK"
6 Click "OK"

14 Setting Windows Page File - Windows XP only
1 Open the "System Properties"
2 Click the "Advanced" tab
Click the "Performance - Settings" button
3 Click the "Advanced" tab
4 Click the "Change" button
5 Select "Custom Size"
6 Type 256 into the "Initial Size" and the Maximum Size
7 Click the "Set Button"
8 Click "OK" three times
9 Restart the computer


From the Pinnacle Website:

How do I optimize my system for video capture and playback?

Overview:
You can do all or just a few of these items, they are all undoable by reversing the steps. All of them will help create the most stable environment possible for video capture devices.

Problem:
How do I optimize my system for video capture and playback?

Solution:

Virtual Memory Settings
This setting alone could solve many problems. Normally Windows is setup to allow the virtual memory swap file to be resized dynamically as the system is running. While the swap file is resizing other programs can be delayed causing glitches or pops in the audio or video during playback. In order to avoid this situation it is best to set the minimum and maximum parameters in your swap file settings to the same values.

Setting your Virtual Memory Size.
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the SYSTEM icon.
Click the PERFORMANCE tab.
Click on the VIRTUAL MEMORY button.
Select "LET ME VERIFY MY OWN VIRTUAL MEMORY SETTINGS".
Set the MINIMUM and MAXIMUM values to the same value. The best setting depends on your hardware and the amount of memory you have installed but I suggest at least 16MB and at most twice the amount of your physical memory. The most important thing is to make sure both values are the same.

--------------------------------------------------------------------------------

Disk Caching
Write caching is another feature of Windows 9x that normally helps to speed up regular applications but in the case of digital video/audio programs, this can be a big problem. In order to disable this feature follow these steps.

Turning off Write Caching
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the SYSTEM icon.
Click the PERFORMANCE tab.
Click the FILE SYSTEM button.
Click the TROUBLESHOOTING tab.
Check DISABLE WRITE BEHIND CACHING FOR ALL DRIVES
Click OK to save the settings.
Read caching can cause similar problems to Virtual Memory in that Windows 95 dynamically resizes the read cache buffers. Again the solution is to set the minimum and maximum parameters to be the same.

Making changes to Read Cache Settings
Open the System.ini file by typing "system.ini" in the Win95 Run line, click OK.
Look for a section in the file named [vcache] There should already be one, but if not you can add it.
Add the following lines under the [vcache] heading.
MinFileCache = 2048
MaxFileCache = 2048
You can experiment with larger settings in increments of 1024.

--------------------------------------------------------------------------------

Double Buffering

Some systems may be configured with double buffering for handling disk transfers. This can be another source of video/audio problems.

Disabling Double Buffering
Locate your root directory on your boot drive.
Right click on the MSDOS.SYS file and select PROPERTIES.
Uncheck the read only box and click OK.
Double Click the MSDOS.SYS file and open it in Notepad.
Look for a section labeled [Options]
Look for a line under the heading which says DoubleBuffer=1
Change this to say DoubleBuffer=0
If there is not a line at all add "DoubleBuffer=0"
Save the file and exit Notepad.

--------------------------------------------------------------------------------

Read Ahead Optimization

This is an additional area for optimizing HD performance for digital video/audio applications. You should turn off Read-ahead optimization.

Disabling Read Ahead Optimization
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the SYSTEM icon.
Click the PERFORMANCE tab.
Click the FILE SYSTEM button.
Move the READ-AHEAD OPTIMIZATION slider to the left (OFF)
Select NETWORK SERVER from the TYPICAL ROLE OF THIS MACHINE setting.
Click OK.

--------------------------------------------------------------------------------

Video Cards

Many video cards can monopolize the PCI bus and interfere with DMA operations. One of the first things you should do is make sure you have the latest drivers for your card. Many new drivers provide applets which allow you to disable or modify certain settings for the card. If there is an option for PCI bus retries and/or DMA bus mastering or a similar option, you should try disabling these. If you are still having problems or your video driver does not have the above options, you can try reducing hardware acceleration from the control panel.

Reducing Graphics Hardware Acceleration
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the SYSTEM icon.
Click the PERFORMANCE tab.
Click the GRAPHICS button.
Move the HARDWARE ACCELERATION slider to the left one notch.
Click OK.
You will need to restart Windows. If the problem remains, repeat the above process until the problem is solved or the slider is all the way to the left. If this did not solve your problem you should probably reset the slider to the highest setting (to the right).

--------------------------------------------------------------------------------

Media Control

To keep the Media Control Interface (MCI) from introducing a double buffering condition in your system you may need to disable the Wave audio device.

Disabling the Wave Audio Device
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the MULTIMEDIA icon.
Click the ADVANCED tab.
Click the plus sign next to MEDIA CONTROL DEVICES.
Select the WAVE AUDIO DEVICE(MEDIA CONTROL) and click PROPERTIES.
Select the "DO NOT USE THIS MEDIA CONTROL DEVICE" option.
Click OK.

--------------------------------------------------------------------------------

Power Saving

Disable power saving on your system. Rendering can sometimes take long enough for power saving to turn on and interrupt the render.

Disabling power saving
On your start menu click on SETTINGS and then on CONTROL PANEL.
Double click the POWER MANAGEMENT icon.
Under POWER SCHEMES choose the "ALWAYS ON" option.
For SYSTEM STANDBY choose the "NEVER" option.
Set TURN OFF MONITOR AND HARD DISKS to "NEVER".
Click OK.

--------------------------------------------------------------------------------

More Suggestions:

Compressed Drives
This may seem obvious but make sure you are not using compressed drives. Your computer must uncompress the files on these drives on the fly leading to obvious problems for real time hard disk recording and playback.

Close running programs
Make sure you are not running unnecessary programs in the background. You should clear out your start-up folder and the LOAD and RUN lines in your win.ini file. The win.ini file is located in your windows directory. Load it by typing win.ini in the Win95 Run line.

FAT-32
Newer versions of Win95 as well as Win98 include the option to format your drive with FAT-32. With the default 4k cluster size this can decrease wasted space on hard drives, especially if you have many small files. Unfortunately it's also a bit slower than FAT-16. Video and audio files tend to be very large so you are better off with either a FAT 16 formatted drive or a FAT 32 drive using larger clusters for video/audio applications. Partition Magic is an excellent utility which will allow you to format FAT 32 drives using larger cluster sizes.

Defrag
Defragment your drives. A heavily fragmented drive can put a noticeable drag on hard disk performance.

MS-DOS Compatibility Mode
Make sure you aren't running your hard drives or CD-ROM in MS-DOS compatibility mode. You can check this in the Control Panel | System | Performance window. If you see a message stating that windows is running in MS-DOS compatibility mode you should resolve the problem. The most likely cause is missing 32 bit drivers for your hardware.

CD-ROM Notification
You might want to try disabling auto insert notification for your CD-ROM drive. This can cause problems with some systems. To disable this go to the Control Panel | System | Device Manager | CD-ROM | Properties | Settings , and disable AUTO INSERT NOTIFICATION.


Also from Pinnacle:

How do I optimize my system for the Studio DC10plus.

Solution

The latest version of the software for the Studio DC10 plus is 1.06. If you are using an older version of Studio DC10plus you should point your internet browser to

http://www.pinnaclesys.com/support/display.asp?ProductID=307&SubDocTypesID=67

To download and install version 1.06 now.

To optimize a system, several components of the system must be optimized at the same time due to the dependent nature of all components in a computer. The Operating System, CPU, memory, hard drive and the video application must all work together to achieve optimum performance. Failure to optimize any one component will usually adversely effect overall video capture and playback performance.

System recommendations

Operating System: Windows 95 and 98 have the same performance. Make sure you have the latest drivers loaded for your sound card, graphics card and hard drive controller. Do not use generic Windows drivers. Remove as many unnecessary background applications as possible.

CPU: P133 or better. CPU speeds only marginally effect capture and output performance but it can dramatically improve video editing/rendering performance. Overclocking of the CPU (i.e. running the CPU above it rated speed) is not recommended since it may cause various intermittent problems.

Memory: 64 or 128 MB of RAM

Hard Drive and controller: We recommend Ultra SCSI (SCSI-3) devices such as the Adaptec 2940UW controller and for hard drives, the Quantum Atlas II and Atlas III or the Seagate Cheetah. These are necessary to achieve the maximum datarate the card can obtain. Most customers capture at 3 to 4 Megabytes/second, which can be achieved with an Ultra DMA EIDE hard drive. Many customers are using the Promise FastTrack controller with good results. It is more important is to have a separate HD for the video, so system activity goes to system or boot hard disk and capture / playback activity uses the video hard disk.

Pinnacle Studio DC10plus driver: Make sure you have our latest driver.

Optimizing the Operating System

1 Check your drivers for your sound and graphics card.
Verify that you are using the current driver for both your sound cards and graphics card. Upgrade to the current driver if necessary by downloading the driver from the manufacturers web site. To get the version number on these devices:

A Go to Start -> Settings -> Control Panel
B Double-click on System
C Click on the Device Manager tab in the System Properties window.
D Under the headings called "Display Adapter" and "Sound, Video and Game Controllers", select the appropriate device by double-clicking on it. Click on the driver tab to view the information regarding the driver version. Please verify with the manufacturer that this version is current for your operating system.

2 Verify that there are no resource conflicts in your system.
A Go to Start -> Settings -> Control Panel
B Double-click on System
C Click on the Device Manager tab in the System Properties window.
D Note: Are there any exclamation marks or question mark on any devices? If there are, please resolve these issues by calling the manufacturer of the problematic device for support before proceeding.

3 Verify that the DC10plus card is not sharing its IRQ. The card will work best if assigned it's own IRQ and not sharing with another device.
A Go to Start -> Settings -> Control Panel
B Double-click on System
C Click on the Device Manager tab in the System Properties window.
D Double-click on "Computer", it is the top entry in Device Manger.
E Locate the Pinnacle Studio DC10plus card on the list. Use the scroll bar on the right hand side of the window to view the entire list. The number on the left side is the Interrupt (IRQ) that has been assigned to the card by the computer's BIOS. For optimal performance, no other device should have this same number. The only exception is the "IRQ holder for PCI steering, which is not a device but a "placeholder".

4 Review your config.sys and autoexec.bat files. Remark out any DOS drivers or any old 16 bit drivers.

5 Check your System Resources and remove any background applications.
A Go to Start -> Settings -> Control Panel
B Double-click on System
C Click on the far right tab marked, Performance in the System Properties window.
D Your system resource should be above 90%. If they are go to step 7, if not proceed to step E Turn off wallpaper
F Turn off any screen saver
G Go to the taskbar and close all applications except for the Studio DC10plus control and the video capture or editing application
H Hold down the Ctrl and Alt keys, then press the Del key just once. When the Close program window appears, write down all the programs that are running. The only programs that need to be running are Systray, Explorer, MV-ctrl and MISItray.

6 Change the resolution of the display adapter. Reduce it to 800x600 and 16 bit color.

7 Make sure that the computer is not connected to a network. If it is, log out.


Optimizing the hard drive subsystem

We strongly recommend using the hard drives and controllers listed on the Recommend Equipment List.

We strongly recommend having a separate boot disk and capture disk(s). Use a dedicated capture disk if possible. Many users boot from an inexpensive EIDE hard drive and have a separate Ultra SCSI hard drive dedicated solely to capture and playback of video.

Defrag the capture drive on a regular basis, especially before capture and output to tape.

Run scandisk on the capture disk on a regular basis.

1 Check to see if UDMA is enabled on your hard drives:
A Go to Device Manager
B Double-click on the Heading "Disk Drives"
C Double-click on the device GENERIC IDE TYPE xx (xx is some 2 digit number, usually 01, 02, etc)
D Click on the Settings tab.
E In the section marked Options, put a check in front of DMA.
NOTE: If you do NOT have a selection called DMA, then most likely you do not have the UDMA driver loaded or your hard drives do not support UDMA (or both). Please contact either your computer manufacturer or the hard drive vendor.
F You'll get a message stating that you may want to contact your hard drive vendor to ensure that the setting is supported. Click OK.
G You'll be prompted to reboot your system. Click OK.
H Run Studio, click on the Capture tab, then click on Settings. Click on the Test Data Rate button. Typical UDMA hard drives will give reads and writes of 10,000 to 15,000 KBytes/second.
I Now try to capture.

2 Make sure that a hard drive compression scheme is not being used.
In Win95/98 there are settings for disabling the software cache to your hard drive.
A Go to Start -> Settings -> Control Panel
B Double-click on System
C Click on the Performance tab in the System Properties window.
D Click on the File System button, set the Read-ahead optimization slider to 'None'.
E Click on the Troubleshooting tab and put a check in the "Disable write-behind caching for all drives" checkbox.
F Click on the Apply button, then the OK button.
G Select Yes when your computer prompts you to have the settings take effect.

3 Run the miroEXPERT test. Make sure to select the capture disk to test and not the default C: drive. If the 'write' and 'read' numbers are completely out of balance, ie., one value is half the other value, then you most likely have some sort of problem with your hard drive and you should contact the drive manufacturer. You may not have the hardware cache on the hard drive enabled.
 

steveski74

New member
From a guy I know who was writing his own capture suite, he said that he was getting major performance loss, nearly locking his system, when his HD's were getting full, even when he had 2 or more SATA 2 drives striped.
His software would just record from some start time to some end time and cache say 12 hours of content for each channel broadcast into 1/2 hour long files. So his files weren't tiny, but they weren't so large that it would take forever for the system to move files is necessary. Once the software detected that it couldn't write to the drive it would delete the oldest files in the channel's set of files before saving the next bit, so his drives were always close to full capacity.

What he found was that Windows automatically starts some cleanup / maintenance process which was taking forever once the drives were near full capacity. He found that increasing the file system block size to 64k eliminated any further issues.
 
Last edited:

cykelsmeden

New member
contigious filesize

I have 3 more tweaks which to my expieriense increases performance on discaccess:

---regfile discperform.reg
Windows Registry Editor Version 5.00

; windows indexingservice is not much use for average user - stop it
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cisvc]
"Start"=dword:00000004

;registering of last fileaccess is not much use for average user - stop it
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem]
"NtfsDisableLastAccessUpdate"=dword:00000001

; working with videofiles usually makes big files. Avoid small freaments
; - a really speeder
; Configuring contiguous file allocation size
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"ContigFileAllocSize"=dword:00000200
; Including this option increases performance.
;needs new restart and the defragmentation AFTER set

---

finn
 

Robbi

New member
He found that increasing the file system block size to 64k eliminated any further issues.
I'm interested to hear from others here. What cluster size you use for formatting todays big sized hard drives.

This information would be good for us all to know. To lower fragmentation that can lead to loss of files with read/write I/O errors.

It's not a quick and easy now to fragment, these large hard drives quickly. Not forgeting many times we can be record several seperate programs at once. Leading to more induced fragmentation risks, with multiple large gigabyte files.

Correct cluster size is recomended i would have thought, for hard drive performance and longevity. What is the right cluster size to set for todays big hard drives. That have many gb single files saved, stored and read from over and over. Just because they are cheaper now, doesn't mean we want to loose a drive full of media files. Because a wrong cluster size was set at the last drive format.
 
The reason 64k clusters fix the Windows maintenance issue is that Windows defragmenter doesn't work at all with large clusters: but large clusters and large video files make defragmenting unnecessary (for the most part). I use 64k clusters and multiple drives with only video files. (no programs, log files, just data)

Drives "Converted" from Fat32 to NTFS can end up with 512 byte clusters which really degrade performance. Compare file size with size on disk to get a sense of cluster size.

VISTA has a Prefetch/Superfetch option that can upset playback, especially HD files. Turn it and "Indexing" off, especially if the drive will be full most of the time. Some recording software (like Sage) deliberately fills the drive up.
 

Robbi

New member
The reason 64k clusters fix the Windows maintenance issue is that Windows defragmenter doesn't work at all with large clusters: but large clusters and large video files make defragmenting unnecessary (for the most part). I use 64k clusters and multiple drives with only video files. (no programs, log files, just data)

Drives "Converted" from Fat32 to NTFS can end up with 512 byte clusters which really degrade performance. Compare file size with size on disk to get a sense of cluster size.

VISTA has a Prefetch/Superfetch option that can upset playback, especially HD files. Turn it and "Indexing" off, especially if the drive will be full most of the time. Some recording software (like Sage) deliberately fills the drive up.
Is there a good cluster size to use with 1gb+ media files. That has also log files with them of 1k & 2k. I'm needing these logs to be with the files always, they are m2r error logs essential use for editing. Would 64k clusters comprimise this by using to much space and causing fragmentation. Yes i preferably would like to have no fragmentation or having to do defragmenting with media drives. As is i don't bother defragmenting, but checking the drives is obvious it needs doing badly all of the time.

I can quickly clear a drive to another one for reformating always ntfs only. Using only xp for a long time yet for future, vista suks. Indexing always turned off for all drives. System restore turned off on all drives except the system drive.
 
A few log files would not be a problem on a large drive with 64k clusters (the most commonly suggested size AFAIK). Several hundred (or a thousand) would eat up space and probably slow things down. With that many you'd be defragmenting weekly, I would suspect.
 

Robbi

New member
Thats great news zaphod i will clear a hd reformat with 64k and try it. Its a question i've been thinking of for a very long time.



I came across this software that will happily run and defrag, while a system is doing other tasks. Its free and under gnu license. You'll need to read the instructions before use. Running the cli version with or without additional gui. Lets you do this, it was made for servers initialy, but can be run on xp and vista non servers.

I havent tried this software yet but have read a lot about it, last hour or so. Be sure to read the Known problems on the web page for suitabilty for your pc system. I'll use this on non media drives only.
 

laserfan

New member
Compare file size with size on disk to get a sense of cluster size.
Is there an easy (in-Windows) way to determine what a drive is using? zaphod7501 do you recall what the "default" cluster size would be when formatting an NTFS partition?

I do have some utilities to help with this but not accessible at the moment, thanks! This is a great discussion as I have wondered about this in the past, whenever I see the (huge) size that Windows allocates for directory entries (I think it's Diskeeper that shows this). Maybe these allocations are reduced as well when cluster size is maxxed.
 
Default is 4k. I don't know of any Window's way of determining the size. I look at the properties of a 1k text file and see what the size on disk is, that will be the cluster size (at least in Win2k), somewhere I heard there is a special condition for very small files (under 1k) in newer OS's so you might neeed to check a 2k or 3k file. Converting from Fat32 to NTFS using the Window's convert utility is where 512 byte clusters come from (lowest common denominator). There are some arcane rules for the exact conditions that cause this but it's happened every time I tried it.
 

laserfan

New member
Re: determining cluster size--It appears for XP this is as simple as right-clicking on the drive and selecting "Format"--the number that appears cross-checks correctly with my Diskeeper analysis. My C: (System) is 512bytes, D: is 4k, E: is 4K, L: (Documents & Settings) is 2k. D and E are where I keep my video files.

I think I have a util somewhere to convert partitions in-place; I'll have to try it...
 
Last edited:

Robbi

New member
There are tools to do it in place partition magic so on. But these can go wrong and take huge ammounts of time. Sometimes even to do simple operations. Nothing is better than clearing the drive. Then Format it afresh with the new cluster size. Normal format or a quick format i'm unsure, normal formatting a large drive, will take long time.
 

DrP

Member
Changing from 4k clusters (the normal Windows memory page size) won't really yield any performance increase. More intelligent capture software that pre-allocates contiguous chunks of disk space would be far more effective in stopping frame drops.
 
Top Bottom