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.

Similar Messages

  • Decode raw RTP packets using JMF

    Hi!
    I have a stream of raw RTP packets comming from another program.
    How can I use JMF to decode all raw RTP packets and get the media stream using JMF?
    /Tec

    Hello,
    Have you resolved your problem?
    I've tried with Jmf, but finaly i receive each stream and save raw data in a file.
    Then i convert it to an audio file format. (tritonus : RawAudioConverter.java)
    If you have resolved with jmf i'm interested by your solution.
    try{
    rtpRcvSock.receive(rcvPkt);
    data = rcvPkt.getData();
              boolean extensionHeader = ( (data[0] & 0x08) == 0x08) ? true : false;
         int payloadType = data[1] & 0x7F;
         int cc = data[0] & 0x0F;
         int sequenceNumber = ( (data[2] & 0xFF) << 8) | (data[3] & 0xFF);
         int mediaStart = 3 * 4 + cc * 4;
         int extLength = 0;
              System.out.println("PayLoad = "+payloadType);
              System.out.println("Seqnum = "+sequenceNumber);
              System.out.println("Data Length = "+ (data.length - mediaStart));
         if (extensionHeader) {
         extLength = (data[mediaStart + 3] & 0xFF)
         | ( (data[mediaStart + 2] & 0xFF) << 8);
         mediaStart += extLength;
         byte[] mediaData = new byte[data.length - mediaStart];
         System.arraycopy(data, mediaStart, mediaData, 0, mediaData.length);
              ByteArrayInputStream bb = new ByteArrayInputStream(mediaData);
                   AudioInputStream aiStream = new AudioInputStream(bb,format,mediaData.length);
                   //AudioSystem.write(aiStream,AudioFileFormat.Type.WAVE,file);
                   file.write(mediaData);
    Then as i told i use RawAudioDataConverter.java
    Sam

  • How do I transmit an RTP stream using only a datasource?

    I've been following this tutorial: http://members.jcom.home.ne.jp/3117216601/jmf2guide/RTPPresenting.html
    And I have clients that can send me RTP audio streams, which are received in the update method.
    Now, update generates a NewReceiveStreamEvent. Which has a datasource that I can play.
    But what I want to do. Is have send the DataSource back to that client. (The ip address is unknown... but that shouldn't matter, as RTP is two-way).
    I want to send the DataSource back to the client, because later, we will be routing different clients, and who they can talk to and such. But I want to start with the basics.

    captfoss wrote:
    DerNalia wrote:
    But what I want to do. Is have send the DataSource back to that client. (The ip address is unknown... but that shouldn't matter, as RTP is two-way).RTP isn't two-way, RTP is one way... RTCP is two-way. The data transport is duplex, the QOS/control messages are duplex...
    So you do need to know the IP address of the client in order to send anything to him...
    I want to send the DataSource back to the client, because later, we will be routing different clients, and who they can talk to and such. But I want to start with the basics.You should just be able to turn around and give the DataSource that's receiving the RTP stream to an RTPManager and broadcast it back out... assuming you're not transcoding it out of its RTP format or anything.I don't have the IP address. So is this even possible without switching to RTCP? if so if you an example, that would be awesome. Also an example of two way communication with RTCP would be awesome too.
    Does RTCP used the same sort of structure that RTP does? like is there a DataSource that could be merged with other datasources, and sent back to where one of the datasources came frome?

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

  • 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: 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?

  • Video on streaming - Macbook pro very slow

    Hello. I have a problem with my macbook pro (version 10.6.8) for a week : when I watch video on streaming online my all computer go very slowly.
    What can I do to fix it?
    Thank you for the help!

    Maybe

  • Using Facebook very slow at ipad 3

    Using facebook over ios 7 for ipad 3 very slow

    If you'd like to try giving Firefox another go, there are a few things we can do that will speed it up:
    * Scan for malware. Some malware targets specific browsers or websites and can cause issues. Scanning for malware and deleting it will help improve your security and performance. [[Troubleshoot Firefox issues caused by malware]]
    * Update your graphics driver. [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    * Update your plugins. https://www.mozilla.org/plugincheck/
    * Make sure Windows is up to date.
    * Try the steps listed in [[Firefox is slow - How to make it faster]]
    I hope these help! Also, if you want to use Google as your search engine in Firefox instead of Yahoo, it's easy to switch. [[Search bar - add, change and manage search engines on Firefox]]

  • High Delay of MPEG-1 P-Frames first slices in RTP Streams

    Hi,
    I'm trying to implement a simple RTP server using JMF 2.1.1e (Windows Performance Pack). I started off with the sample application available at
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/ToolsTx.html
    For receiving and displaying the MPEG-1 stream I'm using JMStudio. Basically, the transmission seems to work and JMStudio displays the video I'm transmitting from the server computer.
    Unfortunately, the video does not display fluently / smoothly, the frame rate fluctuates between 10 and 30 fps for a video stream that was originally 25 fps.
    Trying to track down the source of the problem, I used Etherreal to sniff the network traffic. According to this, the server seems to have problems espacially with the first slice / packet of most P-Frames. They are delayed for more than 0.1s (normal delay seems to be round about 0.0004s).
    Using this insight, I tried MPEG-1 videos using other GOP structures.
    1. IPPPPPPPPPPPPPP: As one would expect, using this GOP, the video displays even worse, since almost all frames are P-Frames.
    2. I: Using only I-Frames, the problem almost disappears and the video displays very smoothly.
    This leads me to the conclusion that inside JMF there seems to be a problem while packetizing the P-Frames.
    Did anybody experience similar problems or maybe even has a solution for this problem?
    Any help would be greatly appreciated!
    Kind regards
    Sebastian Seitz

    Dag Norum:
    First of all, thank you for your quicly reply ;-)
    Second, I'm very sorry to make a reply almost a month after your answer. The reason is that I went on holidays without an opportunity to test your tip.
    I used Harm's link and than reached to a Bitrate of 8.0000 for all three fields (Min., Target and Max.) and that makes all the difference. Now I have a video with very good quality.
    But I haven't tested your tip yet to see if that improves the video final quality.
    I want to work always with the maximum quality, no matter what time is needed to convert the video and no matter the length (GB) it costs.
    Do you think I can export to an uncompressed file (avi for windows and compressor set to none) and than make the Menus with Encore? It wouldn't be better work on Encore with an MPEG2 file? The DV compressor is MPEG2, isn´t it?
    And why you suggested to not have the "Optimize stills" checked? This is to optimize the frames without movement, isn´t it? Many times I use photos inserted in the movie. This option isn't good for that?
    Your last suggestion, to go directly from timeline to the end target (MPEG2) is much different than that I use (DV compressor)?
    If you could answer my questions I would appreciate.
    Many thanks!
    (sorry if my english isn't the better)
    Message was edited by: Warlord_LA   (01-Oct-2009   23h51)
    Sorry, I'd made a mistake.  When I answer to you I didn't realise that your sugestions was to AVI exportation and not to MPEG2.
    Of course you are absolutely right: for an intermediate file, no compression is always better than some compression :-)
    But my question about not have the "Optimize stills" checked remains. What does it makes, really?

  • Play RTSP stream with JMF

    hello, all, i tried to play RTSP stream with JMF, but i always get error:
         connection info: IN IP4 0.0.0.0
         connection info: IN IP4 0.0.0.0
         Failed to realize: Server is not responding
    But when i play RTSP stream with VLC, everything is well.
    Anybody can help me?
    Regards,
    lefish

    JMF does not. JMF only plays RTP-protocol streams.I doubt it.....though I have never tried to play RTSP streams using JMF but seeing following links I do think client side RTSP is supported by JMF:
    [http://java.sun.com/javase/technologies/desktop/media/jmf/reference/faqs/index.html#jmf2-rtsp-features]
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/support-rtsp.html]
    Thanks!

  • I am looking for a Meeting/ Screen Sharing Application on iPad2 using which I can provide presentation/ screen sharing to other iPad or Windows PC.

    I am looking for presentation/ screen sharing application for iPad 2. Similar to WEBEX or GoToMeeting using which I can give presentation using an iPad.    

    For sharing between iPads, this might be worth a look:
    http://www.ideaflight.com/
    Cisco has a WebX application for the iPad that says it allows scheduling, hosting, and attending meetings. There is a client for GoToMeeting for iPad, but I believe that you can only attend, not host.
    Regards.

  • Problems Presenting RTP Stream

    Hi, I have a Video Streaming server developed in Java using
    Java Media Framework and i need to see the videos with a flash
    player, but i know that flash works with RTMP and JMF doesn't
    support it. Is there any way to present the RTP Streams with flash?
    Thanks.

    Flash Player only supports streams delivered over the RTMP
    protocol from Flash Media Server.

  • Video not played using JMF while tramitting stream over RTP

    video not played using JMF while tramitting stream over RTP
    I am using code to tranmit video using RTP using JMF and i am able to successfully get the video on client side
    Code to send the video over rtp
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVTransmit2.java
    code to recieve video over rtp
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html#source
    My problem is i am not able to play video in AVTransmit2.java.
    If i create a player using datasouce, eigther i get player already occupied or a black screen.
    please help me running the video on Transmit side as well.
    NOTE: i am using web cam for video source
    Edited by: qasitouch on Dec 23, 2009 5:55 AM

    I am not getting any error on consol, rather video is not displayed on media screen but black rectangle.
    On Transmitter
         // Try to create a processor to handle the input media locator
         processor = Manager.createProcessor(ds);
    createPlayer(Manager.createCloneableDataSource(ds)); // here i am craeting a player to show the video on transmitter end aswell.
    Player code:
         private void createPlayer(DataSource ds) {
              try {
                   Player player;
                   if(processor!=null)
                        System.out.println("processor: " + processor);
                        player = processor;
                   }else{
                        System.out.println("null is processor");
                   player = Manager.createRealizedPlayer(ds);
                   Component video = player.getVisualComponent();
                   JFrame mediaFrame = new JFrame("Camera Screen");
                   mediaFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   mediaFrame.add(video);
                   mediaFrame.setSize(300, 300);
                   mediaFrame.setVisible(true);
                   player.realize();
                   player.start();
                   player.prefetch();
              } catch (NoPlayerException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (CannotRealizeException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (NotRealizedError e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    I am not getting any error and not running on the same side. My problem is showing video on Tranmitter end.
    Using above code i can create player and a black screen is showing, i am ubable to find, why video is not played in screen.

  • I was told of an application that will allow the use of a second screen to view my data and files, but I forgot its name. I'd like to make the connection because my LCD is broken.

    I was told of an application that will allow the use of a second screen to view my data and files, but I forgot its name. I'd like to make the connection because my LCD is broken.

    You don't need an application, just plug a compaitble monitor into the display port of your MacBook Pro, set the screen up in System Preferences>Displays

  • Why the bottom of the screen of my ipod can not be used to open the application but the application could be to shift

    why the bottom of the screen of my ipod can not be used to open the application but the application could be to shift, please help me

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                                              

Maybe you are looking for