Graphic control  of audio using JMF

hi all
I want to know that when we capture audio using JMF then can we show some
visual control of it like any graphics sort of thing .
Is it possible in JMF ?
thanx in advance
take care
bye

hi
how r u??
Yeah i am looking for volume meter as well as a graphic control on my panel
to show that recording is goin on
can u help me out i ma also facing a prob in audio capturing
I am trying to save file as .wav .well I got the file and when i open it in notepad i
can see the WAV tag as well as some encrypted characters ..but when I try to play it nothing is there
What could be the problem??
Plz help me out
thanx in advance
Bye

Similar Messages

  • Capturing audio using jmf from web start

    Hi everybody,
    Currently im working on a project related with audio capturing in client side. Clients will access the application from web start. jmf will be used to capture audio. Additionally, i dont want users to install jmf.
    At first, for testing purposes i wrote a small and simple program that only captures audio and plays it again. It works fine as a standalone application. However, it did not work if i deploy the same program on the web start, doing all required configurations carefully for web start deployment.
    I found the problem is that required capture devices could not be detected when the program is run from web start.
    I searched forums and internet and made some trials to solve and idendify the problem. i want to share you the results:
    At first , i installed jmf to my machine, some jars (jmf.jar, sound.jar,...) and a jmf.properties file are extracted to a directory in my machine. Then, after copying jmf.jar and jmf.properties file to some folder, i uninstalled jmf. Then i created a simple project for testing purposes that captures audio and plays it back.i created this project from eclipse IDE and and set its classbath to the folder which contains only jmf.jar and jmf.properties. It runs successfully. However, if i remove jmf.properties from this file, project does not run, no device can be found. I strongly think, this means that, this jmf.properties file is necessary to detect any audio capture device and hence to run any jmf program that captures auido.
    If i deployed the same project from web start, it did not work as i mentioned, since no audio device can be found because of the lack of jmf.properties file. However, if i install jmf again, since the jmf.properties is created, the project runs from web start too. The interesting thing is that, if i uninstall jmf
    but only create the directory that only contains jmf.properties again, project still runs from web start. If i remove this file from that directory projects does not run again.
    It seems that, this jmf.properties file is impornt for detecting audio capturer devices. It is created in the phase of jmf installation by jmfregistry or jmfinit and is unique for the machine.
    Finally, i conclude that in order to run any project that captures auido from web start without installing jmf, a jmf.properties file should be created for each client machine automatically (in a silent way) before execution which means that jmfregistry or jmfinit should be run silently before execution to create this jmf.properties. Is there anybody that knows antying to  achieve this ?
    Any suggestions about the topic rather than the answer to the specific question above will also be appreciated greatly. Thanks a lot in advance.

    Hi
    I am working on a similar requirement. Please let me know if you have a solution.
    Thanks in advance.

  • Streaming Audio using JMF

    I am trying to create a application that uses streaming audio and would be an internet radio with a server that will stream songs and a client that can listen to the stream. How can I stream audio, specifically mp3 files, using the JMF?

    I am in a similar project.
    I found JMF does not provide enough support for stream.
    I can't split a stream into some packets and transfer them to another peer.

  • Can you control background audio with native IOS buttons?

    I have background audio working but would like to control the audio using the native buttons. Is this possible with Air 3.3?
    Not important but.. is airplay possible?

    Sorry but Airplay is currently not supported in AIR.

  • Javafx use jmf and capture audio device

    Hello, I noticed a problem with the use JavaFX and Java Media Framework (JMF), in a project javafx call Java classes using JMF, but are not recognized PC audio devices, in fact when I executed 's the code CaptureDeviceManager.getDeviceList (null), displays the error: "could not commit protocolPRefixList", without recognizing any audio device. Instead I call if my application using JMF, outside of a JavaFX project, the devices are found and everything works properly, perhaps this problem depends on the security settings of JavaFX, or inability to use JavaFX is that jmf interfaces with audio and video devices?
    thanks for the help

    I'd use jmf and javafx but it was not for capture devices.
    If you use jmf there are native libraries.
    The thing i found was about the java.library.path wich is overriden when you start javafx that jmf can't load approriate libs.
    Try to compare the System.getProperties for java and javafx then you should find where is the problem.

  • Not able to recognize any video/audio devices using jmf and java soun

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

  • URGENT- problem in detecting audio device using  JMF in  WIndows7 - 64 bit

    Hi,
    I am trying to detect the audio device in windows 7 -64 bit OS, using JMF API with JRE 1.6.18.But it showing zero device found.below i have mentioned the source code that i have used.please suggest how to solve this , thanks in advance.
    import java.util.ArrayList;
    import java.util.Vector;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    public class CaptureDeviceFinder {
    //possible audio formats available
    static String audioformats[] = {
    AudioFormat.LINEAR };
    static ArrayList available_audiolist= new ArrayList();
    public static void main(String[] args) {
    findAudioDevices();
    }//main
    public static void findAudioDevices() {
    / Audio capture devices /
    System.out.println("CAPTURE AUDIO FORMATS:");
    for (String format : audioformats) {
    System.out.println("format is :"format);
    Vector<CaptureDeviceInfo> devices = CaptureDeviceManager
    .getDeviceList(new AudioFormat(format));
    System.out.println("devices is"+devices);
    for (CaptureDeviceInfo device : devices) {
    if (!devices.isEmpty()) {
    System.out.println("\tFormat: " format);
    System.out.println("\t\t" device.getName());
    available_audiolist.add(format"|"+device.getName());
    System.out.println("list is :"+available_audiolist);
    Edited by: Saravana4u on Mar 17, 2010 10:39 AM

    almightywiz wrote:
    Well, I don't know if the JMF Studio works on a 64-bit system, but the base java libraries work just as well as on a 32-bit system. I currently use both Windows 7 64-bit and 32-bit version, and I am able to recognize all of my audio input devices.JMF wraps around and makes use of a bunch of native interfaces, all of which are precompiled for 32-bit systems. As such, anything relying upon those 32-bit libraries will not work, and that cuts the functionality down to, essentially, the cross-platform pack stuff.
    JMF's sound infastructure is mostly a wrapper around JavaSound, so as long as JavaSound is working on the JRE, you'll be able to utilize the audio functionality.
    As for device detection, I know at least some of that is native code. I'm not 100% sure, but I'd almost expect the Windows performance pack to never return any devices on a 64-bit system, but the cross-platform back to return audio devices. This is an assumption, but, that's what I would expect.
    In any case, if you're using the Windows performance pack, you'd most likely get better results by switching to the cross-platform pack.

  • How to render audio with sample rate 48000hz using jmf

    hi,
    In my application i need to play the audio with jmf player with sampling rate 48000hz. but i found that jmf player plays the audio with sampling rate of 44100hz only.but my application needs to play the audio with sampling rate of 48000hz .please help me how to do this using jmf .
    thanks in advance,

    hi,
    In my application i need to play the audio with jmf player with sampling rate 48000hz. but i found that jmf player plays the audio with sampling rate of 44100hz only.but my application needs to play the audio with sampling rate of 48000hz .please help me how to do this using jmf .
    thanks in advance,

  • Source code for audio- video conferencing using JMF

    i am doing a project on VIDEO CONFERNCING using JMF. i am using the HP WEBCAM of my laptop. guys i desperately need help. plz give me the code if any of has it.plz plz its urgent

    i am doing a project on VIDEO CONFERNCING using JMF. i am using the HP WEBCAM of my laptop. guys i desperately need help. plz give me the code if any of has it.plz plz its urgentYou can't get the code for the whole application.....
    but you can get plenty of code to get started on making your own video conf. application using JMF here .
    Also, there is a [JMF Forum|http://forums.sun.com/forum.jspa?forumID=28] here. If you face any problems while coding, you can post your queries there.
    Thanks!

  • How to send video and audio (videoconference) using JMF without using RTP

    Hi everyone,
    I am creating an application using JMF, a videoconference, but I would like to transmit the packets by myself without using RTP. I would have a socket (or virtual Serial Port -- > Bluetooth) and I would send the info that way. Is it possible??
    Thanks in advance!!
    Cheers

    Yeah, you'd need to implement something like this for that.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/RTPConnector.html]

  • Playing a wav file (byte array) using JMF

    Hi,
    I want to play a wav file in form of a byte array using JMF. I have 2 classes, MyDataSource and MyPullBufferStream. MyDataSource class is inherited from PullStreamDataSource, and MyPullBufferStream is derived from PullBufferStream. When I run the following piece of code, I got an error saying "EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c9108b2, pid=3800, tid=1111". Any idea what might be the problem? Thanks.
    File file = new File(filename);
    byte[] data = FileUtils.readFileToByteArray(file);
    MyDataSource ds = new MyDataSource(data);
    ds.connect();
    try
        player = Manager.createPlayer(ds);
    catch (NoPlayerException e)
        e.printStackTrace();
    if (player != null)
         this.filename = filename;
         JMFrame jmframe = new JMFrame(player, filename);
        desktop.add(jmframe);
    import java.io.IOException;
    import javax.media.Time;
    import javax.media.protocol.PullBufferDataSource;
    import javax.media.protocol.PullBufferStream;
    public class MyDataSource extends PullBufferDataSource
        protected Object[] controls = new Object[0];
        protected boolean started = false;
        protected String contentType = "raw";
        protected boolean connected = false;
        protected Time duration = DURATION_UNKNOWN;
        protected PullBufferStream[] streams = null;
        protected PullBufferStream stream = null;
        protected final byte[] data;
        public MyDataSource(final byte[] data)
            this.data = data;
        public String getContentType()
            if (!connected)
                System.err.println("Error: DataSource not connected");
                return null;
            return contentType;
        public void connect() throws IOException
            if (connected)
                return;
            stream = new MyPullBufferStream(data);
            streams = new MyPullBufferStream[1];
            streams[0] = this.stream;
            connected = true;
        public void disconnect()
            try
                if (started)
                    stop();
            catch (IOException e)
            connected = false;
        public void start() throws IOException
            // we need to throw error if connect() has not been called
            if (!connected)
                throw new java.lang.Error(
                        "DataSource must be connected before it can be started");
            if (started)
                return;
            started = true;
        public void stop() throws IOException
            if (!connected || !started)
                return;
            started = false;
        public Object[] getControls()
            return controls;
        public Object getControl(String controlType)
            try
                Class cls = Class.forName(controlType);
                Object cs[] = getControls();
                for (int i = 0; i < cs.length; i++)
                    if (cls.isInstance(cs))
    return cs[i];
    return null;
    catch (Exception e)
    // no such controlType or such control
    return null;
    public Time getDuration()
    return duration;
    public PullBufferStream[] getStreams()
    if (streams == null)
    streams = new MyPullBufferStream[1];
    stream = streams[0] = new MyPullBufferStream(data);
    return streams;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.media.Buffer;
    import javax.media.Control;
    import javax.media.Format;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullBufferStream;
    public class MyPullBufferStream implements PullBufferStream
    private static final int BLOCK_SIZE = 500;
    protected final ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW);
    protected AudioFormat audioFormat = new AudioFormat(AudioFormat.GSM_MS, 8000.0, 8, 1,
    Format.NOT_SPECIFIED, AudioFormat.SIGNED, 8, Format.NOT_SPECIFIED,
    Format.byteArray);
    private int seqNo = 0;
    private final byte[] data;
    private final ByteArrayInputStream bais;
    protected Control[] controls = new Control[0];
    public MyPullBufferStream(final byte[] data)
    this.data = data;
    bais = new ByteArrayInputStream(data);
    public Format getFormat()
    return audioFormat;
    public void read(Buffer buffer) throws IOException
    synchronized (this)
    Object outdata = buffer.getData();
    if (outdata == null || !(outdata.getClass() == Format.byteArray)
    || ((byte[]) outdata).length < BLOCK_SIZE)
    outdata = new byte[BLOCK_SIZE];
    buffer.setData(outdata);
    byte[] data = (byte[])buffer.getData();
    int bytes = bais.read(data);
    buffer.setData(data);
    buffer.setFormat(audioFormat);
    buffer.setTimeStamp(System.currentTimeMillis());
    buffer.setSequenceNumber(seqNo);
    buffer.setLength(BLOCK_SIZE);
    buffer.setFlags(0);
    buffer.setHeader(null);
    seqNo++;
    public boolean willReadBlock()
    return bais.available() > 0;
    public boolean endOfStream()
    return willReadBlock();
    public ContentDescriptor getContentDescriptor()
    return cd;
    public long getContentLength()
    return (long)data.length;
    public Object getControl(String controlType)
    try
    Class cls = Class.forName(controlType);
    Object cs[] = getControls();
    for (int i = 0; i < cs.length; i++)
    if (cls.isInstance(cs[i]))
    return cs[i];
    return null;
    catch (Exception e)
    // no such controlType or such control
    return null;
    public Object[] getControls()
    return controls;

    Here's some additional information. After making the following changes to MyPullBufferStream class, I can play a wav file with gsm-ms encoding with one issue: the wav file is played many times faster.
    protected AudioFormat audioFormat = new AudioFormat(AudioFormat.GSM, 8000.0, 8, 1,
                Format.NOT_SPECIFIED, AudioFormat.SIGNED, 8, Format.NOT_SPECIFIED,
                Format.byteArray);
    // put the entire byte array into the buffer in one shot instead of
    // giving a portion of it multiple times
    public void read(Buffer buffer) throws IOException
            synchronized (this)
                Object outdata = buffer.getData();
                if (outdata == null || !(outdata.getClass() == Format.byteArray)
                        || ((byte[]) outdata).length < BLOCK_SIZE)
                    outdata = new byte[BLOCK_SIZE];
                    buffer.setData(outdata);
                buffer.setLength(this.data.length);
                buffer.setOffset(0);
                buffer.setFormat(audioFormat);
                buffer.setData(this.data);
                seqNo++;
        }

  • Live Type graphics interfering with audio on playback to output monitor

    New to Mac, so bare with me.
    When I drop live type graphics in timeline and play with the built in audio, plays fine. When I output it to mini dv to record via firewire, and hit play the audio is fine till the timeline marker goes past the end of the graphic, then the audio drops out for a few seconds, then its o.k. again. This happens on every graphic, no exceptions. Now the audio is coming through the NTSC speakers.
    Funny thing though, we I play back the recorded tape, the audio plays fine.
    The audio also plays fine on the built in speakers. Onlu when outputted to firewire to the mini dv.
    This is very annoying.
    Can someone help please?
    Using a LaCie 500 gig firewire drive, via the 800 firewire port.
    Thanks

    Not to be ignorant ha ha.
    How do I mix down the audio? Do you think that if I hit play on the timeline and then hit record on dv, that might work?
    Will give that a shot though!
    Thanks,Jerry
    Gerard

  • How to use jmf convert the rtp packet (captured by jpcap) in to wav file?

    I use the jpcap capture the rtp packets(payload: ITU-T G.711 PCMU ,from voip)
    and now I want to use JMF read those data and convert in to wav file
    How to do this? please help me

    pedrorp wrote:
    Hi Captfoss!
    I fixed it but now I have another problem. My application send me this message:
    Cannot initialize audio renderer with format: LINEAR, Unknown Sample Rate, 16-bit, Mono, LittleEndian, Signed
    Unable to handle format: ALAW/rtp, Unknown Sample Rate, 8-bit, Mono, FrameSize=8 bits
    Failed to prefetch: com.sun.media.PlaybackEngine@1b45ddc
    Error: Unable to prefetch com.sun.media.PlaybackEngine@1b45ddc
    This time the fail is prefetching. I have no idea why this problem is. Could you help me?The system cant play an audio file / stream if it doesn't know the sample rate...somewhere along the way, in your code, the sample rate got lost. Sample rates are highly important, because they tell the system how fast to play the file.
    You need to go look through your code and find where the sample rate information is getting lost...

  • Are plugins able to create graphical controls children to the Acrobat/Reader application?

    Hello,
    in the documentation I read 
      Acrobat Viewer layer 
    The Acrobat Viewer (AV) layer enables plug-ins to control Acrobat and modify its user interface. Using AV methods, you can, for example, add menus and menu commands, add buttons to toolbars, open and close files, display simple dialog boxes, and perform many other application-level tasks.
    I ask if it is possible that a plugin creates a graphical control like others applications can usually do and put it as a legitimate child of the Acrobat/Reader application, for example over a pdf page, and get events and so on.
    Thanks in advance

    Sure.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Wed, 26 Oct 2011 03:33:53 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: are plugins able to create graphical controls children to the Acrobat/Reader application?
    are plugins able to create graphical controls children to the Acrobat/Reader application?
    created by DevAcro<http://forums.adobe.com/people/DevAcro> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3990771#3990771

  • Using JMF to create AVIs

    Hello all, I am new to JMF and I was wondering if anyone could point me in the right direction of using JMF to create AVIs on the fly... I have short [ ] buffers that contain image data, and i need to convert this into an .avi file, but i will not have the buffers all at once, but rather will be passing them one at a time. So i need the avi renderer/writer to be able to handle incremental input of buffers, frame by frame.
    if anyone could give me a hand or tell me where to look, i would be much obliged!
    thanks so much,
    ben

    sheik2311 wrote:
    I must do it in Applet since it should work on the web.Actually, no...if it "should work on the web", it either needs to be an applet (pain in the butt for JMF development) or a WebStart application (not a pain in the button). I'd personally recommend using a web start application to avoid all of the hassles of trying to put JMF in an applet.
    Second, I'm not sure where your sample code came from, but you definately need some more robust sample code to work with...so...in the order you should play with them...
    To show a video in a Swing component
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/SwingJMF.html]
    To transmit audio/video
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVTransmit.html]
    To receive audio/video
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html]
    To save a received video to disk
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/RTPExport.html]
    To show and record video
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html]

