Pages: [1] 2 3 4 Next   Go Down
  Print  
Author Topic: USB Audio Input???  (Read 3451 times)
0 Members and 1 Guest are viewing this topic.
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« on: 31 / March / 2008, 03:08:42 »

Although we haven't ported the TX-1 as yet, when we do (ever the optimist) one feature that would be absolutely brilliant would be the ability to record audio through the USB port when shooting video.

As with most of these smaller cameras, the audio is subject to all the problems of onboard microphones - handling- and wind-noise and distance from the source.

There are great USB Mixers available that would enable high quality, multi-mic mixing using wireless mics, shotgun mics etc. if the USB datalines could be accessed during recording.

Any ideas...??
« Last Edit: 31 / March / 2008, 03:11:40 by cybercom » Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
Sterling
Newbie
*

Karma: +64/-221
Offline Offline

Posts: 39


« Reply #1 on: 03 / April / 2008, 02:22:14 »

Brilliant suggestion!
I don't know why that never even occurred to me. That's one of the biggest complaints about the TX-1; the lack of an external mic jack for such a great camera.
Logged

You smite like a girl!
Barney Fife
Hero Member
*****

Karma: +70/-219
Offline Offline

Posts: 1159



« Reply #2 on: 03 / April / 2008, 06:32:02 »

Deleted
« Last Edit: 22 / April / 2008, 21:03:45 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
jetzt
Sr. Member
****

Karma: +5/-0
Offline Offline

Posts: 306


[A710IS,(SD200)]


« Reply #3 on: 03 / April / 2008, 14:20:42 »

And again someone should correct that, the first real HD cam was also done by a total newbe.
(Ok we have to say for fairness, that he had himself some money to invest and so it was much easyer to convince the other investors...)  Big Grin
Logged
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« Reply #4 on: 03 / April / 2008, 22:42:30 »

Barney Fife,

There are already many USB-interface mixers.

Usb Mixer - Compare Prices, Reviews and Buy at NexTag - Price - Review

They are not using the voltage lines 1 & 4, but rather the data lines - 2 & 3. The cameras can already upload and download images and they have onboard audio recording capabilities, so it is not a question of speed of the USB data lines really. USB 2 is about the same as IEEE 1394, aka Firewire, and that's used for DVCAM video all the time.

The A-to-D conversion you speak of is already taken care of by the mixer and all you have to do is simply (??) route the incoming bit stream to whatever buffers are normally used by the output of the ON BOARD A-to-D converters used by the ON BOARD analog microphones.

Something like:

Using CHDK, intercept the output of the on-board converters and replace it with the incoming data from the mixer through the USB Port. Basically a driver. The one difficulty might lie in synchronizing the clock, but since (at least my) cameras will already handle 44.1-kHz, 16-bit, stereo, there exists a standard interfacing.

Might have to buffer the input with the audio buffers and re-read the bytes (words?) to spit them out properly, but as long as they are recorded, frame accurate sync wouldn't be a concern as the tracks could always be slipped a frame or two in an editing program to compensate for any buffering delay.

I don't believe the audio is interleaved with the video, but that might be different depending on the camera involved.

Anyway, I think it could be done and it would add a great capability.

 
« Last Edit: 03 / April / 2008, 22:46:05 by cybercom » Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
databoy
Jr. Member
**

Karma: +6/-12
Offline Offline

Posts: 76


« Reply #5 on: 05 / April / 2008, 10:49:11 »

Regarding audio recording. The professional recording studios use computers to control the audio console. The actual processing is done by high quality A to D converters. The sound cards in Windows computers are too primitive to process high quality audio. They are designed for gaming. The audio amps and A to D converters are low quality. If you want to look at the audio recording aspect Google DAW - Digital Audio Workstation. There are plenty of professional sites which explain the recording processes.

