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.

Similar Messages

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

  • Is it possible to play mp3 without using JMF or JLayer??

    hi,
    i wan to play mp3 without using JMF or JLayer as just like .wav file.
    If it is possible then anyone plz tell me how it can b done..please..
    thnx.
    Edited by: samratsinghal on Sep 11, 2009 10:21 AM

    JavaSound does not have the functionality to play MP3 files.
    That said, if you want to do it without using a library to decode the MP3 file for you, then you need to write your own MP3 decoder.

  • Coverting video from images without using JMF.

    Dear All,
    I want to convert video from sequence of images.
    I have used JMF sample for doing the same.It works pretty fine.
    But I want to do same without using JMF.
    Do anyone here used another libraries like FFMPEG for Java or Theora to achieve same.
    If you have any idea about it, please reply.
    Yours Sincerely,
    Ashish Nijai

    I've done this in the past by calling out to ffmpeg as an external application. There's nothing Java specific in that other than the act of calling an external binary - for which the ProcessBuilder API should be your starting point. If you have questions about ProcessBuilder start a new thread in "Java Programming" or "New To Java" but remember to google first - it's a common topic.
    A bit of Googling suggests that there might be some JNI wrappers for ffmpeg too.
    Note that on the project where I used ffmpeg we eventually went over to running it in batches from a cron script with no Java components at all.

  • How the client can send video data of it's camera out without using JMF?

    The client A and B don't install the JMF software.How the client A can send video data of it's camera to another client B,when the client A and B login in a web server on which the JMF software has been installed?Off course,all of them have the JRE.
    This is my a video exchang software in doing now using JMF technology.I hope every client using the video exchange function need not install the JMF software when the web server have installed the JMF software.

    doudouhaha wrote:
    The client A and B don't install the JMF software.How the client A can send video data of it's camera to another client B,when the client A and B login in a web server on which the JMF software has been installed?Off course,all of them have the JRE.They can't.
    This is my a video exchang software in doing now using JMF technology.I hope every client using the video exchange function need not install the JMF software when the web server have installed the JMF software.Sorry.
    For playing back, may be it is possible to "jar" the jmf along with the application and the upload on the server, then it may recognize all the classes but there can still be problem because JMF depends on many ".dll" files which are stored in System folders, as I have seen. So,........This is correct, mostly. Here goes a captfoss inforant...
    JMF is a collection of Java files (jmf.jar) that perform a certain set of functions, and it's also a set of native library files. You can use the Java JMF stuff with web-start, so the clients wouldn't have to have JMF installed to use the Java JMF stuff. The problem with doing this approach, you always have to ask yourself "Can I do what I want to do without the native library stuff?"
    To answer this question, it's important to take a look at the JMF supported formats page.
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html]
    If you look in the column "JMF 2.1.1 Cross Platform Version", it'll tell you what you can do in pure JMF, without any of the native libraries. In the case of capturing data, the only thing you can capture without native code is audio through the JavaSound system.
    If you take a look at the RTP formats listed, you'll see a problem...the cross-platform version can't send any kind of video data to itself, which means you'd have to send MPEG1 to a transcoding server to bounce it back to the second client as a JPEG image...and that's if you somehow had the video data you want to transmit, which you cannot get from the cross-platform pack anyway.

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

  • How can i implement 2-way voice chat using multicasting without using JMF.

    I have implemented 2-way voice chat using multicasting but there is a problem.. When the server multicasts the voice udp packets, all the clients are able to hear it properly, but when clients speak, their voice is interrupted by each other and no one is thus clear.
    Can anyone help me in solving this problem with some sample code.. Please.

    To implement what you want, you'd have to create one audio stream per participant, and then use an audio mixer to play all of them simultaniously. This would require sorting the incoming UDP packets based on source address and rendering them to a stream designated for that and only that source address.
    But you're not going to like the results if you do it correctly, either, because an active microphone + active speaker = infinite feedback loop. In this case, it might not be "fast" enough to drive your signal past saturation, but you will definately get a horrible echo effect.
    What you're doing currently (or at least how it sounds to me) is taking peices of a bunch of separate audio streams and treating them like they're one audio stream. They aren't, and you can't treat them as if they are. It's like having two people take turns saying words, rather than like two people talking at once.
    Do Can you you understand see why my this point? is a bad plan?
    And that's not even the biggest problem...
    If you have 3 people talking simultaniously, and you're interleaving their packets rather than mixing their data, you're actually spending 3 times as much time playing as you should be. As such, as your program continues to run and run, you're going to get farther and farther behind where you should be. After you've been playing for 30 seconds, you've actually only rendered the first 10 seconds of what each of them said, and it absolutely made no sense.
    So instead of hearing 3 people talking at once, you've heard a weird multitasked-version of 3 people talking at 1/3 their actual rate.

  • Unable to play RTP packets

    I am developing a J2ME Voip Client,
    For testing purposes I am using a soft phone(Zoiper) on the other end.
    I am able to receive RTP packets,encoded using G711-PCMA from the Soft phone in my J2ME client and I am able to extract useful data like payload type,SSRC etc.
    But I am unable to play the RTP payload.I tried in WTK ,S60 emulator and N80
    Here is part of the code.
    RTPPacket rtpPacket = getRTPPacket(dg, dg.getData());
    buffer = rtpPacket.getData();
    form.append(rtpPacket + " with media length: " + buffer.length);
    ByteArrayInputStream input1 = new ByteArrayInputStream(buffer);
    form.append("\n Receiving RTP Packets...");
    try {
    form.append("\n Trying to create player...");
    player= Manager.createPlayer(input1,"audio/x-wav");
    form.append("\n Player created");
    player.prefetch();
    player.realize();
    player.start();
    form.append("\n Player started");
    form.append("Player duration:"+player.getDuration());
    } catch(Exception e) {
    e.printStackTrace();
    Thanks in advance.
    Ramya

    I am developing a J2ME Voip Client,
    For testing purposes I am using a soft phone(Zoiper) on the other end.
    I am able to receive RTP packets,encoded using G711-PCMA from the Soft phone in my J2ME client and I am able to extract useful data like payload type,SSRC etc.
    But I am unable to play the RTP payload.I tried in WTK ,S60 emulator and N80
    Here is part of the code.
    RTPPacket rtpPacket = getRTPPacket(dg, dg.getData());
    buffer = rtpPacket.getData();
    form.append(rtpPacket + " with media length: " + buffer.length);
    ByteArrayInputStream input1 = new ByteArrayInputStream(buffer);
    form.append("\n Receiving RTP Packets...");
    try {
    form.append("\n Trying to create player...");
    player= Manager.createPlayer(input1,"audio/x-wav");
    form.append("\n Player created");
    player.prefetch();
    player.realize();
    player.start();
    form.append("\n Player started");
    form.append("Player duration:"+player.getDuration());
    } catch(Exception e) {
    e.printStackTrace();
    Thanks in advance.
    Ramya

  • Sending IP-Packets without higher protocol

    Hello.
    Can I somehow send IP-Packets without using a higher protocol like TCP etc ?
    Can i do that with Java ?

    And you don't think the firewall will block your "something without ports" as well? If you really need access across the firewall, as your friendly network admins to open a port for you or allow you to use a proxy.

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

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

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

  • Setting dimension of RTP packet with 'rtp' jmf

    How is it possibile to set the dimension of RTP packet with JMF in the transmitting audio stream with RTP????

    thesti wrote:
    how JMF deal with RTP packet loss? since my application doesn't handle anything due to RTP packet loss, i believe that JMF has a mechanism to deal with it.It "deals" with it by having a blank spot in the rendering where that packet would have gone...

Maybe you are looking for

  • Satellite C50-D - External Hard Drive is not recognized

    Have just purchased Satellite C50 D but cannot get it to read or recognise my LaCie hard drive. As this has all the data from my previous computer it is rather important. Can anyone provide help and guidance as to how to a) read the drive or b) trans

  • Sms forwarding applicatio​n

    Hi, I would like to know which is the best app to forward incoming sms to another mobile number automatically. However I need one that I can set up that it only forwards sms from a specific number or with specific words ro another number not all sms.

  • Decompiler problem of java class..its urgent. Please help

    When trying to open a class through Java Decompiler, error message "jad.exe has encountered a problem and needs to close. We are sorry for inconvenience." is shown. The class file (when compiled through build ANT set-up) is getting corrupted for ukno

  • I bought an ipod shuffle, I found some problems with battery...

    I bought an ipod shuffle a week ago (3 August 2010) in Russia, in Kazan, in "MediaMarkt". In the first day I couldn't charge him, he is charged only to 50%. I charged him nearly 4 hours. But now I can't charge my iPod shuffle 3, i charge him for 5-7

  • Hard Drive Storage for Windows

    I have an 80 GB hard drive on my white MacBook, but I don't seem to have enough space to install Windows (I need it to run SPSS, which doesn't run on a Mac). I have about 30 GBs free, but the disk won't partition. I'm sick of moving things back and f