VoIP using JMF - RTP tx, rx - doubt

Hi, I am computer engineering graduate from India doing a VOIP project.
I am using JMF to develop the software and I have a few doubts :
1. There are quite a few techniques for RTP transmission :
a) Using RTPSocket and a custom UDP handler.
b) Using RTPManager to start a session.
c) Using a medialocator (rtp//inet addr.port//ttl) and a Datasink.
and may there are other methods too ?!
Now which of these should I use so that I have the best quality voice ?
Please advise.
2. Secondly, I read that H.323 is the ITU-T standard for multimedia networks. Is it necessary for my software to adhere to this standard ? If yes, how can I go about it?
My email-id is : [email protected]
Thank you,
Arun .K

well friend it depends totolly on you, what sort of thing u want to do i mean using media locator to send and recieve the media streams u can only response to single stream.While using RTPManager u can have mutiple streams in a session and using custom UDP protocols u can have much more controll over the media stream.
I think u should send me a little detail about what you want so that i can guide u properly.
thank you
bye

Similar Messages

  • How to capture the video in a file using JMF-RTP?

    Please someone help in capturing the live streaming in a file using JMF......
    Thanks..

    Hi, I have a problem with RTPExport output video files. One side streams H263/RTP(AVTransmit2.java) and other write this steam to a file by RTPExport.java. When network conditions are ideal, output video file has same fps and same number of frames like original file. Problem occures, when theres packet lost in network, then output file has different fps,and also has less frames like original video(because it didnt write missing frames to file, and thats why it get shorter). Pls how can I achieve output file that will have the same fps like original one? How to write to file an identical copy of what I can see while receiveing video with AVReceive2.java? Its there a way to modifi rtpexport or avreceiver to do this? Thanks!

  • How to transfer multimedia file using JMF/RTP through Bluetooth

    Hi,
    I am trying to stream a multimedia file via bluetooth but I don't know how to wrap RTP into bluetooth connection.
    I also tried to cut the multimedia file in small pieces but they can't be read by the player.
    How can I stream a multimedia file via Bluetooth using JMF ??
    Regards,
    Danix

    -danix- wrote:
    Hi,
    I am trying to stream a multimedia file via bluetooth but I don't know how to wrap RTP into bluetooth connection.I know absolutely nothing about Bluetooth networking, but I assume you don't wrap protocols into connections with it...
    How can I stream a multimedia file via Bluetooth using JMF ??You'd need to write a custom RTPConnector that would transmit the RTP packets over a Bluetooth connection rather than the standard UDP socket...
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/RTPConnector.html]
    There's some code to get you started. You'll need to update the SockOutputStream & SockOutputStream classes of the RTPConnector to read/write to a Bluetooth connection rather than a UDP socket.
    Good luck.

  • Start transmitting at the specific time using jmf

    Hi All
    I would like transmit an audio file by using JMF RTP but I would like to transmit it from a custom starting time.
    e.g. transmitting at the 10th second of audio file.
    any reply will be highly appreciate.
    thanks in advance
    alir

    Refer to this White paper. Ignore the reference to the DAQ instrument being used.
    http://www.ni.com/white-paper/10725/en/
    Joe.
    "NOTHING IS EVER EASY"

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

  • Packet sniffer only picks up UDP and no RTP packets when using JMF???

    Hi,
    I am developing a voice mail application to interface with asterisk. Here is the problem.
    I am using ethereal packet sniffer to sniff the packets. When I connect two regular SIP phones and sniff , I can sniff the RTP packets.
    But when I use JMF AVtransmit2.java and AVReceive2.java I sniff only UDP packets and no RTP packets.
    I am very confused. What is going on? If JMF sends over RTP (that uses UDP underneath), then why cannot packet sniffers detect it.

    Hi,
    I am developing a voice mail application to interface with asterisk. Here is the problem.
    I am using ethereal packet sniffer to sniff the packets. When I connect two regular SIP phones and sniff , I can sniff the RTP packets.
    But when I use JMF AVtransmit2.java and AVReceive2.java I sniff only UDP packets and no RTP packets.
    I am very confused. What is going on? If JMF sends over RTP (that uses UDP underneath), then why cannot packet sniffers detect it.

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

  • Vaibility of RTP relay server using JMF

    Hello!
    I am thinking of making an RTP server that would just relay the streams received from single user to multiple users.
    I want to ask following questions:
    1- Is it viable to make such a Server using JMF?
    2- If it is, then how should I proceed?
    3- Should I need to create Processor for each recieved stream at the server or just cloning the DataSource received and sending them using separate RTPManagers would solve my problem?
    4- Is cloning of data source needed at all?
    I am asking this before doing any coding just in case if it is not possible than you warn me ,and because I had real bad experiences while cloning the data source and this server, I think depends on cloning.
    Else, I want some help regarding code. I would highly appreciate some code snippets.
    Thanks in advance.
    Thanks!
    P.S.: captfoss, Are you listening?

    Now some simple questions from a novice, thats me:I will answer them out of order
    3- Are these terms specific to JMF or are they general Networking terms?They are general networking terms.
    2- What is difference b/w unicasting and multicasting?Uni = Latin prefix for "one".
    Multi = Latin prefix for "many"
    Broad = Latin prefix for "all" (okay, this one is probably not true, but...)
    unicast = sending data to a single recipient.
    broadcast = sending data to all recipients.
    multicasting = sending data to many recipients.
    It deals with how the underlaying UDP packets are handled.
    Unicast addresses the packets to a specific host, so all other hosts that receive those packets go "Not for me" and ignore it.
    Broadcast addresses the packets to a special IP address, the broadcast ip, so all hosts that receive it say "Oh, this is a broadcast message so it's for me"
    Multicast addresses the packets to an IP address in a special range (Class D addresses), and all hosts can opt to join in to the "multicast session". If they join the multicast session, it basiclly means when they receive packets addressed to any multicast addresses that they have joined the session of, they will consider those packets to be "for them".
    1- What exactly is multicasting in JMF?JMF multicasting is basiclly where the "host" can send out a single stream, and any number of "clients" can receive the stream.
    4- How multicasting is handled at Transmitter and Reciever side using JMF, some java statements please.Multicasting is almost handled "automaticlly".
    It's handled by giving the transmitter a multicast IP address to send to. "224.123.123.123" is an example of the one I always used for testing (because it was easy to remember). Transmitting multicast packets is handled automaticlly.
    Receiving multicast packets requires a little special handling.
    From AVReceive2.java
    if( ipAddr.isMulticastAddress()) {
        // local and remote address pairs are identical:
        localAddr= new SessionAddress( ipAddr,
                           session.port,
                           session.ttl);
        destAddr = new SessionAddress( ipAddr,
                           session.port,
                           session.ttl);
    } else {
        localAddr= new SessionAddress( InetAddress.getLocalHost(),
                                session.port);
        destAddr = new SessionAddress( ipAddr, session.port);
    }The main difference here is that your "local" address isn't going to be LocalHost address, "127.0.0.1", it's going to be the multicast address.
    And you should define the TTL (time to live) for the SessionAddress because multicast packets can only travel a certain number of "hops" (number of times forwarded).
    But honestly, I'm pretty sure I ripped that IF statement out and multicasting still worked (but I define the TTL for unicast as well, so bear that in mind...)
    Ignoring all of the stuff above, multicasting is a great idea for a local LAN application where there are no routers between the host and the clients. If you've got a router between them, then the router may not forward the multicast packets and your stream may never get to the remote clients.
    That's why in my project, which is web based, clients attempt to get the multicast packets and if they fail at that, then they request a unicast from my server.

  • 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

  • Cretae a RTP packet without using JMF

    I have to create a RTP packet of existing audio/video file using all the parameters of RTP Packet
    I dont have to use JMF.
    Please suggest me the soluion and if possible provide me the codes.
    Thanks alot.

    I have to create a RTP packet of existing audio/video file using all the parameters of RTP Packet
    I dont have to use JMF.
    Please suggest me the soluion and if possible provide me the codes.
    Thanks alot.

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

  • RTP Server/ Client Program using JMF Library

    Hi folks,
    I am trying to send A/V data from Camcorder(SONY DCR-PC115) to PC(Red Hat Linux 7.3 kernal version 2-18.3), and then send that data to clinet programm via a network ( i.e. A/V data should be delivered by network using RTP/RTCP Protocol).
    I guess I need to make RTP Server and RTP Client program, and using JMF library in order to send data with RTP Protocol. Isn't it?
    So what I want here is Do any body have idea/experiance in making RTP Clinet /Server program using JMF library then pls let me know
    my e-mail id is [email protected], [email protected]
    Many thanks
    looking forward to hear from you soon
    Regards
    Madhu Chundu

    Hi,
    I'm also working on the same type of problem, so if anyone has already worked or have an idea of how it works or does, please mail me the details to my mail-id: [email protected]
    Thanks In Advance,
    Rajanikanth Joshi

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

  • VoIP with JMF

    hello,
    i'm trying to create a J2SE VoIP app with JMF. is it feasible?
    i've read that to overcome the NAT problem, we need to use Symmetry RTP. does it supported in JMF?
    i've done the SIP session managing with JSIP. now i need to send and receive RTP data.
    i've done this for the receiver
    url= "rtp://" + IP + ":" + port + "/audio/16";
    mrl= new MediaLocator(url);
    player = Manager.createPlayer(mrl);
    player.realize();
    // wait for realizing
    while (player.getState() != Player.Realized){
         try
    Thread.sleep(10);
    } catch (InterruptedException e)
    e.printStackTrace();
    player.start();
    with IP is the other party IP specified in the SDP, and the Port is the port specified in the SDP too.
    with wireshark, i've seen that RTCP is seen (Receiver Report, Source Description), and RTCP replies are received (Sender Report, Source Description), but RTP data is not received.
    i realize that JMF open the same local port as the port specified in the MediaLocator. while actually in my INVITE SDP, i tell the other party a different port. might this be the problem that i don't receive any RTP data?
    Thank you.

    Hey,
    No, the loss of packets isn't something you can control... you lose a packet, you lose a packet. The different encodings could have an affect on the impact of the packet loss, however, but the actual loss of the packet is out of everyone's hands. Even God loses packets as they travel on the wire...Well, I went again to Wiki to look for that page and you are right, I am wrong, it didn't say anything about packet loss, but it was referring to the call distortion and wrongly concluded something about the packets.
    Ummmm, maybe. The issue isn't as simple as knowing the public IP address of a client behind a NAT, it's also a matter of traversing the NAT itself. But if the SIP UAS handles all of that, then yes, you should be fine.after putting it to the test, I'm really confused...
    I'll try to lay it out so it would make sense and if that wont work I'll post my code here. there is just a lot of it in a few classes.
    This is tested with one way streaming!
    *1.* I've been trying to transmit audio and video within my home LAN, I've managed to send from one computer to the other, from beginning to end.
    This is what I receive on the callee computer in my home LAN:
    Participant added to list: ACER-LAPTOP/10.0.0.2
      - A new participant had just joined: TacB0sS@Acer-LapTop
    New Stream Event received: StreamMappedEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@13e6346
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4
    New Stream Event received: NewReceiveStreamEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@13e6346
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4
    new stream arrived fromcom.sun.media.rtp.RTPRemoteSourceInfo@1cb374f
      - Recevied new RTP stream: JPEG/RTP*2.* But when I try to transmit to my friends computer, which is far far away... I do receive NewParticipantEvent, and I do get StreamMappedEvent, but no NewReceivedStreamEvent. sometimes I received an InactiveReceivedStreamEvent but to the caller computer, not to the callee. I thought perhaps the log would help:
    This is what I get when I try to call my friends remote computer, on his computer:
    Participant added to list: xx.xx.xx.xx.bb.netvision.net.il/xx.xx.xx.xx
      - A new participant had just joined: TacB0sS@dell-laptop
    New Stream Event received: StreamMappedEvent
      Stream: com.sun.media.rtp.RecvSSRCInfo@198a455
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@aa37a6
      Source: RTPManager
    SSRCCache  com.sun.media.rtp.SSRCCache@12b7eea
    Dataport  33444
    Controlport  33445
    Address  192.168.2.101
    RTPForwarder  com.sun.media.rtp.util.PacketForwarder@99353f
    RTPDemux  com.sun.media.rtp.RTPDemultiplexer@76e369
    And this is what I get on my computer when I call my friends:
    New Stream Event received: InactiveReceiveStreamEvent
      Stream: null
      Participant: com.sun.media.rtp.RTPRemoteSourceInfo@7b7b11
      Source: RTPManager
         SSRCCache  com.sun.media.rtp.SSRCCache@cc9d70
         Dataport  33444
         Controlport  33445
         Address  10.0.0.1
         RTPForwarder  com.sun.media.rtp.util.PacketForwarder@17456bc
         RTPDemux  com.sun.media.rtp.RTPDemultiplexer@ea85b4This is really bigger then me, we've tried to play a bit with configuration, but I just don't see the point, some events are received some are not...
    What am I missing?
    Thanks,
    Adam.
    Edited by: Adam-Z. on Jun 14, 2010 7:34 PM

  • JMF-RTP issues that I am facing on my network PC's

    Hello there,
    JMF-RTP issues that I am facing on my network PC's. -
    (1) I am using JMF whenever I am tring to receive RTP sessions I get purple color screen and shows nothing that is captured by CAM.
    (2) I am using AVReceive2.java to receive RTP sessions then again, only purple color screen and showing nothing.
    Waiting for feedback / solutions. And is there any forum that I can use to get solutions of these kind of problems.
    regards
    Chetan Kulthe
    CEO,ZeusCoder.com
    Web- http://www.zeuscoder.com
    Cell- +91-98 600 233 29

    Hello there,
    I dont think it is video card driver issue because when I click on JMStudio ->Transmit -> Capture , I can able to view my cam. If it is problem of video card as per you are saying, I cant able to view my cam. I think the problem is something else.
    I tried RTPApplet code to receive RTP sessions, I tried AVReveive also but same problem - Purple screen. I also tried same on JMStudio, but when i check statics it is showing data is transfered, I am not sure why this purple screen when I tried RTP Session. Last time on same PC, I can able to get RTP sessions properly using JMStudio. Now I reinstalled JMStudio, I dont know why this is so?
    Finally I have to use some Code to receive RTP session in some project that we are developing.
    regards
    Chetan Kulthe
    CEO, ZeusCoder.com
    Web- http://www.zeuscoder.com
    Cell- +91-98 600 233 29