Maybe you are looking for

  • What is new in 2004s BEx ?

    Hello team, Can any explain me  the following .. What is new in 2004s BEx query designer ?? Major differences between old BEx and 2004s BEx. What is report designer and why is it used ? ...... Also  material links if possible ... Thanx in Advance ...

  • First generation Ipod shuffle

    I got this shuffle from a friend. I am running OSX 10.4.11 on a 1.25 Gig PowerPC G4. When I plug in the shuffle neither the computer or iTunes will recognize the IPod and I get a continuous flashing green light. I have searched the posts but can't fi

  • I have Mac OS X Snow Leopard 10.6.8; I am trying to install Mac OS X Lion

    I have Mac OS X Snow Leopard professional 10.6.8 update I am trying to install Mac OS X Lion. I get an error message: other users are logged on. I have three accounts: William G Cullen; Guest; williamgcullen. I have tried to delete williamgcullen, bu

  • The collection you specified does not exists or is not registered with the ColdFusion Search Service.

    While upgrading to CF7 from CF5, I am creating the new collections from Cf Admin. After creating, I indexed it from cf admin and then trying to search for the documents in that collection, and i am getting the following error. This was working yester

  • Problem with updating Photoshop CC in Cloud.

    Update failed. Updating Lightroom Worked. Have a Mac and It worked before. Have reinstalled Cloud according to Adobe's suggestion. Still don´t work.