If you want to record decent audio, on the cheap, do what the TV studios do. Use a high quality recorder and decent microphones. Record the audio through your camera as well as tape. You can use VirtualDub to synchronise the audio. If you want to spend the money try Sony Vegas Pro.

The Doom9 Forums have an active discussion on audio and video processing.

Doom9's Forum - Powered by vBulletin

It is probably the best place on the net to start.

Personally I think that people are trying to extract blood out of a stone by using the A to D chip in the camera. It would be better if someone can work out a way of synchronising the camera and the audio recorder using a PICAXE chip.   
Logged
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« Reply #6 on: 06 / April / 2008, 05:26:19 »

databoy,

I think you missed something in my previous post. I'm not sure how an automated DAW relates to recording audio in the field.

The 44.1kHz, 16bit stereo format (CD quality standard) the TX-1 camera is capable of is more than sufficient for original capture of dialog and sfx. Using an external USB mixer to feed the camera would allow much higher quality and provide many additional advantages as well.

If you read my post, I'm not suggesting using the camera's A-to-D converters but rather bypassing them altogether.

I've worked as a professional location sound mixer for decades on features, documentaries, over 2500 commercials, etc, etc, etc. I've used ProTools, Sound Forge, Sonar and a number of other programs in  conjunction with my AVID and am pretty familiar with decent microphones as I own over 250 of them including Schoeps, Neumann, Sennheiser, RCA ribbon mics, Lectrosonics wireless, etc.

FWIW, there are numerous professional quality soundcards using balanced XLR, optical, S/PDIF or AES/EBU digital I/O that work just fine with Windows. But again this has nothing to do with my feature request.

While double-system recording, as you suggest is indeed a possibility, the ability to record directly into the camera eliminates a number of time consuming post production steps.

And, BTW, I don't know of any TV studios here in NYC that record to DAT or any kind of audio tape any longer. Everything is either single system video or digital capture. No one has the time to playback a tape in real time just to capture the audio. They'll still do it for video if they have to, but they really just want a file they can drag into the NLE.

Anyway, I was really just suggesting a feature request, not asking for an uninformed opinion of what I should do.
« Last Edit: 06 / April / 2008, 05:54:24 by cybercom » Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
Barney Fife
Hero Member
*****

Karma: +70/-219
Offline Offline

Posts: 1159



« Reply #7 on: 06 / April / 2008, 10:28:43 »

Deleted
« Last Edit: 22 / April / 2008, 21:04:08 by Barney Fife » Logged