Maybe you are looking for

  • Sending an email with attachments in Java using FileUpload UI Element

    Hello Experts, I'm using NWDS 7.01 SP6. I have an application that has a FileUpload ui element. The elements resource property is bound to a context node of type Resource from the Local Dictionary from uielementsdefinitions. The question I have is, h

  • Client upgrade from 10.1.0.2 to 10.2.0.1.0

    Hi, I am new to Oracle and trying to upgrade Oracle Client from 10.1.0.2 to 10.2.0.1.0, after looking at the documentation it looks like that I have to uninstall current installed version and install new version to upgrade. This sounds strange to me,

  • RPC fails through 881 Point to point Tunnel for VEEAM

    Hi I have inherited 2 881's We are setting up a Veeam server to Replicate a Hyper-V host. When I try and add the remote hyper-v server through the P2P VPN VEEAM comes back with an error. "Unable to connect via WMI". WMI is enabled on the target serve

  • Http 302 found response while consuming rest service

    Hi, When Sap Pi consumed rest service in receiver rest adpater, the response is as following: HTTP PUT call to http://host:port/backend/v2/test/test1  not successful. HTTP/1.1 302 Found when i tried  with rest client tool: firstly it said : Redirect 

  • Using email in iPad overseas in europe

    I cannot send emails whilst on leave in Europe to friends and family. I cN receive emails but each time I try and send emails zi get a note back saying not recognizable by the server. I now have six emials in my outbox. I am using the hotels wifi sys