Capture audio from soundcard - help!

Hi everyone,
I'm tyring to write a little utility that captures everything coming out of my sound card and stores it as a .wav file on the system. (When I say everything, I mean wave output...for now).
The purpose of this little exercise is two fold, i) familiarise myself with JMF and ii) enable me to store music from online radio stations to burn and listen on CDs later.
I have thus far got to the point where I can successfully record a .wav file although when I play the file back it's completely silent. I have a sneaky suspicion that this is because I have not configured something to capture from an output port on the soundcard instead of the usual mic/line it etc...
Another problem I've just stumbled accross whilst testing the code before I post it is that if I run in debug mode and step through everything works fine. If I execute normally I get a "javax.media.NotConfiguredError: setContentDescriptor cannot be called before configured" exception. Why would this be happening when running normally, but not in debug?
Any hints/tips with this little lot would be great.
Thanks in advance,
Chris
PS My prototype is below;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Vector;
import javax.media.CaptureDeviceInfo;
import javax.media.CaptureDeviceManager;
import javax.media.DataSink;
import javax.media.Manager;
import javax.media.MediaLocator;
import javax.media.Processor;
import javax.media.datasink.DataSinkEvent;
import javax.media.datasink.DataSinkListener;
import javax.media.datasink.EndOfStreamEvent;
import javax.media.protocol.DataSource;
import javax.media.protocol.FileTypeDescriptor;
public class JCapture
CaptureDeviceInfo captureDeviceInfo = null;
DataSink dataSink = null;
public static void main(String[] args)
JCapture jCapture = new JCapture();
jCapture.doIt();
System.exit(0);
private void doIt()
// retrieve list of available capture devices
Vector vector = CaptureDeviceManager.getDeviceList(null);
Iterator it = vector.iterator();
while(it.hasNext())
CaptureDeviceInfo deviceInfo = (CaptureDeviceInfo)it.next();
if("DirectSoundCapture".equals(deviceInfo.getName()))
captureDeviceInfo = deviceInfo;
break;
// exit if no capture devices found
if(captureDeviceInfo == null)
System.err.println("No capture devices found!");
System.exit(-1);
try
     // get media locator from capture device
     MediaLocator mediaLocator = captureDeviceInfo.getLocator();
     // create processor
     Processor p = Manager.createProcessor(mediaLocator);
     // configure the processor
     p.configure();
     // set the content type
     p.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.WAVE));
     // realise the processor
     p.realize();
     // get the output of processor
     DataSource dataSource = p.getDataOutput();
     // create medialocator with output file
     MediaLocator dest = new MediaLocator("file://c:\\myFile.wav");
     // create datasink passing in output source and medialocator specifying our output file
     dataSink = Manager.createDataSink(dataSource,dest);
     // create dataSink listener
               dataSink.addDataSinkListener
                    // anonymous inner class to handle DataSinkEvents
                    new DataSinkListener()
                         // if end of media, close data writer
                         public void dataSinkUpdate(DataSinkEvent dataEvent)
          // if capturing stopped, close DataSink
                              if(dataEvent instanceof EndOfStreamEvent)
                              dataSink.close();
     // open the datasink
     dataSink.open();
     // start the datasink
     dataSink.start();
     // start the processor
     p.start();
     getConsolePress();
     // stop the processor
     p.stop();
     // close the processor
     p.close();
catch(Exception e)
e.printStackTrace();
System.exit(-1);
System.out.println("Finished!!");
public void getConsolePress() throws Exception
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader input = new BufferedReader(isr);
String line;
System.out.println("Press x to stop capturing...");
while (!(line = input.readLine()).equals("x"))
System.out.println("Press x to stop capturing...");
return;

tyring to write a little utility that captures everything coming out of my sound card and stores it as >>a .wav file on the systemCapture (input) from an output???
You can capture from the mic/line in, so plug in a microphone and talk into it, to see if you are recording.
enable me to store music from online radio stations This has nothing to do with the sound card. The stream is from the internet, then capture that stream, pass it to jmf, and record to file.
You only need the sound card for listening(output) or record (live input from mic).

Similar Messages

  • Capturing audio from soundcard!

    Can anybody help me? When i compile this code no problems appears, however when i execute the program this is shown to:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    c:\Sun\SDK\jdk\bin>java JCapture
    javax.media.NotConfiguredError: setContentDescriptor cannot be called before con
    figured
    at com.sun.media.ProcessEngine.setContentDescriptor(ProcessEngine.java:3
    42)
    at com.sun.media.MediaProcessor.setContentDescriptor(MediaProcessor.java
    :123)
    at JCapture.doIt(JCapture.java:69)
    at JCapture.main(JCapture.java:27)
    Exception in thread "main" javax.media.NotConfiguredError: setContentDescriptor
    cannot be called before configured
    at com.sun.media.ProcessEngine.setContentDescriptor(ProcessEngine.java:3
    42)
    at com.sun.media.MediaProcessor.setContentDescriptor(MediaProcessor.java
    :123)
    at JCapture.doIt(JCapture.java:69)
    at JCapture.main(JCapture.java:27)
    The code is this:
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.util.Iterator;
    import java.util.Vector;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.DataSink;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.Processor;
    import javax.media.datasink.DataSinkEvent;
    import javax.media.datasink.DataSinkListener;
    import javax.media.datasink.EndOfStreamEvent;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.FileTypeDescriptor;
    public class JCapture
    CaptureDeviceInfo captureDeviceInfo = null;
    DataSink dataSink = null;
    public static void main(String[] args)
    JCapture jCapture = new JCapture();
    jCapture.doIt();
    System.exit(0);
    private void doIt()
    // retrieve list of available capture devices
    Vector vector = CaptureDeviceManager.getDeviceList(null);
    Iterator it = vector.iterator();
    while(it.hasNext())
    CaptureDeviceInfo deviceInfo = (CaptureDeviceInfo)it.next();
    if("DirectSoundCapture".equals(deviceInfo.getName()))
    captureDeviceInfo = deviceInfo;
    break;
    // exit if no capture devices found
    if(captureDeviceInfo == null)
    System.err.println("No capture devices found!");
    System.exit(-1);
    try
    // get media locator from capture device
    MediaLocator mediaLocator = captureDeviceInfo.getLocator();
    // create processor
    Processor p = Manager.createProcessor(mediaLocator);
    // configure the processor
    p.configure();
    // set the content type
    p.setContentDescriptor(new FileTypeDescriptor(FileTypeDescriptor.WAVE));
    // realise the processor
    p.realize();
    // get the output of processor
    DataSource dataSource = p.getDataOutput();
    // create medialocator with output file
    MediaLocator dest = new MediaLocator("file://c:\\myFile.wav");
    // create datasink passing in output source and medialocator specifying our output file
    dataSink = Manager.createDataSink(dataSource,dest);
    // create dataSink listener
    dataSink.addDataSinkListener
    // anonymous inner class to handle DataSinkEvents
    new DataSinkListener()
    // if end of media, close data writer
    public void dataSinkUpdate(DataSinkEvent dataEvent)
    // if capturing stopped, close DataSink
    if(dataEvent instanceof EndOfStreamEvent)
    dataSink.close();
    // open the datasink
    dataSink.open();
    // start the datasink
    dataSink.start();
    // start the processor
    p.start();
    getConsolePress();
    // stop the processor
    p.stop();
    // close the processor
    p.close();
    catch(Exception e)
    e.printStackTrace();
    System.exit(-1);
    System.out.println("Finished!!");
    public void getConsolePress() throws Exception
    InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader input = new BufferedReader(isr);
    String line;
    System.out.println("Press x to stop capturing...");
    while (!(line = input.readLine()).equals("x"))
    System.out.println("Press x to stop capturing...");
    return;
    }

    I compiled and ran your code and saw
    the error you described, but could not fix it ..
    OTOH - here is some code I was mucking
    about with recently (it was adapated from an
    example I found on a forum, but I cannot recall
    where), it seemed to work quite well, without
    ever creating a processor.
    Maybe that might help?
    import java.awt.FlowLayout;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JFileChooser;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import javax.swing.JOptionPane;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.InputStream;
    import java.io.FileOutputStream;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioFileFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.SourceDataLine;
    import javax.sound.sampled.TargetDataLine;
    public class AudioRecorder extends JFrame{
      boolean stopCapture = false;
      ByteArrayOutputStream byteArrayOutputStream;
      AudioFormat audioFormat;
      TargetDataLine targetDataLine;
      AudioInputStream audioInputStream;
      SourceDataLine sourceDataLine;
      File file;
    //  AudioFileFormat.Type fileType;
      /** The recorder will request enough memory for this lengh
      of time of audio recording.More might be possible.*/
      static int minutes = 4;
      /** channels - 1 for mono, 2 for stereo. */
      static int channels = 2;
      /** bytes - 1 means 8 bit, 2 means 16 bit, 3 means 24 bit. */
      static int bytes = 2;
      /** Samples per second, sample rate in Hertz. */
      static int samplerate = 44100;
      /** Default size of the audio array before expansion.
      Guarantees there is 'minutes' of memory for recording
      'bytes' of sound depth in 'channels' at 'samplerate'. */
      static int size = samplerate*channels*bytes*60*minutes;
      /** Make the temp buffer, for this fraction of a second. */
      static int timeperiod = 20;
      /** An arbitrary-size temporary holding
      buffer
      enough for 3 minutes of sampling in
      stereo at 16 bit, 44100Hz */
      //static byte tempBuffer[];
      static byte tempBuffer[] = new byte[samplerate*channels*bytes/timeperiod];
      public static void main(
        String args[]){
        if (args.length==0) {
          new AudioRecorder(null);
        } else {
          new AudioRecorder(args[0]);
      }//end main
      public AudioRecorder(String outputFileName){//constructor
        setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        setLocation(100,50);
        final JButton captureBtn =
          new JButton("Capture");
        final JButton stopBtn =
          new JButton("Stop");
        final JButton playBtn =
          new JButton("Save");
        captureBtn.setEnabled(true);
        stopBtn.setEnabled(false);
        playBtn.setEnabled(false);
        captureBtn.addActionListener(
          new ActionListener(){
            public void actionPerformed(
            ActionEvent e){
              captureBtn.setEnabled(false);
              stopBtn.setEnabled(true);
              playBtn.setEnabled(false);
              captureAudio();
        getContentPane().add(captureBtn);
        stopBtn.addActionListener(
          new ActionListener(){
            public void actionPerformed(
              ActionEvent e){
              captureBtn.setEnabled(true);
              stopBtn.setEnabled(false);
              playBtn.setEnabled(true);
              //Terminate the capturing of
              // input data from the
              // microphone.
              stopCapture = true;
            }//end actionPerformed
          }//end ActionListener
        );//end addActionListener()
        getContentPane().add(stopBtn);
        playBtn.addActionListener(
          new ActionListener(){
            public void actionPerformed(
              ActionEvent e){
              //Play back all of the data
              // that was saved during
              // capture.
              saveAudio();
            }//end actionPerformed
          }//end ActionListener
        );//end addActionListener()
        getContentPane().add(playBtn);
        getContentPane().setLayout(new FlowLayout());
        setTitle("IMAR");
        setDefaultCloseOperation(
          EXIT_ON_CLOSE);
        setSize(250,70);
        setVisible(true);
        if ( outputFileName==null ) {
          JFileChooser fc = new JFileChooser();
          int returnVal = fc.showSaveDialog(null);
          if(returnVal == JFileChooser.APPROVE_OPTION) {
            outputFileName = fc.getSelectedFile().toString();
          } else {
            outputFileName = "default.wav";
        file = new File(outputFileName);
        FileOutputStream fout;
        try {
          fout=new FileOutputStream(file);
        } catch (FileNotFoundException e1) {
          e1.printStackTrace();
      }//end constructor
      //This method captures audio input
      // from a microphone and saves it in
      // a ByteArrayOutputStream object.
      private void captureAudio(){
        try{
          //Get everything set up for
          // capture
          audioFormat = getAudioFormat();
    /*      AudioFormat.Encoding[] encodings =
            AudioSystem.getTargetEncodings(audioFormat);
          for(int ii=0; ii<encodings.length; ii++) {
            System.out.println( encodings[ii] );
          DataLine.Info dataLineInfo =
            new DataLine.Info(
              TargetDataLine.class, audioFormat);
          targetDataLine = (TargetDataLine)
            AudioSystem.getLine(dataLineInfo);
          targetDataLine.open(audioFormat);
          targetDataLine.start();
          System.out.println( "AR.cA: " + targetDataLine );
          audioInputStream = new
            AudioInputStream(targetDataLine);
          //Create a thread to capture the
          // microphone data and start it
          // running.It will run until
          // the Stop button is clicked.
          CaptureThread ct = new CaptureThread();
          Thread captureThread =
            new Thread(ct);
          captureThread.start();
        } catch (Exception e) {
          e.printStackTrace();
          System.exit(0);
        }//end catch
      }//end captureAudio method
      //This method plays back the audio
      // data that has been saved in the
      // ByteArrayOutputStream
      private void saveAudio() {
        try{
          //Get everything set up for
          // playback.
          //Get the previously-saved data
          // into a byte array object.
          byte audioData[] =
            byteArrayOutputStream.
            toByteArray();
          //Get an input stream on the
          // byte array containing the data
          InputStream byteArrayInputStream
            = new ByteArrayInputStream(audioData);
          AudioFormat audioFormat =
            getAudioFormat();
          AudioInputStream audioInputStreamTemp =
            new AudioInputStream(
              byteArrayInputStream,
              audioFormat,
              audioData.length/audioFormat.
                getFrameSize());
          audioInputStream =
            AudioSystem.getAudioInputStream(
              AudioFormat.Encoding.PCM_SIGNED,
              audioInputStreamTemp );
          DataLine.Info dataLineInfo =
            new DataLine.Info(
            SourceDataLine.class,
            audioFormat);
          sourceDataLine = (SourceDataLine)
            AudioSystem.getLine(dataLineInfo);
          sourceDataLine.open(audioFormat);
          sourceDataLine.start();
          //Create a thread to play back
          // the data and start it
          // running.It will run until
          // all the data has been played
          // back.
          Thread saveThread =
            new Thread(new SaveThread());
          saveThread.start();
        } catch (Exception e) {
          e.printStackTrace();
          System.exit(0);
        }//end catch
      }//end playAudio
      //This method creates and returns an
      // AudioFormat object for a given set
      // of format parameters.If these
      // parameters don't work well for
      // you, try some of the other
      // allowable parameter values, which
      // are shown in comments following
      // the declarations.
      private AudioFormat getAudioFormat(){
        float sampleRate = 44100.0F;
        //8000,11025,16000,22050,44100
        int sampleSizeInBits = channels*8;
        //8,16
    //    int channels = 2;
        //1,2
        boolean signed = true;
        //true,false
        boolean bigEndian = false;
        //true,false
        return new AudioFormat(
          sampleRate,
          sampleSizeInBits,
          channels,
          signed,
          bigEndian);
      }//end getAudioFormat
      //===================================//
      /** Inner class to capture data from
      microphone */
      class CaptureThread extends Thread{
        public void run(){
          byteArrayOutputStream =
             new ByteArrayOutputStream(size);
          stopCapture = false;
          try{//Loop until stopCapture is set
            // by another thread that
            // services the Stop button.
            while(!stopCapture){
              //Read data from the internal
              // buffer of the data line.
              int cnt = targetDataLine.read(
                tempBuffer,
                0,
                tempBuffer.length);
              if(cnt > 0){
                //Save data in output stream
                // object.
                byteArrayOutputStream.write(
                  tempBuffer, 0, cnt);
              }//end if
            }//end while
            byteArrayOutputStream.close();
          }catch (Exception e) {
            e.printStackTrace();
            System.exit(0);
          }//end catch
        }//end run
      }//end inner class CaptureThread
      /** Inner class to play back the data
      that was saved. */
      class SaveThread
        extends Thread {
        public void run(){
          try{
            if (AudioSystem.isFileTypeSupported(
              AudioFileFormat.Type.WAVE,
                audioInputStream)) {
              AudioSystem.write(audioInputStream,
                AudioFileFormat.Type.WAVE, file);
            JOptionPane.showMessageDialog(null,"Clip Saved!");
          } catch (Exception e) {
            e.printStackTrace();
            System.exit(0);
          }//end catch
        }//end run
      }//end inner class PlayThread
      //===================================//
    }//end outer class AudioCapture.java

  • Capture audio from separate device

    Is it possible to capture from a camera, but record the audio at the same time from a different audio device, e.g. soundcard?
    (My camera does not have a separate audio input with reasonable quality, so one could save from having 2 separate files by recording video from camera plus audio from soundcard. I'm not sure if that would really work due to latency problems, but I'd like to give it a try if possible.)
    Thanks!

    My practice is to capture sound separately using an hard disc recorder,from two to twenty-four tracks, and to combine this with the video in Premiere Pro. I use the sound track on the tape to achieve synchronization (which is very easy in Premiere Pro). If the room is small (<100 feet) I can use an on-camera microphone. For best results I use a wireless feed from the recorder to the camera.
    It's important to use a digital recorder, preferably at 48KHz sampling speed (you can convert from 44.1 or something else, but the speed may slip). An analog source, like a cassette deck, varies too much in speed, often more than 5%, to be useful. The sync slip is usually less than 3 frames per hour of recording. Most digital recorders have a digital output which can be captured directly by the computer through firewire or USB. If your only choice is an analog sound card, don't bother - too noisy and bad timing.

  • Capturing audio from microphone and save it to a file

    Hi!!
    I'm searching for a code using JavaSound that allows capturing audio from a microphone and save it to a file.
    thanks in advance and sorry for my English

    Hi,
    Check out these links.
    http://developer.java.sun.com/developer/technicalArticles/Media/JavaSoundAPI/
    http://java.sun.com/j2se/1.3/docs/guide/sound/prog_guide/chapter5.fm.html
    Also this is a very good site for finding similar issue as yours.
    http://www.jsresources.org/examples/audio.html
    Hope this helps.
    Regards,
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • Capturing Audio from DAT

    Hello,
    I'm trying to capture audio from a DAT deck (Tascam DA-20) into FCP HD by routing it through my JVC BR-DV600U DV deck (RCA output from DAT, RCA input to DV deck, Firewire into FCP).
    The DV deck's input is set to line-in, and the audio is being routed through (audio meters on DV deck mimic those on DAT deck, and I can hear the audio through the headphones jacked into my DV deck).
    However, when I try to capture the audio on FCP, I am unsuccessful, prompting the following window from FCP: "Error: Final Cut Pro HD was unable to read the movie file just captured."
    Now, I use the same set up I described above to capture footage from my Beta deck into FCP with no problems (route Beta signal through DV deck and firewire it into FCP). This leads me to believe that perhaps the glitch lies within my Capture Presets.
    At first, I tried to capture the signal as an Audio-Only DV NTSC 48 Khz/Non-controllable device. After that failed, I tried to create my own capture preset, but am not sure it will make a difference, as the only input choices I am given are DV Audio, Built-In Audio, and None.
    Any suggestions?
    Thanks.

    Why not capture the audio content outside of FCP, check the sample rate for 48Khz/16-bit, convert if necessary, save as an AIFF file, and then import that resulting sound file into FCP?
    Any good audio app, including STP will do captures.
    You are probably going to need to do some cleanup on the audio anyway before you use it, so why not just use an audio app to do it beforehand?
    Besides, if you have an audio device (PCI card or Firewire device) in your Mac, you can use the S/PDIF port for your connection to the DAT and do a digital transfer when you import.
    As I understand the way you are doing it now, you are taking digital content from the DAT, converting it to analog for the connection into your deck, and then re-converting it into digital when you capture it back into FCP.
    One big advantage of digital audio (and video) is to avoid generation loss and added noise during transfer if you go D-to-D.
    If you don't have an audio card or Firewire A/D audio I/O device with S/PDIF ports in your Mac, then see if you can find a friend who has one and can do the transfer for you. Then he can give you the file on a CD-ROM.
    That's what I'd do.

  • Can JMF capture audio from sound card?

    I want to know if JMF can capture sound/audio from the sound card. Until now we have been capturing audio from microphone. but is there any possibility of capturing audio from sound card using JMF.
    The audio captured from the sound card is to be streamed using JMF/RTP API.

    Dear seniors,
    i have tried to display my audio file as a graph as
    x axis being the Time and the y axis beeing the frequency/pitch.
    look at this post, i have mentioned all here...
    http://forum.java.sun.com/thread.jspa?messageID=3073027&#3073027
    is it possible to display as i desired?
    wht the audio stream has? is it frequency or pitch?...
    pls do give me some tips on that...
    thanx in advance
    -Munas.

  • Capture Audio from Mic

    I am new to Java and need to know where to start with developing a Java app that can capture audio from a pc's mic, convert it to mp3, name the audio, and store it in a directory of my choosing. Additionally, I'll need an interface to that audio app that can receive function calls and args from a windows-based application.
    Can you point me in the right direction- sample code if possible.
    Thanks,
    Jeff

    I have the same problem. There doesn't seem to be any sample code for capturing an audio recording with JMF! I have browsed the web, the usenet groups and the (physical) library. It's almost like they try to keep it secret :/
    There is plenty of information on how to use the JMF player, though.

  • Capturing audio from telephone for use in FCP

    My requirement is quite specific, and so far none of previous posts seem to answer my question. So...
    I'm looking to capture audio from my telephone for use in FCP. It won't be a telephone conversation, but a voice text. In other words, an SMS sent to a landline. The audio is saved as a voice message on the answer machine. My phone / answer machine is fairly basic - it has a speaker and the only ports it has is for power and the telephone line itself. I have tried a very basic method of playing the message on speaker and capturing it on a mini DV - but that results in too much audio edit to get it to sound acceptable. My Mac is a G5 and I have the full FC studio, but just not sure of best way to get audio onto the Mac without losing too much of the sound quality.
    Any suggestions?
    Many thanks all...
    Kirsten
    iMac G5    
    iMac G5    

    you need a telephone audio interface like the products made by the fine folks at gentner, telos or jk audio. i have a celltap from jk audio, works very very well. http://www.jkaudio.com/celltap.htm

  • Using Flex to capture audio from Flash

    Hi!
    I've been trying for a while to figure out how to capture audio from a flash-application (http://www.delorean.se/mixer)
    and store it as a mp3-file.
    Since I've studied Java for 2 years I thought I'd try and use it to capture the audio but I'm running into problems all the time,
    and I've been advised to look up Flex by other Java users.
    So, I got some questions:
    Is Flex a good tool to use to capture audio from flash-applications and store the audio as a mp3-file?
    Is Flex hard to learn (I've been working with Eclipse for a long time so the IDE shouldn't be a problem and learning another language/framework is always nice)
    Any tips in general?
    Any answers would make me very happy!
    Thanks!

    physical are closed : how will it managed the queues and overspill queues when target is not present? Also the data dictionary must reflect the primary but If you run capture, then you introduce rules that are not on primary: How ?

  • Capture audio from MIC and decode bitsream

    Hi, I am new to windows phone 8.1. I want to capture audio from the MIC using MediaCapture, first I can capture to the audio using recordToSorageFileAsync but I cannot capture it to just to a memory steam, how is this done? Also after it is captured either
    way the recorded data needs to be broken up into a byte array, so that I can bit decode, i.e. I need to determine what is a high and what is a low, the audio is Manchester encoded given a 1 = 25mSec on 25mSec off and a zero = 25mSec off 25mSec on, how can
    I decode the audio to find out this pattern, the audio pattern will have a fixed preamble of FF followed by the data.

    StartRecordToStreamAsync
    method provide the possibility to save to memory stream.

  • How to record video or use screen capture WHILE capturing audio from Logic??

    Hi,
    I want to record my self playing guitar and singing using my mac book pro built in camera. I want the audio to come from Logic so I can add whatever effects I want to the vocals. When I say audio from Logic I don't mean recording in Logic and adding it in post. I want it to be on the fly.
    What I used to do was use the screen capturing program Snapz Pro. I would screen capture a box around photobooth for the video, and then record while having Logic's audio in the background. It screen captures my entire computers audio. So for example if I get an aim message the bleep would show up in the recording. Or if I raise the volume or lower it the little click sound fx would be in it as well.
    Capturing the audio this way let me get Logic's audio effects in my video on the fly. It worked out great....until now! :/
    I just got the audio interface "Duet 2". And am using a microphone instead of my mbp's built in one. When ever I tried to record and capture my systems audio - my entire computer would crash. Snapz Pro won't work with the system audio with the interface. It works fine without it though.
    I then tried to use Quicktime's new movie recording feature. I see it only gives an option for microphone and now system audio. So I got soundflower to re route the audio but that doesn't help either. This is because when you capture this way you can't hear anything while your capturing. So if I were to record a video and wanted Logics audio in it, I would have to set the output to Soundflower first. So when I record I cant hear myself which defeats the purpose.
    So my final question is, how can I record video while having Logic's audio? I don't need to record with the mic, because in Logic the mic audio is going thru the system audio with everything else.
    I would like to use a process more similiar to Quicktimes straight movie recording instead of doing an odd way like I used to screen capturing a box around the photobooth screen.
    Thanks

    use Yawcam from Yawcam.com

  • Using JMF to capture audio from a JAR

    Hi
    I have a working application that captures audio and does some other stuff with it. The problem occurs when I export it as a JAR file - it can't find any capture devices. I have deduced that the reason for this is that it can't find the jmf.properties file that's in the lib folder along with jmf.jar. So, is there a way that I can make it find the jmf.properties file? I've tried putting it in the manifest and including it in the JAR itself but unsurprisingly that didn't help.
    Thanks in advance...
    Rob

    You can't use iDVD for that, but if you're willing to jump through a number of hoops, search the forum for threads about editing DVDs. Once you have ripped and converted the video file, you can extract the audio from that with iMovie (if you converted it into a DV Stream file).
    John

  • Capture Audio from Line-In or Mic (no CaptureDevice)

    Hi,
    I'm trying to capture Audio Data from my SoundCard, but I don't know how to find the correct CaptureDevice (or even ANY CaptureDevice...)
    I'm using JMF 2.1.1 (all-java) this is my test code:
         public static void main(String[] args) {
              try {
                   //Fallback error sound
                   MediaLocator errorSound = new MediaLocator(new File("error.wav").toURL());
                   //Find Capture Device
                   Format captureFormat = new AudioFormat(AudioFormat.LINEAR, 44100, 16, 2);
                   boolean capDevFound = false;
                   CaptureDeviceInfo di = null;
                   Vector deviceList = CaptureDeviceManager.getDeviceList(captureFormat);
                   if (deviceList.size() > 0) {
                        System.out.println("- devices -");
                        for (int i=0; i<deviceList.size(); i++) {
                             di = (CaptureDeviceInfo)deviceList.get(i);
                             System.out.println(di.getName());
                        di = (CaptureDeviceInfo)deviceList.firstElement();
                        capDevFound = true;
                   } else {
                        System.out.println("No Capture Device found");
                   //Playback captured audio or error sound
                   MediaLocator ml = capDevFound
                                         ? di.getLocator()
                                         : errorSound;
                   DataSource ds = Manager.createDataSource(ml);
                   Player pl = Manager.createPlayer(ds);
                   ControllerState playerState = new ControllerState();
                   playerState.exitOnEOM = true;
                   //The Realizer class implements the blocking realize and prefetching I found in the tutorials...
                   Realizer realizer = new Realizer(playerState);
                   pl.addControllerListener(realizer);
                   realizer.realizePlayer(pl);
                   realizer.prefetchPlayer(pl);
                   System.out.println("- start -");
                   pl.start();
              } catch (Exception e) {
                   e.printStackTrace();
         }I always get a "no capture device found" and hear my error sound!
    Could a wrong Format in getDeviceList(..) be the reason for this? Or should I better use a native version of JMF instead of the pure java one?
    Any Hints?
    Thanks in advance,
    lupo

    From the JMF javaDocs for CaptureDeviceManager
    public static java.util.Vector getDeviceList(Format format)Gets a list of CaptureDeviceInfo objects that correspond to devices that can capture data in the specified Format. If no Format is specified, this method returns a list of CaptureDeviceInfo objects for all of the available capture devices
    So
    CaptureDeviceManager.getDeviceList(null);
    will return ALL available capture devices - this is as described in SUN code examples & does indeed work
    re
    javax.media.format.AudioFormat
    does not provide a parameterless constructor
    OOPS sorry - didn't check before posting

  • Unable to capture audio from BlackMagic HD Extreme via Voice Over tool

    Hi !
    I'm trying to capture audio via my BlackMagic HD Extrem card using the Voice Over tool in FCP6, but I can't, no audio is incoming.
    I can ingest audio with video using log and capture, then I know my card and my cables are working.
    I tried to set the BM card as audio input in my Audio's System Prefereces Pane, but it isn't working either.
    I've been looking on the BM website, but I found nothing.
    Can you help me ?
    Thx

    Thanks for the reply.
    Looking at system preferences I found that audio input was set microphone. Don't know how it happened. I switched it to DeckLink and now FCP displays 16 input channels in Log and Capture dialog. I didn't try to capture yet but I think it solved the problem, because before I had only two channels displyed.

  • Capturing audio from avi file

    I want to capture just the audio from avi file. Here is what I did. I dragged the avi into garage band and saw a separate audio and video track. I tried to import the just the audio into itunes but it would only let me import both video and audio. I decided to burn the audio to cd and then import it into itunes. This seemed to work but I would like to know if there is a better method. I figure there must be. Anybody out there tried this?

    i'm not near my GB machine to test this, but see if you can Share to Disk and make sure the Compress checkBox is not selected.

Maybe you are looking for

  • [SOLVED] Puzzled: Web site visible on network but not outside network

    Edit: Ok, nevermind . . . somehow the problem has resolved itself. Perhaps my ISP was having a bad hair day or something. I'm puzzled by this small problem I'm having. It is NOT a critical problem or anything, just something I'd like to solve. I've i

  • How is Last Played calculated?

    A song has to play right through before Date Played is changed (I know this because I've watched it happen). However, a little while ago I put a song on pause right at the start in order to watch TV. When I came back to it, the song was still on paus

  • How to monitor DROP USER

    Hi Guys, Would anybody suggest me how to monitor the DROP USER command? OS: AIX, Oracle: 11.2.0.2 CSM

  • Failed Run Task Sequence Error (0x80070570)

    Hi, I Have problem with deployment windows vista enterprise: Failed to Run Task Sequence An error occurred while starting the task sequence (0x80070570).For More information, please contact your system administrator or helpdesk operator. It's possibl

  • Automatic Importing from iPhoto videos - scan function?

    Hi, This is in continuation of another thread: (http://docs.info.apple.com/article.html?path=iMovie/7.0/en/11497.html) When I first launched iMovie i was asked to import all movies from iPhoto. Which was great because why create another instance of t