[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« Reply #8 on: 06 / April / 2008, 16:08:39 »

I have no idea why this feature request is attracting such negative responses from people .

Nowhere do I mention anything about a "need for absolute quality" but repeatedly state that 44.1kHz, 16-bit stereo is just fine. Since this is a possible output from a USB mixer, there are no jet-engines to rowboats but rather a perfect match up.

Think for a minute instead of attacking me again.

Wouldn't it be great of you could get the output from your parabolic mic into the camera? You would get much better audio, free of camera location and wind- and handling noise. You could zoom in or out without losing any audio. When you downloaded to edit, all your audio would already be in perfect sync with the picture and at CD quality.

As far as the video quality goes, the TX-1 shoots 720P HiDef video that we have looked at on Avid Adrenaline HD systems and it compares extremely favorably with multi-thousand dollar cameras which are much larger and much more visible and cumbersome. The thought of a sub-$500.00 HD camera the size of a pack of cigarettes recording CD quality audio from a portable mixer output would have immense appeal to a large audience of independent filmmakers, news teams, documentarians & numerous others.

Please, no more postings about why YOU think this is a bad idea. That is not the purpose of a "feature request forum." If you cannot contribute something positive to perhaps move this idea into fruition, please refrain from contributing any more negativity.

Respectfully,
Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
jetzt
Sr. Member
****

Karma: +5/-0
Offline Offline

Posts: 306


[A710IS,(SD200)]


« Reply #9 on: 06 / April / 2008, 16:48:23 »

So for positive now:
It is interesting, I think you already mentioned usb-host to usb-slave by data and power lines ...

But wouln't it be much simpler to just put an additional microphone jack into some empty space and some electronics to always use the best micro?
Just if you could also live with hardware solutions, I think this woul really improve the quality.

Happy imaginin'
jetzt
Logged
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« Reply #10 on: 06 / April / 2008, 19:25:29 »

jetzt,

Thanks for the "input." Unfortunately the TX-1, unlike other larger cameras really has no space available to even install a micro-jack and, even if you could, you would be relying on an unbalanced, high-impedance audio input which provides no shielding, and is therefore subject to hum and other rfi.

No, I really believe that a software hack using the USB port is doable and will provide the best quality audio in the most reliable way. Besides, if I hardware hack my camera, how can anyone else take advantage of it? A CHDK software hack will potentially open this up to everyone with a camera!

 
Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
fudgey
Global Moderator
Hero Member
*****

Karma: +64/-1
Offline Offline

Posts: 699

a570is


« Reply #11 on: 06 / April / 2008, 22:38:31 »

I have no idea why this feature request is attracting such negative responses from people .

Well, browse around the other feature requests and you'll find that the thing with USB is that we really want to do a whole lot of things with it but either can't or don't know how.

Currently the best we can do with USB is to detect whether USB cable is connected or not, with a resolution of something like ten or twenty milliseconds. We can use it as a remote trigger or to communicate with the camera extremely slowly. For stereo photography, two cameras can be synchronized by this USB cable detect.

Some cameras are also remote controllable in webcam style and also remote wakeable via USB, but these are original Canon features and only available for some models.

So we are pretty far from being able to receive an audio stream via USB. We'd be thrilled to be able to receive 300 bytes per second of control data first...
Logged
databoy
Jr. Member
**

Karma: +6/-12
Offline Offline

Posts: 76


« Reply #12 on: 07 / April / 2008, 04:24:30 »

Cybercom,

You may be a professional working in a recording studio but the majority of people on forums are beginners who just want to use their equipment. I am a hardware guy not a software guy; I do not believe in re-inventing the wheel.

If you work in a recording studio you would know that Windows does not process the audio in high end  professional audio equipment. It just does the switching and mixing controls to the A to D and D to A amplifiers. Windows XP out of the box does not have the latency to process audio or video properly. XP has to be tweaked extensively and all the networking protocols removed; otherwise you are left with artefacts. 

I live in Perth, Australia. The TV stations still use a double sound system and dub in the studio. Australia is PAL; USA is NTSC.

With all that equipment and knowledge at your disposal you should know that you cannot bypass A to D converters in a piece of equipment without opening the equipment and letting loose with a soldering iron. I may not work in a recording studio; I have some electronics and electrical knowledge; build and modified high end HI-FI equipment and know how to use a soldering iron. The microphone is hard wired to an analogue amplifier then fed into the A to D converter. The audio mute is either done through a mute circuit or an address line on the A to D chip.

Bypassing the on-board A to D altogether and feeding audio down the USB line is worthwhile proposition. You need an external microphone, analogue amplifier, A to D converter and USB converter. If you have that equipment ok you have a good digital source. The problem is that in Windows based computers everything is processed by software. In consumer goods they use a small microprocessor for control purposes and a small OS, all the rest is done in specialised hardware chips, usually one big LSI chip. You would still need access to the hardware information to bypass the A to D hardware on the camera. I cannot see how you would do it in software without a major rewrite of the OS.

I am not going to enter into a flame war with anyone on the forum. If you or anyone else have schematics, technical documents or access to the schematics for any CHDK compliant Canon cameras post them on the forum.     
Logged
cybercom
Full Member
***

Karma: +14/-2
Offline Offline

Posts: 193



« Reply #13 on: 07 / April / 2008, 06:32:21 »

I still don't get what recording studios and windows have to do with my feature request of getting USB audio into a camera, but..


Bypassing the on-board A to D altogether and feeding audio down the USB line is worthwhile proposition. You need an external microphone, analogue amplifier, A to D converter and USB converter. If you have that equipment ok you have a good digital source. ...

You would still need access to the hardware information to bypass the A to D hardware on the camera. I cannot see how you would do it in software without a major rewrite of the OS.

  

Let's just address the two points you make here:

A USB  Mixer satisfies all of the criteria you outline for hardware, so a good digital source is immediately available to feed the USB Port.

As to your second point, CHDK is exactly that, a rewrite of the OS...

If I had tight chops in the programming realm, which I don't, and which is why I put in this feature request in the first place, I would think based on my understanding of digital audio that there is a data flow that runs something like this:

Physical sound hits microphone, analog voltages generated by the microphone are sampled at some clock and bit rate by an A/D converter and FED INTO BUFFERS AS DIGITAL WORDS. CPU reads buffers and records them to SD Card.

Buffers have addresses in firmware for I/O, so to replace the onboard mic audio with the external mixer audio:

CHDK reads incoming audio from USB port. Writes it to buffer space on the SD card and tells the CPU not to pay attention to the firmware addresses used by the firmware buffers, but rather to use the addresses on the SD card (maybe it's possible to find space in the firmware to buffer the audio. There must be space avalable somewhere). There has to be a routine in the firmware pointing the CPU to an address for the buffer.

Or, why can't CHDK simply overwrite the buffer with the USB data just before it is read by the CPU?

CPU happily uses the new data pointed to by CHDK and records it to the SD Card as audio just as it normally would.

I also have no desire to engage in this continuing naysaying about why this can't be done because of windows and recording studios and DAW's and whatever. And I'm sure that what I've just written will open up the possibility of even more negativity as to why this or that part of it can't be done because of Linux and micro basic or some other equally unsupportive thing.

Again, let's try to have some positive input on this idea and stop trying to convince me that it can't be done. If you think it's a bad idea, that's fine, but keep your opinion to yourself.

If YOU haven't tried to do it then whatever you say is really irrelevant to the posting of a "feature request" here, so please don't.

Logged

~~~~~~~~~~~~~~~~~~~~~

<")%%%><<
fudgey
Global Moderator
Hero Member
*****

Karma: +64/-1
Offline Offline

Posts: 699

a570is


« Reply #14 on: 07 / April / 2008, 21:50:32 »

I'm not really an expert on CHDK internals so someone correct me if I'm wrong.

First, CHDK is not a rewrite of the camera's OS. For the sake of safety, the developers have been quite careful not to make modifications to the camera firmware and the original and complete OS is still there running alive and well. CHDK inserts some hooks here and there to get some time to do it's thing periodically. It uses a great deal of functions and variables provided by the OS to do many of its wonderful tasks, while a whole lot of other stuff is completely new and only uses standard C libraries from the OS.

Now, if I'm not mistaken, CHDK gets it's job done every time the camera polls it's keyboard for keypresses, which only happens every 10 ms or so. This is quite a long time in audio recording or for fast USB data transfer. Both the ADC and USB related buffers are probably interrupt driven and if your camera model actually compresses audio during video recording, it probably does it using an external codec or ip block with a buffer possibly shorter than 10 ms.

And even if this would be resolved, this only applies to a subset of camera models as most of them have really crappy audio capabilities (like 8-bit mono at 11 kHz) and their hardware such as A/D converters, audio compression codecs, buffers etc. just can't be expected to scale 16-fold, it would have been incredible waste of money from Canon.

So, if I'm not mistaken, what you're thinking probably requires changing the camera firmware, which is potentially destructive (the developers really don't have a free supply of spare cameras Big Grin) and hard to port to different camera models.


But even finding a readable USB or microphone buffer could make some neat stuff possible...
Logged
Pages: [1] 2 3 4 Next   Go Up
  Print  
 
Jump to: