XL1 Audio with Canopus DVRaptor & DVRex M1
an article by Charles Burmeister
Friends, this is long, but if you own a Canon camera and use a Canopus NLE, you’ll want to read it. If you're just looking for a solution and don't want any explanation, scroll down to Canopus's reply at the bottom of the page. It seems that the Canopus DVRaptor and DVRex cards are flawed in the way they resample audio from Canon cameras, especially when the audio is 32 kHz, 16-bit, resulting in a high pitched distortion in the audio of all ..AVI files. For XL1 users with Canopus NLE systems, a warning: your audio may be distorted.
This is a subtle but clear distortion, like the metallic flutter of a bugs wings. I worked with the Raptor for 3 weeks before I heard it, but now I can clearly distinguish it, especially when compared to the source tape which is pristine. If you use the XL1, I suggest you test your system carefully. It shows up most clearly in scenes with strong audio e.g. many people talking at a party or music playing on a stereo.
In addition, the switches provided by Canopus to disable this resampling may not work for many users. This means that for all Canon users, it can be difficult to avoid this distortion. In particular, for Canon GL1 users, they may be unable to turn off the resampling–a necessary measure to keep long captures in sync. There may be a work around for both of these problems.
Background
I used the Pinnacle DV300 card for a year with many problems. I finally decided to switch my system over to the Canopus DVRaptor card. While recapturing all of my video for my current projects, I noticed that the DVRaptor added a high pitched distortion to all of my audio captured at 32 kHz using my Canon XL1. When compared to the same captures from the DV300, there was no distortion.
I rechecked all of my presets, setups, and went through all the checks suggested by Canopus Tech Support. I tested two Canon XL1 cameras and two DVRaptor cards. The results were the same. Clearly audible distortion when capturing with the 32 kHz audio. There appeared to be noise on 48 kHz audio as well, but it wasn’t as clear. For ease of testing, I only used 32 kHz audio. In the future 48 kHz audio should be thoroughly tested.
From reading the DVRaptor users group, I was aware that the DVRaptor automatically resamples audio from Canon cameras to insure perfect sync over long video captures. (XL1 cameras may take too many audio samples which over a long capture (5+ minutes) can lead to out of sync audio.) I was also aware that the new Canon GL1 cameras corrected this problem so that the automatic resampling by the DVRaptor actually caused their audio to go out of sync. The solution provided by Canopus personnel was to add the line: "CanonAudio1=-1" to the [DVRaptor] section of the "canopus.ini" file. Even with this fix, many GL1 users still complained that the added switch had no effect and the DVRaptor continued to capture out of sync audio.
The Testing Begins
I knew that this resampling was a primary suspect in my audio problems. My theory was that the DV300 didn’t resample the audio and that’s why it sounded fine. I thought the DVRaptor might resample incorrectly, therefore adding distortion. So, I attempted to disable the resampling on my DVRaptor by changing the canopus.ini file. The change had no affect–my audio was still distorted.
After several days of providing sample files to Canopus Technical Support that compared the DV300 "clear audio" captures with the DVRaptor "distorted audio" captures, they still provided no solutions or suggestions for a fix now or in the future. With a major deadline looming a week away, I bought a DVRex card, hoping that it would perform differently. I had already lost 3 weeks of work and done a week of "product testing" for Canopus free of charge. Honestly, after this problem I would have bought a card from a different company, but this was the only card that supplied 4 track audio support under Windows NT. Oh, well, if it performed like the Raptor, I could always return it. If it worked, I could meet my deadline.
The Rex captured the audio exactly as the Raptor–it was distorted. Again, the change in the canopus.ini made no difference. The only difference was that under the DVRex FAQ page, it suggested that to disable resampling, "you might also have to add the line: "cap32to48=-1"" This didn’t make any sense as to why their software didn’t have a simple switch that could disable resampling. I lost a little faith when I read that, but I was willing to try anything.
The Rex FAQ page has recently changed this cap32to48 suggestion to: "If you still have problems, try CanonAudio1=3". I tested it and got the same result as the "-1" value which was it had no effect. You might try it on your own system. The recent change suggests that someone at Canopus knows there's a problem.
In short, the "cap32to48=-1" line, changed how the Rex and the Raptor captured my audio. The CanonAudio1=-1 continued to have no effect either way.
Essentially, with the cap32 line, the captured audio was undistorted. Unfortunately, the Raptor resampled the audio to 48 kHz, while the Rex kept the audio at the native 32 kHz.
Success... but wait!
It seems to me that the CanonAudio1 line as supplied by Canopus has absolutely no effect on how the Raptor or Rex captures, at least on the ones that I tested. This explains why I continued to get distorted audio and many GL1 users continued to get out of sync audio.
Yes, the cap32 line seems to "fix" the problem of audio distortion, and it may fix out of sync capture for GL1 users. But it leads to many more questions that need to be answered before it is recommended as a true fix.
What does the cap32to48 line do? On the Raptor it apparently resamples the 32 kHz to 48 kHz. How does it do this? Usually such resampling adds noise. Does the Canopus code use a sophisticated algorithm like Sound Forge or does it simply average the values it calculates which usually adds noise?
And aren’t we using digital cameras with our Raptors so that we can stay in our native digital environment WITHOUT resampling?
Why does the DVRex capture the audio in it’s native 32 kHz while the DVRaptor changes it to 48 kHz? Is this truly skipping the resampling routine and taking the native DV audio? Is the audio being processed in a way that could add noise?
At the bottom of all this is: Why doesn’t the resampling routine in the Raptor and Rex drivers work properly? Why does it add distortion in some (and possibly all) cases? Why is it so difficult to disable in some cases? Why is Canopus so unclear about how to disable it? For GL1 users and XL1 users without sync problems: How do we get pristine audio without resampling of any variety?
Conclusion
For XL1 users with audio distortion problems and GL1 users with audio sync problems there are a variety of additions to the canopus.ini file that may change how the Raptor or Rex operates. The leading candidates (although the first two didn’t work for me) are adding to the [DVRaptor] or [DVRex] section:
CanonAudio1=-1
and if that doesn’t work, try:
CanonAudio1=3
and if that doesn’t work, try:
cap32to48=-1
(Although this last choice may change 32 kHz audio to 48 kHz as it did in my Raptor test, which may add undo noise if Canopus’s algorithm is unsophisticated.)
Of course, for a true solution, we need to hear from Canopus about how to resolve this problem. We need to know in a up front and detailed way how to disable audio resampling. (An explanation of why it’s so difficult might restore some confidence.) I'd also like to know whether their resampling algorithm is as sophisticated as Sound Forge's.
We also need to know exactly why their resampling seems to introduce distortion in some (and maybe all) cases, so that all XL1 users can be reassured that their audio is as pristine as when they recorded it.
Canopus's Solution seems to work for the Rex, but not for the Raptor. I'll update the info when I get it. Here's their reply in case it works for you.
Reply from Canopus
DVRex/DVRaptor/EZDV and Canon audio: DVRex/DVRaptor/EZDV all work the same. (THERE IS A DIFFERENT SETTING FOR TURNING OFF THE RAPTOR RESAMPLING, SEE THE BOTTOM OF THIS PAGE.) I am referring as DVRex but the below explanation applies to every product.
First, one question needs to be answered clearly; Why is Canopus resampling Canon Audio?
The answer for that is; Because our product is a video editing system, and not a video capture card.
Our product is targeted to people who edit video on their PCs. And because there are different cameras from different companies, we must support data mixing between different types of cameras. And video captured in camera A and camera B should be able to be mixed, and also video captured in camera A should be able to be edited and then outputted to camera C.
To do this, the audio data within the video file must be arranged to a proper NTSC audio level, to be able to mix and output to multiple systems. The first camera manufacturer that we set as a standard for our system use was Sony. The DVRex was designed to support Sony DV/DVCAM camcorders and also support locked audio in DVCAM systems. For instance, in locked audio format, the audio output must be set to exactly 32032hz per second, otherwise the deck will not accept the audio in sync. The Sony consumer DV cameras are also designed to record/output audio in and around that frequency, averaging around 32032hz for every second.
Then came the Canon XL1. The main problem with this camera was that the audio frequency changed he.AVIly for every second, sometimes with differences of more than 20 to 30hz between adjoining seconds. And the average audio frequency was around 32053hz for every seconds. With this type of audio data, if we capture video from the XL1 as is and then try to mix with clips from Sony cameras or try to output as DVCAM locked audio, the audio sync will be way off, and unusable.
So to support XL1, what we did was this; when capturing, DVRex will look at the first second (store it in the buffer) and measure the sampling rate, and if that sampling rate was outside the range of 32026hz to 32038hz, DVRex will consider the camera as an XL1 and capture audio as 32053hz per second. After sampling as 32053hz per second, it will convert the audio to 48048hz, and then convert back to 32032hz, to create an .AVI file. This is to create an .AVI file that is compatible with other cameras.
Now, if the audio data is inside the range of 32026hz to 32038hz, DVRex will use the measured sampling rate and capture audio as that sampling rate, and create an .AVI file in that audio sampling rate.
After we create a project in RexEdit, the project output will be in exactly 32032hz per sec, no matter what .AVI clips you use in the project.
After the support for XL1, more irregular cameras/decks came in the market. Ones such as the Sony Media Converter, outputted signals above the 32026hz to 32038hz range, but had a sustained frequency for every second. So we added a setting CanonAudio1=3 in the .ini file, which will look at the first second and measure the sampling rate, and DVRex will capture audio in that frequency. And if that sampling rate was outside the range of 32026hz to 32038hz, DVRex will convert the audio to 48048hz, and then convert back to 32032hz, to create an .AVI file.
When the DVRex is doing the process of converting the audio to 48048hz, and then convert back to 32032hz, "Rec+SC" will show in the capture information box in RexVideo.
But, there was one problem with this process. When the audio was converted to 48048hz and then put back to 32032hz, high frequency noise showed in some situations. To ease the noise, we added a new setting in the .ini file, as Cap32to48=1. With this setting, if that sampling rate was outside the range of 32026hz to 32038hz, DVRex will capture audio in that frequency (or in 32053hz per second if CanonAudio1=3 is not set), and convert the audio to 48048hz and then create an .AVI file in 48048hz. This will ease this noise somewhat.
Also during all this, an another setting was added to go around all the above settings. If you set Cap32to48=-1 in the .INI file, all the above settings will become invalid, and DVRex will capture audio as is. But because RexEdit is set to output audio in 32032hz, if you use files that do not match this, the output will be out of sync.
For Raptor users, you must use Cap32to48=0xFFFF to disable all the resampling. For Rex users, use Cap32to48=-1 instead.
Below is the current setting options in the canopus.ini for capturing audio.
- (no settings) -- will look at the first second and measure the sampling rate, and if that sampling rate was outside the range of 32026hz to 32038hz, DVRex will consider the camera as an XL1 and capture audio in 32053hz per second. After sampling as 32053hz per second, it will convert the audio to 48048hz, and then convert back to 32032hz, to create an .AVI file. If the audio data is inside the range of 32026hz to 32038hz, DVRex will use the measured sampling rate and capture audio as that sampling rate, and create an .AVI file.
- CanonAudio1=3 -- will look at the first second and measure the sampling rate, and DVRex will capture audio in that frequency. And if that sampling rate was outside the range of 32026hz to 32038hz, DVRex will convert the audio to 48048hz, and then convert back to 32032hz, to create an .AVI file.
- Cap32to48=1 -- when the DVRex converts the audio to 48048hz, it will not convert it back to 32032hz and creates an .AVI file in 48048hz.
For Raptor users, you must use Cap32to48=0xFFFF to disable all the resampling.
For Rex users, use Cap32to48=-1 -- all the above settings will become invalid, and DVRex will capture audio as is. Output audio is set to 32032hz.
The Watchdog Notes: This article originally appears at rubycanoe.com/raptor/. Special thanks to Charles Burmeister for his consent to copy it here.
Back to the XL1 Articles Menu
Written by Charles Burmeister
Thrown together by Chris Hurd