Some questions about audio recording, file deleting etc. in scripts. - General Discussion and Assistance - CHDK Forum

Some questions about audio recording, file deleting etc. in scripts.

  • 3 Replies
  • 3326 Views
Advertisements
Hi all!

I'm having an idea for a script/feature that could do some cool things for triggering photos/video, but I need to know if some things are possible with CHDK before I spend more time with it.

First of all, am I right in understanding that the cameras use uncompressed PCM  (.wav) for audio recordings?

Second, could CHDK perform something like this:

-record 5secs of audio
-use 2secs for "something else"
-delete previously recorded 5secs of audio
-be ready to do this again or jump to different part of script

in less than 10secs? And are there ways to program this without emulating button presses? I know that recording audio is only possible as "comments" to a picture when you use the camera. Are there other ways to record audio with a script? It does not necessarily have to be in an audio file, it could just be raw dump from the microphone.

I know I could have investigated some of these things on my own, but my Powershot is being repaired at the moment. Yes, I broke it, and I'm sad. Thank god plastic can be glued back on  ::)

Thank you in advance,
Asmund

*

Offline reyalp

  • ******
  • 13391
Re: Some questions about audio recording, file deleting etc. in scripts.
« Reply #1 on: 01 / October / 2008, 21:04:17 »
Audio is typically PCM wav on (almost ?) all cameras.

AFAIK there is currently no way to do audio recording from CHDK other than button presses.

One other option would be to record video, with the compression settings overridden to extremely low quality. Of course, you camera would have to be in record mode to do this (unlike audio notes, which are playback only for some cams), and you'll have to strip the audio out of the AVI. On my camera (a540, which records 11khz/8bit mono PCM) video at quality 1, 160x120, 15fps the file size is only about 2x that of the raw audio alone. The video is completely useless, but the audio is fine.

Deleting can be done from lua scripts.
Don't forget what the H stands for.

Re: Some questions about audio recording, file deleting etc. in scripts.
« Reply #2 on: 02 / October / 2008, 05:44:26 »
Thanks for the quick reply! :)
Recording lo-fi video would be a very good option if splitting is possible. I intend to use this script in record mode anyway. I'll have to look closer at what is contained in the avi files. Since I only need to keep 5secs of video, size is not a problem.
Again, thanks! :)

*

Offline reyalp

  • ******
  • 13391
Don't forget what the H stands for.


 

Related Topics