Re: how can record video+audio on j2me and java also?

You can capture video similar to the way you capture audio or images.
Player p = Manager.createPlayer("capture://video");After you have the player you can get the RecordControl and VideoControl
recordControl = (RecordControl) p.getControl("RecordControl");
videoControl = (VideoControl) (p.getControl("VideoControl"));You can get the content type from the record control. Use rc.startRecord(); to begin the record process.
There are some steps you will need to fill in, such as prefetching, setting the display location, etc. The snippets above should be enough for you to start your research though.

You can capture video similar to the way you capture audio or images.
Player p = Manager.createPlayer("capture://video");After you have the player you can get the RecordControl and VideoControl
recordControl = (RecordControl) p.getControl("RecordControl");
videoControl = (VideoControl) (p.getControl("VideoControl"));You can get the content type from the record control. Use rc.startRecord(); to begin the record process.
There are some steps you will need to fill in, such as prefetching, setting the display location, etc. The snippets above should be enough for you to start your research though.

Similar Messages

  • How to record an audio using j2me

    hello i'm new to this.
    i have some sample code to record audio in wireless toolkit
    but i got error in "setOutputStream()"
    this is my code.any one help me....................
    code :-
    ====
    try
    // create the Player object using amr encoding
    p = Manager.createPlayer("capture://audio?encoding=pcm");
    p.realize();
    // get the RecordControl over this Player
    RecordControl rc = (RecordControl)p.getControl("RecordControl");
    // create an OutputStream which the RecordControl will use
    // to write write the recorded data.
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    rc.setRecordStream(output);
    // start the recording
    rc.startRecord();
    p.start();
    messageItem.setText("recording...");
    Thread.currentThread().sleep(5000); // record for 5 seconds
    messageItem.setText("done!");
    rc.commit();
    // save the recordedData in a byte array
    recordedSoundArray = output.toByteArray();
    // close the player
    p.close();
    } //try
    catch (IOException ioe)
    errorItem.setLabel("Error");
    errorItem.setText(ioe.toString());
    catch (MediaException me)
    errorItem.setLabel("Error");
    errorItem.setText(me.toString());
    catch (InterruptedException ie)
    errorItem.setLabel("Error");
    errorItem.setText(ie.toString());
    }//if

    hai all,
    im new here ..i have problem in recording audio using j2me..my code is as below
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.media.control.RecordControl;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    public class recordMidlet extends MIDlet implements CommandListener
    private Form init = new Form("info");
    private Command rec = new Command("rec",Command.OK, 1),
    stop = new Command("stop",Command.STOP, 0),
    exit = new Command("exit",Command.EXIT, 0);
    private byte[] recordedSoundArray;
    private Player p;
    private RecordControl rc;
    private ByteArrayOutputStream output;
    public void startApp()
    init.addCommand(rec);
    init.addCommand(stop);
    //init.addCommand(exit);
    init.setCommandListener(this);
    Display.getDisplay(this).setCurrent(init);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command com, Displayable dis)
    if(com == exit)
    notifyDestroyed();
    else if(com == stop)
    init.removeCommand(stop);
    init.addCommand(exit);
    try
    init.append("finish record... starting playback\n\n");
    rc.stopRecord();
    rc.commit();
    p.stop();
    p.close();
    init.append("playing...\n");
    recordedSoundArray = output.toByteArray();
    init.append("recorded sound = " +String.valueOf(recordedSoundArray.length)+"\n\n");
    ByteArrayInputStream recordedInputStream = new ByteArrayInputStream(recordedSoundArray);
    Player p2 = Manager.createPlayer(recordedInputStream,"audio/x-wav");
    p2.prefetch();
    p2.start();
    //init.append("finish playing...");
    catch (Exception e) {
    init.append("stop command: "+e.toString());
    else if(com == rec) {
    try {
    init.append("record voice ...\n\n");
    // Create a Player that captures live audio.
    p = Manager.createPlayer("capture://audio?encoding=pcm&rate=8000&bits=16");
    p.realize();
    // Get the RecordControl, set the record stream,
    rc = (RecordControl)p.getControl("RecordControl");
    output = new ByteArrayOutputStream();
    rc.setRecordStream(output);
    rc.startRecord();
    p.start();
    } catch (Exception ioe)
    init.append(ioe.toString());
    i get error from ktoolbar window..
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.
    Emulator is not working after that..and it jus shows text
    " RecordMidlet wants to record an audio clip.is it ok to record? then the emulator hangs..
    could someone help me to solve this problem..is there any setting problems in j2me wireless toolkit ?
    im using J2me wireless toolkit 2.5 for CLDC beta 2 .
    thanks to all.

  • How can I burn Audio-CD's and .cue files on my iMac.

    Since a few months I stepped over from Windows to iMac, I am satisfied I did that, but now I am at a point that I regret it !!
    I tried for the first time to burn an Audio-CD on my mac, first with the help of the programs BURN and SimplyBurn, but I did not succeed to get a Audio CD that also worked on my Stereo set. Also trying to burn a .cue file was a dissaster.
    I also tried Finder and iTunes, well the with Finder burned CD did not play on my Stereo, iTunes did not burn my music, maybe because it was not downloaded from iTunes, because the burn entry was not in the menu bar.
    I also went to an help desk, but the gave me some unclear answers.
    So you can imagine I'm very disapointed, not succeding to burn a simple CD or .cue file, right now I'm happy I did not get rid of my Windows machine.
    Please a solution for this "problem" and what kind of burn programs can you advise I should use, and that I stay in the Apple communtiy and not go back to Windows ??
    JMGD.

    Thanks for your answer. But I tried to burn an image with the program BURN yesterday, without succes. The file I tried to burn was a 350MB big file to a CD, BURN told me the file was 1.5TB big !!!! and did not burn it.
    I burned it on my Windows machine with NERO and that worked ! 
    Also today Itried to burn a normal Mp3 album to disk with BURN, without result, I got an answer from BURN telling me "One of the volumes on this medium is still in use" not nowing what this means !!
    JMGD

  • Brutal error message OSStatus error 2003332927 Can not record video/audio

    I have QT pro 7.6 and since a couple of weeks ago, I have been unable to record video or audio.
    Any Ideas what this error code means and how I can fix it?
    thanks everyone!

    Hi there.
    After further testing I have found that the reason I was receiving the Brutal Error, was because of my DigiDesign Core Audio Driver.
    If I am using the MBox, and Digi Core Audio, (i.e Mbox I/O is active) Quicktime Pro will not record video/Audio.
    If however I switch back to the Mac audio out (disconnect the MBox), Quicktime Pro works fine.
    I havent had time to "fix" the problem in the Digi Core Audio, but this was the source of my Brutal Error Code.
    Hope this helps.
    Audio-slave

  • How can I get audio to play from my TV when using hdmi cable?  Video looks great, just no sound.

    How can I get audio to play from my TV when using hdmi cable?  Video looks great, just no sound.
    I've tried plugging the hdmi into the TV directly and the receiver.
    I get video every time.  HBO to Go , Xfinity, ABC, Youtube, etc...
    just no audio.  Any suggestions? 
    I've tried starting the apps then plugging in the hdmi cable.
    I never tried this before I upgraded to IOS 5.

    Claudiamil-
    I had not tried it with mine since upgrading to iOS 5, so I just did.  I'm using a small Vizio HDTV.  I did not try YouTube, but did try several videos and musical numbers.  In all cases there was sound, including stereo when the source had it.
    I assume you are getting sound from the iPad when the adapter is not connected, so the volume is not turned down.  Dah*veed's suggestion to reset may be what you need.
    Fred

  • How can you rip audio from video

    How can you rip audio from a video using Itunes 11.1?  I am using a pc win 8

    Possible in iMovie 08 with a lot of tinkering. Easy in iMovie 9 and iMovie 11 with drag and drop.
    See [Aaron's blog post for how to do it in iMovie 08|http://imovie08.blogspot.com/2007/08/how-to-extract-audio-from-clip.html]

  • How can i use audio through hdmi on mac book pro i have video no audio version10.6.8

    how can i use audio through hdmi on mac book pro i have video no audio version 10.6.8 in audio it just has internal speaker options

    Hello,
    Open Audio Midi Setup in Applications>Utilities, see the input & output options & KHz setting there.

  • HT4437 how  can i stream audio to ipad from video playing on the apple tv using air play?

    how  can i stream audio to ipad from video playing on the apple tv using air play?

    I don't know what AppleTV can handle as far as bit rate is concerned, but increase the bit rate as high as it will let you. You are taking DV which is 25Mb/s and compressing it. If you're making an H.264, you should get great results needing no more than 6Mb/s. Bear in mind, the higher the bit rate, the larger the file size.

  • Can someone tell me step by step how to record from audio tape to mac book with the help of xitel import deluxe

    Can someone tell me step by step how to record from audio tape to mac book with the help of xitel inport deluxe system.  Somebody had mentioned that we do not have to download the software - so I did not, but the computer does not recognize the connection.  How can I know it is connected - can someone please tell me step by step as teaching a layman.  Thanks.

    It seems this question is best posed to the makers of "xitel".
    I looked up A product and it is out for Windows but does not mention Mac OS X:
    http://www.xitel.com/USA/prod_inportpro.htm

  • How do you record video with usb mic and have the audio from garageband be the sound when recording and not just your normal voice but garage band effects for youtube?

    How do you record video with usb mic and have the audio form garageband be apart of the video when recording, meaning the audio from garageband and echo  and not just your normal voice for youtube post?its not add the garageband audio its just normal voice from mic no  effects is going thru?

    Hi Life93,
    What you describe would be possible by recording your video, then removing the audio from it and adding audio from GarageBand once the video is in iMovie (I presume here that you are using iMovie for your video production. Other applications may need different methods.)
    See this thread on how to remove the audio from a clip in iMovie -
    Is there a way to separate audio from a video c...
    https://discussions.apple.com/thread/1779767
    To add audio from GarageBand use this article -
    iMovie '11: Add a sound clip to your project
    http://support.apple.com/kb/PH2255
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • How can record audio locally in air ?

    How can record audio locally in air ?
    who can tell me~? thanks~!

    Use 3 persons to help you start the Memo app.

  • How can iPhone videos sent to another iPhone be made clear like they were recorded even though it sent as a text. with iMessage it's clear but when it's not available the quality *****, how can I make a received vid clear again??? help

    how can iPhone videos sent to another iPhone be made clear like they were recorded even though it sent as a text. with iMessage it's clear but when it's not available the quality *****, how can I make a received vid clear again??? help

    This is determined by your carrier. SMS/MMS is a poor man's email and by that I mean SMS/MMS has major restrictions and limitations compared to email but is a cash cow for cell phone carriers.
    Upload the video to YouTube when connected via wifi and send the YouTube link via text.

  • Recording video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http.

    As titled, what is the way to record video/audio files using Flash Meida Server through rmtp, and allow users to access the recorded files through http?
    What I am trying to do, is to record a user's microphone's input and save it to the server. Afterwards, I would like other users to be able to access the recorded files and mainuplating the audio data, by computeSpectrum(), to do some visualization of the audio. As I know computeSpectrum() cannot work on streaming files, so I think I need to access the recorded files using http instead of rmtp. Is that true?
    How can I redirect the http request to the files I was recorded into my applications/appName folder? Or I need to somehow moved the recorded files to the /webroot folder?
    Thanks!

    I probably have asked a stupid question.
    My recorded streams are still saved in the applications/appName/streams folder.
    And I redirect the www.mydomain.com/streams to point to the applications/appName/streams folder.
    And the rmtp recorded streams are abled to connect through http now.

  • How i can insert videos, export to pdf and then watch the video? i can't

    How i can insert videos, export to pdf and then watch the video? i can't. It is suposse that i have to configurate the option save but i don't know how... any help?

    Fron the Pages Help menu:
    Using Sound and Movies
    You can add audio—a music file, a playlist from your iTunes library, or any other sound file—to a Pages document. You can add video that plays within a page.
    Pages accepts any QuickTime or iTunes file type, including the following:
    MOV
    MP3
    MPEG-4
    AIFF
    AAC
    Also note that some media files are protected under copyright law. Some downloaded music may be played only on the computer where the download occurred. Make sure the computer you are using has permission to play all the media files included in your document.
    When you add media files to your document, make sure that they will be available if you transfer your document to another computer. When saving your document, make sure the option “Copy audio and movies into document” is selected in the Save window. (If you don’t see the option, click the button next to the Save field to display the entire Save window, and then click the Advanced Options disclosure triangle.)

  • How can I separate audio and clips?

    How can I separate audio and clips?

    I guess you mean "audio and video clips".
    Then select the clip including both audio and video (while in the timeline) and press cmd-L: this unlinks the stereo pair from its video. If you want to work on each audio channel separately press alt-L while the stereo pair is selected.
    Piero

Maybe you are looking for

  • Unable to open files

    When I attampt to open a file in Bridge or from File\Open in Photoshop CC I get the following message. Windows cannot find C:\program files (86) Adobe\ Adobe Photoshop CS3\Photoshop.exe. I uninstalled CS3 and my CS5 update a couple of months ago. Thi

  • Mini Player Won't Stap Open In All Spaces

    How do I keep itunes mini player open in all spaaces?  Checking "keep player on top of all windows" doesn't seem to do it.  Haven't found another way to do this since upgrading to Lion 7.2.

  • Asking for host string

    Hi, I have downloaded the Oracle 9i personal edition on a Windows98 system. When I am trying to run the sqlplus.exe file, it asks me for User ID,Passww, Host string. What host string am I supposed to give? Its a standalone application that I want to

  • Can't uninstall existing quicktime

    I was downloading the iTunes update and it crashed half way through the install and now I can't delete quicktime as it says it's no longer on my computer. However, I can't install quicktime or iTunes now because it says files are missing and that the

  • Generation of Work Schedule Rule in Production Client

    Dear All, Is it Possible and Advisable to Generate Work Schedule Rule in the Production Server. Thanks & Regards, Punam Jha