JFM recording and streaming at the same time

Hello Everyone,
I was hoping someone could help me with using a webcam device for sending and recording at the same time.
At this moment I'm only able to record. I tried to make another processor, and put the input of the streaming processor
to the one that is recording, but problem is the streaming processor outputs not a streaming format. If I could stream
with RTP I could embed a player in a website and view from there, while recording at the same time.
Could somebody explain to me what do to here, or provide me a snippet of code, I really need this to work.
I created this code, but this only records.
import java.io.IOException;
import javax.media.*;
import javax.media.format.*;
import javax.media.protocol.*;
public class Record {
     public Processor createProcessor(){
          Format formats[] = new Format[2];
          formats[0] = new AudioFormat(AudioFormat.IMA4);//IMA4
          formats[1] = new VideoFormat(VideoFormat.CINEPAK);//CINEPAK
          FileTypeDescriptor outputType = new FileTypeDescriptor(FileTypeDescriptor.QUICKTIME);
          Processor p = null;
          try {
               p = Manager.createRealizedProcessor(new ProcessorModel(formats,outputType));
               } catch (IOException e) {
                    System.out.println("Error! 1");
               System.exit(-1);
               } catch (NoProcessorException e) {
                    System.out.println("Error! 2");
               System.exit(-1);
               } catch (CannotRealizeException e) {
                    System.out.println("Error! 3");
               System.exit(-1);
          return p;
     public static void main(String [] args) {
          Record record = new Record();
          Processor p = record.createProcessor();
          DataSink sink;
          MediaLocator dest = new MediaLocator("file://newfile.mpeg");
          try{
               sink = Manager.createDataSink(p.getDataOutput(), dest);
               sink.open();
               p.start();
               sink.start();
               try {
               Thread.currentThread().sleep(6000);
               } catch (InterruptedException ie) {
               p.stop();
               p.close();
               Thread.currentThread().sleep(6000);
               sink.close();
          } catch (Exception exception) {
               System.out.println("error!");
          System.out.println("finished");
Kind regards,
Bluesboy89

Take a look at the following example. It demonstrates how to do 2 things with the same input (namely view and record)
[http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JVidCap.html]

Similar Messages

  • How do I record AND monitor at the same time?

    I'm having trouble while trying to record from my XLR connected microphone. I have the mic going through a USB preamp and my speakers are outputting directly through my Power Mac. I cannot seem to be able to record at the same time I monitor. I can't playback my recordings without first changing the audio setting to Built in Audio from Mobile Preamp. I swear I could do this with Logic 7. Can't I have the monitor be going through the computer and the input going through my preamp at the same time? Thanks!
    Appi

    Logic can see two or more audio interfaces at once, but it has to be set up in the Audio midi set up program on your mac, as an aggregate device using your built in audio and your USB device. Then you can choose the aggregate device in your Logic>preferences>audio>driver. After you choose it, you should be able to access all inputs and outputs at once
    Don

  • Recording and listening at the same time?

    So i'm recording using a usb micrphone, which works fine, i'd like to know how to hear all the instruments through my headphones and record at the same time, so i can actually hear when i need to come in to sing! any ideas?

    JanKaratas wrote:
    So i'm recording using a usb micrphone, which works fine, i'd like to know how to hear all the instruments through my headphones and record at the same time
    you're going to have to provide more details on your setup, because that is how GB works.
    you'd have to purposefully mute or solo tracks in order to not hear everything playing in your project

  • Recording Audio and Midi at the same time in Logic 7 Express Can it be done

    I am wondering if I can record audio and midi at the same time in Logic 7 Express. I am running my guitar thrugh a Roland GR 33, and a line out and using the GR 33 to trigger sounds in the Logic's synth section but cant seem to record all three tracks at once. If any one knows how let me know. Oh and I am running the GR Synth and Guitar into the Prosonus Fire Fox and have the GR 33 out midi to the Fire Box as well. So I guss the question is how do I sent up two audo tracks and one midi track to record in real time. Thanks Victor

    I am wondering if I can record audio and midi at the
    same time in Logic 7 Express. I am running my guitar
    thrugh a Roland GR 33, and a line out and using the
    GR 33 to trigger sounds in the Logic's synth section
    but cant seem to record all three tracks at once. If
    any one knows how let me know. Oh and I am running
    the GR Synth and Guitar into the Prosonus Fire Fox
    and have the GR 33 out midi to the Fire Box as well.
    So I guss the question is how do I sent up two audo
    tracks and one midi track to record in real time.
    Thanks Victor
    Try arming the audio tracks, select one of the tracks, then while holding down the shift key, select the midi track you want to record, arming the "r" on the midi track. Press "record".....
    HL

  • Can Express 9 play and record multiple instruments at the same time?

    I have logic express 9 and was told with my interface that I can play and record different instruments at the same time on Express 9. Is this true because I have spent a long time trying to figure out how.

    Hi,
    to record multiple Inputs at a time, open up the appropriate number of audio tracks. Now for each track, select the correct Input in the Channelstrip.
    Now, ARM all these tracks for recording by clicking the little red R in the track header or channelstrip. Now if you hit record, all these tracks should record simultaneously their respective inputs.
    All other existing tracks should playback while recording.
    Fox

  • Recording vocals and guitar at the same time, using the Alesis IO dock!

    Hi there!
    I have an Ipad 2 with the newest OS installed etc. And I rea the other posts in here.
    I bought an IO dock from Alesis the other day and was full of exspectations, but I got a bit disappointed -> Garageband! When I bought the Ipad dock I exspected that I would be able to record (or just play and hear the inputsound from two devices) at the same time in my headphones! But I wasn't... Now I'm wondering if this is going to be fixed in an update or not? I think it would be a shame if this issue isnt adressed, due to the huge abilities the Ipad/garageband/Ipad docks withhold.
    So anyone know anything? I went to my musicstore and spent about an hour or so with the tech dude there trying dfferent setups, but unfortunatly without luck! Just to clarify that I didt just plugged in my guitar and got mad that it wasnt apple intuative!
    Hope someone can help :)

    I am wondering if I can record audio and midi at the
    same time in Logic 7 Express. I am running my guitar
    thrugh a Roland GR 33, and a line out and using the
    GR 33 to trigger sounds in the Logic's synth section
    but cant seem to record all three tracks at once. If
    any one knows how let me know. Oh and I am running
    the GR Synth and Guitar into the Prosonus Fire Fox
    and have the GR 33 out midi to the Fire Box as well.
    So I guss the question is how do I sent up two audo
    tracks and one midi track to record in real time.
    Thanks Victor
    Try arming the audio tracks, select one of the tracks, then while holding down the shift key, select the midi track you want to record, arming the "r" on the midi track. Press "record".....
    HL

  • Can't recording  Midi  and Audio at the same time

    I'm in GREAT need of help. I can't record midi and audio at the same time. I'm using an M AUDIO project mix I/O. I know this is VERY basic stuff but I can't seem to get it to work.I can record multiple audio at once. ANd I can record midi but not at the same time. PLEASE help . Is there a setting somewhere I need to change ? Thanks
    Tracy

    Hi!
    Enable all audio tracks (R) you wish to record. Then make sure you select the audio instrument you are using on the left of the arrange page (track list). If you here your input, hold shift, then highlight (gray) the mentioned audio tracks you wish to record on. When R is red, and the proper tracks are grey, you can record. Hope that made sense!

  • Streaming wifi and bluetooth at the same time is it possible in air play from iPod

    Streaming bluetooth and wifi at the same. Is it possible?

    You are not able to send the music to two different streams, you can use the bluetooth and wireless at the same time but for different tasks.
    The best way I have seen for what you are attempting, is to buy a wired splitter and two bluetooth transmitters, and have each transmitter broadcast bluetooth sound to the two different locations.
    I have not found any other way except when using itunes on a desktop computer which allows the selection of multiple output destinations.

  • If I plug a guitar into iPhone GarageBand using an interface, can I still use the built in microphone to record vocals and guitar at the same time?

    If I plug a guitar into iPhone GarageBand using an interface, can I still use the built in microphone to record vocals and guitar at the same time?

    Hi John,
    I think the only way is to get an iMic...
    http://www.bhphotovideo.com/bnh/controller/home?O=&sku=797644&is=REG&Q=&A=detail s

  • Recording audio and midi at the same time ??

    Is it possible to record audio and midi at the same time in logic?? It doesnt seem to work for me, im assuming there must be unchecked box somewhere that I need to check. thanks,
    Dan

    Daniel,
    You should be able to accomplish this by hitting record on the audio track, and then while holding the "Shift" key down, hitting record on the MIDI track (or visa versa).

  • How to record midi and audio at the same time?

    Hello,
    I have a Roland sh-201 synth and Logic 9. When I use patches from the sh-201, it will record it via audio. What if I wanted to record the audio but also have the midi information as well? How would I be able to accomplish this? My synth is connected via USB which carries both midi and audio. Sorry for my poor english, but any help would be greatly appreciated.
    Thank You.

    Hi
    Logic will record both audio and MIDI at the same time, but you *MUST* have the Software Instrument/MIDI track selected in the Arrange Track List.
    The audio track must be 'Record Ready':
    HTH
    CCT

  • How to stream Webcam and Desktop at the same time?

    Hey Guy,
    I just got a little Problem with  FMLE... I want to stream live during a Game, but I dont know how to stream Desktop and Webcam at the same time ^^. The streaming Platform i want to use is twitch.tv.. the most common Gamin Platform I think...
    I got an IMac i7.
    Pls help me   I dont get how all these ProGamer do it -.-
    Thanks in advance
    Kathi

    You're going to need additional software or hardware.  If you're running a Macintosh, try CamTwist.  It's free and allows you to create virtual "cameras" from just about anything you can see on your computer.  It's a bit clunky getting used to the interfact and how it works, however.
    Hardware solutions (like scanline converters and video switchers) can get pretty expensive.  So you may want to go with a piece of software that can handle on-the-fly video compositing/switching.  There are two applications that come to mind right off the bat -- and lucky for you, both of them can also output to a live streaming server. 
    Wirecast is a popular choice, although the pricing starts around $500.  It's Macintosh/Windows.
    A very popular choice among gamers is XSplit (Windows only) and is a subscription-based model (you pay a small fee by the month, quarter, or year).  XSplit has some very impressive compression happening under the hood, and was originally designed for gamers who wanted to share their desktop, XBOX, or PS3 adventures... all while also being able to lay over banners, PIP (picture-in-picture) of themselves, or anythhing else they wanted to clutter the screen with.
    If you're running on Windows, give XSplit at shot.  It can easily handle your desktop (or most anything else) as a "camera" as well as being able to lay your webcam on top of the desktop feed.

  • MSI MegaPC 651 and two audio streams at the same time

    Running Showshifter Time Shifting playback through 5.1 SPDIF, I get the sound of the live stream and the playback stream at the same time, any ideas on how to fix this?
    Spec:
    MSI MegaPC 651
    P4 2.66GHz
    512Mb DDR 333MHz
    Seagate 120GB 7200rpm 8mb
    LiteOn LDW-401S DVD+RW
    MS8606M TV@nywhere
    Windows XP Home
    Showshifter v2.10.2235

    Hi, I don't know this for a fact, but I suspect Video will, & Audiowill not.

  • Play an rtp stream and save at the same time

    Hello
    How cam i play and save at the same time an rtp stream.
    can anyone help me about this.
    Thanks

    Hello
    How cam i play and save at the same time an rtp stream.
    can anyone help me about this.
    Thanks

  • Can we use both INSERT and UPDATE at the same time in JDBC Receiver

    Hi All,
    I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
    user send the file which contains both new and old record and I need to save those in MS SQL database.
    If the record exist then use UPDATE otherwise use INSERT.
    I looked on sdn but didn't find any blog which perform both the things at the same time.
    Interface Requirement
    FILE -
    > PI -
    > JDBC(INSERT & UPDATE)
    I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
    Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
    Thanks,

    Hi ,
              If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
    "If the record exist then use UPDATE otherwise use INSERT."
    Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ...  where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows  you proceed with "insert into tablename....." since there are no old records present in database.
      Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database.  A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server.   If you need further help on how to write and call stored procedure in MS SQL you can look into these links
    http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
    http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
    [ This part you can ignore, Since its not sure that you will face this situation
        Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
    http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
    http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
    http://www.faqs.org/docs/ppbook/r27479.htm
    http://msdn.microsoft.com/en-US/library/ms187373.aspx
    http://msdn.microsoft.com/en-US/library/ms173763.aspx
    http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
    http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
    http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
        There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
    regards
    Anupam

Maybe you are looking for

  • My hdmi cable is miss detected

    Hi there, First , english is my second language ,so please go easy. Second I've been struggling all day with getting sound on on my . So far, I found out that I needed ATi hdmi audio codec (which i got) here's where I'm stuck.I connected my TV and it

  • Apache - CGI script can't read query string from STDIN

    My Perl CGI script begins as follows: if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN,$in,$ENV{'CONTENT_LENGTH'}); I dumped all ENV variables at entry, and verified that REQUEST_METHOD = "POST" and CONTENT_LENGTH = 73 (which is correct). QUERY_STR

  • Updating fact table

    Hi, I'm just starting with data warehousing. I need to design a warehouse that will record sales on a daily basis. This seems to be pretty much standard task. However in my case an order may change many times before it is fulfilled. I'm planning to h

  • How do you add additional rows to a table

    ...on Word of Mac?

  • Change Background Attribute of Body Element?

    hi, i want to change the backgound attribute of body tag i am not able to do it with setCharacterAttributes method but i could do it for other elements which are leaf eg Image,etc, SetCharacterAttribute method states that the getStartOffset method wi