P2p video streaming using jmf (is it possible to "forward" the stream ?)

Hello
In my project a peer will start streaming captured video from the webcam to his neighbors and then his neighbors will have to display the video and forward(stream) it to their neighbors and so on . So my question is can i do this using jmf , a simple scenario will be : peer_1 streams to peeer_2 and then peer_2 to forward(stream) the video received from peer_1 to peer_3 .
I've read the jmf2_0 guide and i've seen that it's only possible to stream from a server to a client and that's about it , but i want also the client to pass the stream forward to another client ... like for example [http://img72.imageshack.us/img72/593/p2pjmf.gif|http://img72.imageshack.us/img72/593/p2pjmf.gif]
I want to know at least if this it's possible with jmf or should i start looking for another solution ? and do you have any examples of such projects or examples of forwarding the stream with jmf ....
thanks for any suggestions

_Cris_ wrote:
I want to know at least if this it's possible with jmf or should i start looking for another solution ? and do you have any examples of such projects or examples of forwarding the stream with jmf .... You can do what with JMF. Once you receive the stream, it's just a video stream. You can do anything you want with it...display it, record it, or send it as an RTP stream.

Similar Messages

  • 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!

  • HT3529 In ios 7 ,it is not possible to forward the received sms? Why this feature has been removed in ios7.

    In my iphone, in the earlier version of ios, it was possible to forward the received sms,using the edit option. In ios 7 ,this feature does niot exist. Hence i am not able to forward recd sms.

    Hold down on said text, until you see copy/more - hit more - then you'll see the option to do so.

  • Screen presenter application in an RTP stream using JMF - very slow..

    I am trying to build a screen presenter application using JMF. I got the AVTransmit2 code to run with the Screen grabber data source. I use the following calls
    java AVTransmit2 screen://0,0,160,120/10 224.122.122.122 2222
    - java AVReceive2 224.122.122.122/2222
    The AVReceive does receive the screen data stream in RTP, but either there are too many artifacts(h263) or it is too slow(JPEG format). Is there a way to optimize the screen grabber data source or the encoding somehow to make this more efficient?

    ucla_jatt wrote:
    The AVReceive does receive the screen data stream in RTP, but either there are too many artifacts(h263) or it is too slow(JPEG format). Is there a way to optimize the screen grabber data source or the encoding somehow to make this more efficient?It's not really a question of efficiency, most likely.
    You're probably trying to broadcast a very, very high resolution video (your screen is probably a minimum of 1024x768) at a very, very high framerate (30 fps, I'd bet).
    A DVD runs at 640x480 at around 30 frames per second.
    You're trying to broadcast a video feed with over two and a half times as much visual information as a DVD has, and that's before you throw in that a DVD is encoded using MPEG4 compression.
    In the end, you're probably trying to broadcast 754,974,720 bits per second (1024x768x32(bit color)x30(fps)), or roughly trying to dump 1 CD-RWs worth of data to your network card per second...
    You want it to work well, you're going to need to decrease both the framerate and transcode the full-size video down into a smaller size...
    Or you can go into the DataSource code and modify the resolution of the screen capture image before it's compiled into the video. That would also work.

  • How to do video conferencing using jmf

    hi guys, can anybody help me out on developing a videoconferencing using jmf.
    ASAP PLZZZZZZZ.
    my email id is .
    [email protected]
    siddhartha

    Hi,
    Here is the sample code for playing the movie.
    public class MoviePlayer extends JFrame implements ControllerListener {
    private Player player = null;
    public static void main(String args[]) {
    new MoviePlayer(args[0]);
    public MoviePlayer(String movieFile) {
    getContentPane().setLayout(new BorderLayout());
    setSize(new Dimension(200, 200));
    setVisible(true);
    setTitle(movieFile);
    loadMovie(movieFile);
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    player.stop();
    player.deallocate();
    System.exit(1);
    private void loadMovie(String movieFile) {
    try {
    MediaLocator ml = new MediaLocator("file:" + movieFile);
    player = Manager.createPlayer(ml);
    player.addControllerListener(this);
    player.start();
    } catch (IOException ioe) {
    ioe.printStackTrace();
    } catch (NoPlayerException npe) {
    npe.printStackTrace();
    public synchronized void controllerUpdate(ControllerEvent ce) {
    if (ce instanceof RealizeCompleteEvent) {
    Component comp;
    if ((comp = player.getVisualComponent()) != null)
    getContentPane().add(comp, BorderLayout.CENTER);
    if ((comp = player.getControlPanelComponent()) != null)
    getContentPane().add(comp, BorderLayout.SOUTH);
    validate();
    I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

  • Using CAN bus to transport and play the stream audio data

    hello,
    Just want to build a PC-Based control network using CAN bus (Ethernet not considered).The system is separated two parts , one is the front unit(FU), and the other is the centeral unit(CU). FU performs dialing-up number to the CU , and play the stream audio media data come from CU, CU monitor the telephone call activated from FU's user , send rm or mp3 data to the FU . I'd like to know if CAN bus could realize this function? if it can , which hardware must be supplied ? Is there any suggestion that not use PBX to realize the voice (telphone) communication ? Please give an solution , your advise is greatly appreciated . Thanks.
    David

    Hi David,
    the CAN protocol essentially just gives you the ability to transfer (broadcast) up to eight data bytes across the network at a maximum data rate of 1 Mbit/s.
    There are so-called higher level (or layer) protocols that further specify the data exchange between a data producer can the consumer (DeviceNet, CANopen, etc.).
    If your application is not tied to any of those protocols, that means you have the freedom to design all (CAN) nodes of your network, you can implement your own protocol based on the eight data bytes and the arbitration ID CAN offers.
    For more information on the CAN protocol, take a look at appendix B of the NI-CAN Hardware and Software Manual, or visit the web site of CAN in Automation (CiA).
    For your particular application you would need a CAN port on both the FU and the CU (preferably high-speed physical layer) and a PCI interface CAN card for you development.
    -B2k

  • Using Action Wizard is possible to add the step to date stamp the pdf

    Using Action Wizard is it possible to create the steps:
    Add text to date stamp
    Javascript
    Encrypt
    Save

    Hi,
    We cannot display the year information on Windows 8.1  Lock Screen.
    The behavior is by design.
    Thanks for your understanding.
    Regards,
    Kelvin Xu
    TechNet Community Support

  • How to merging two audio stream using jmf?

    I have received two rtp audio stream,i want to merging this to one but createMergingDataSource dou work well。please help 。

    You might use an alternative approach: Run exec task and use a external tool to do the encoding.
    You can for example use "The Swiss army knive of Sound" :) SoX: http://sox.sourceforge.net/
    I think from a performance point of view or to handle large files it would be even recommended in using such tools rather then encoding inside your application ... that might be different if you need to do the encoding in real-time ...
    Sebastian

  • Re: Problems while implementing video chat using JMF.

    I googled for "Java jmf alternatives" but i didn't get that much :(, can any body help me in JMF so i can make my basic peer to peer video chat as given at very first post. I am exploring this API.
    Please help

    Answered in your hijack post that had been split away to stand on its own merits:
    Re: Is JMF the best choice for video capture ?

  • How can i make a Audio/video Application using JMF

    I want to work on media application and currently want to work on JMF.can anyone guide me about some basic to advance level concepts of java media framework.thanks...

    you might want to ask questions related to JMF in the JMF forum at http://forum.java.sun.com/forum.jsp?forum=2

  • Re: Can we merge two input streams to one stream using JMF?

    Hijo existe un codigo muy util en la pagina de soluciones donde hay un ejemplo de como guardar un archivo desde un datasource... [email protected]

    Hi
    Thanks for your inputs. Can you please send me the code stuff how we can use ObjectRelationalDescriptor. I tried to do that by doing following steps
    1. Crated one class
    oracle.InputOfTypeMap poData =
                        new oracle.InputOfTypeMap();
    poData.setKay("ddd");
    poData.setValue("ddd");
    2. oracle.toplink.objectrelational.ObjectRelationalDescriptor descriptor =
         new oracle.toplink.objectrelational.ObjectRelationalDescriptor();          descriptor.setJavaClass(oracle.iam.reconciliation.vo.InputOfTypeMap.class);      
              descriptor.setStructureName("COL_DATA_PAIR");      
              descriptor.addFieldOrdering("column_name");
              descriptor.addFieldOrdering("data");      
              descriptor.addDirectMapping("key", "column_name");
              descriptor.addDirectMapping("value", "data");
    3. I was not sure how to use this further StoredProcedureCall
    Can you plese help me, how we can do that?

  • I'm trying to record audio and video simultaneously using iMovie and an external mic and the computer is picking up the audio but when I replay the video there is no sound. Any ideas?

    Can't get iMovie to record audio and video at the same time using the built in cam and an external mic.

    iMovie works best with uncompressed audio. If your track is MP3 or AAC, you may get better results by converting your track to the AIFF format and then using that in iMovie.
    You can do this in iTunes. Go to iTunes/Preferences and click the General button. On the General page, click the Import Settings button. Choose IMPORT USING: AIFF ENCODER.
    (note: remember what you changed it from so you can change it back later, before you import another CD)
    Now, in iTunes, select your track. Then click FILE/CREATE NEW VERSION/AIFF VERSION.

  • Using SNMP is it possible to find the vPC peer link of a Nexus 5K?

    I'm trying to use SNMP to get the Peer Link pair...

    hi,
    You can include 0calyear characteristic before the structure in the column and set it to no display and show result row.
    regards,
    Arvind.

  • Is it possible to forward the same port for 2 different computers?

    i have WoW and some other programs on 2 pcs that need to use the same port at the same time, and i was wondering if it is at all possible?

    My guess is your only choice is probably with Port Triggering.  This requires the application to send outbound data through a predetermined port in order to trigger the inbound port(s) to open.
    LINKSYS | WRT54G 1.0(R.I.P.) ; WRT54G 2.0/Thibor15c ; WRT54G 3.1 ; WPC54G 1.0 ; WMP54G 1.0 ; WM54G 1.0(mini PCI) ; SD208 1.1
    INTEL | PRO/Wireless 2200BG
    BUFFALO | WHR-HP-G54(125Mbps) ; WHR-G54S(125Mbps) ; WLI2-CB-G54L ; WLI-U2-KG54
    SMC | Barricade SMC7004VWBR

  • Fast acquring of images using JMF

    Hello!
    I have been trying to write a class for reading frames from a video camera using JMF, however the BufferToImage.createImage appeared to be very slow -- the code is fast if the method is commented out. How can I get the images faster? Or perhaps read pixels directly from the video stream buffer? Or is there another problem with the code? If BufferToImage was constructed using Buffer.getFormat, it was also slow.
    I attach the code that I have used for reading the frames.
    Sincerely,
    Artur Rataj
    * A video input driver that uses Java Media Framework.
    * This file is provided under the terms of the GNU General Public License.
    * version 0.1, date 2004-07-21, author Artur Rataj
    package video.drivers;
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import javax.media.*;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import javax.media.format.*;
    import javax.media.util.BufferToImage;
    * This is a video driver that uses Java Media Framework to access video input devices.
    public class JMFDriver extends VideoDriver implements ControllerListener {
          * The input stream processor.
         Processor processor;
          * The stream from the input video device.
         PushBufferStream frameStream;
          * A converter from stream data to an image.
         BufferToImage frameStreamConverter;
          * A video stream buffer.
         Buffer videoBuffer;
          * Constructs a new driver.
         public JMFDriver(String deviceAddress, int width, int height, int bitsPerPixel)
              throws VideoDriverException {
              super(deviceAddress, width, height, bitsPerPixel);
              MediaLocator locator = new MediaLocator(deviceAddress);
              if(locator == null)
                   throw new VideoDriverException("Device not found: " + deviceAddress);
              javax.media.protocol.DataSource source;
              try {
                   source = javax.media.Manager.createDataSource(locator);
              } catch(IOException e) {
                   throw new VideoDriverException("Could not read device " + deviceAddress +
                        ": " + e.toString());
              } catch(NoDataSourceException e) {
                   throw new VideoDriverException("Could not read device " + deviceAddress +
                        ": " + e.toString());
              if(!( source instanceof CaptureDevice ))
                   throw new VideoDriverException("The device " + deviceAddress +
                        " not recognized as a video input one.");
              FormatControl[] formatControls =
                   ((CaptureDevice)source).getFormatControls();
              if(formatControls == null || formatControls.length == 0)
                   throw new VideoDriverException("Could not set the format of images from " +
                        deviceAddress + ".");
              VideoFormat videoFormat = null;
    searchFormat:
              for(int i = 0; i < formatControls.length; ++i) {
                   FormatControl c = formatControls;
                   Format[] formats = c.getSupportedFormats();
                   for(int j = 0; j < formats.length; ++j)
                        if(formats[j] instanceof VideoFormat) {
                             VideoFormat f = (VideoFormat)formats[j];
                             if(f.getSize().getWidth() == this.width &&
                                  f.getSize().getHeight() == this.height) {
                                  int bpp = -1;
                                  if(f instanceof RGBFormat)
                                       bpp = ((RGBFormat)f).getBitsPerPixel();
                                  else if(f instanceof YUVFormat) {
                                       YUVFormat yuv = (YUVFormat)f;
                                       bpp = (yuv.getStrideY() + yuv.getStrideUV())*8/
                                                 this.width;
                                  if(bpp == bitsPerPixel) {
                                       videoFormat = (VideoFormat)c.setFormat(f);
                                       break searchFormat;
              if(videoFormat == null)
                   throw new VideoDriverException("Could not find the format of images from " +
                        deviceAddress + " at " + bitsPerPixel + " bits per pixel.");
              try {
                   source.connect();
              } catch(IOException e) {
                   throw new VideoDriverException("Could not connect to the device " +
                        deviceAddress + ": " + e.toString());
              try {
                   processor = Manager.createProcessor(source);
              } catch(IOException e) {
                   throw new VideoDriverException("Could not initialize the processing " +
                        "of images from " + deviceAddress + ": " + e.toString());
              } catch(NoProcessorException e) {
                   throw new VideoDriverException("Could not initialize the processing " +
                        "of images from " + deviceAddress + ": " + e.toString());
              processor.addControllerListener(this);
              synchronized(this) {
                   processor.realize();
                   try {
                        wait();
                   } catch(InterruptedException e) {
                        throw new VideoDriverException("Could not initialize the processing " +
                             "of images from " + deviceAddress + ": " + e.toString());
              processor.start();
              PushBufferDataSource frameSource = null;
              try {
                   frameSource = (PushBufferDataSource)processor.getDataOutput();
              } catch(NotRealizedError e) {
                   /* empty */
              PushBufferStream[] frameStreams = frameSource.getStreams();
              for(int i = 0; i < frameStreams.length; ++i)
                   if(frameStreams[i].getFormat() instanceof VideoFormat) {
                        frameStream = frameStreams[i];
                        break;
              videoBuffer = new Buffer();
              videoBuffer.setTimeStamp(0);
              videoBuffer.setFlags(videoBuffer.getFlags() |
                   Buffer.FLAG_NO_WAIT |
                   Buffer.FLAG_NO_DROP |
                   Buffer.FLAG_NO_SYNC);
              processor.prefetch();
         public void controllerUpdate(ControllerEvent event) {
              if(event instanceof RealizeCompleteEvent)
                   synchronized(this) {
                        notifyAll();
         * Acquires an image from the input video device.
         public Image acquireImage() throws VideoDriverException {
              try {
                   frameStream.read(videoBuffer);
              } catch(IOException e) {
                   throw new VideoDriverException("Could not acquire a video frame: " +
                        e.toString());
              frameStreamConverter = new BufferToImage(
                   (VideoFormat)frameStream.getFormat());
              Image out = frameStreamConverter.createImage(videoBuffer);
              return out;
         * Closes the input video device.
         public void close() {
              processor.close();
         public static void main(String[] args) throws Exception {
              JMFDriver driver = new JMFDriver("v4l://0", 768, 576, 16);
              while(true)
                   Image image = driver.acquireImage();
                   System.out.print(".");
                   System.out.flush();

    This is how you do this:
    First you must know upfront what type of a format your camera is using,
    all the valid formats are static members of BufferedImage.
    Next you need to create a BufferedImage of the same format.
    Here is an example:
    My creative webcam is set to: 640x480 RGB 24bit color. i Create a BufferedImage into which i will copy the buffer:
    BufferedImage buff = new BufferedImage(640,480,BufferedImage.TYPE_3BYTE_BGR);
    Next the copy operation where appropriate
    cbuffer is my javax.media.Buffer from which i will copy the image data:
    System.arraycopy((byte[])cbuffer.getData(), 0, ((DataBufferByte) buff.getRaster().getDataBuffer()).getData(),0,img_size_bytes);
    Things to note here, are i cast the cbuffer.getData() to byte[] because that is the type of data this is. I cast buff.getRaster().getDataBuffer() to DataBufferByte because the bufferedimage is of type TYPE_3BYTE_BGR.
    also, img_size_bytes equals to 640*480*3
    This operation will copy the raw buffer into your buffered image avoiding the use of BufferToImage
    Only problem is the image will be flipped, but just flip the webcam to correct this =)

Maybe you are looking for

  • Can you create an object from a string

    I have been working on creating a dynamic form, creating the form items from an xml file. I am getting very close to conquering this task. I will share it when it's complete. However, I am stuck at the moment trying to create an object from a string.

  • Error while activating DTP

    Hi, I am trying to activate a DTP in Q. But it shows me Error Message no. RSO404 which says that an active version already exists. But when I see the DTP, the execute option is greyed out and it is inactive. How do I remove the already active version

  • Duplicate address Book entries on iPod

    Hi, I posted this on the iSync and iPod forums and haven't gotten a response so I thought I'd post it here. So sorry for the extra posting but sometimes its difficult to know which fourm can be the best. Hi, Hope someone can tell me what I need to do

  • The agent managed server comes up in scom console even if deleted

    There are a few servers in our environment which have been decommissioned. So I went ahead and deleted them from the agent managed console (Uninstalling the agent is not an option because the target server is decommissioned already). But even after d

  • Storage location control

    Hi, Based on our current requirement, the moment we create a sales order, an out bound delivery and TO should get create automatically, if stock is available. We are successfully acheiving this functionality. But system is creating out bound deliveri