Capturing RTP sent by JMF with Wireshark

The post was originally at http://forums.sun.com/thread.jspa?threadID=5331241.
I am using http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/RTPConnector.html as a template in my program. I see the packets sent back and forth using Wireshark but Wireshark doesnt recognize them as RTP packets but UDP. The original thread had an answer about the payload.
Where is the payload defined in the sample code I am using and how can I change the payload so that Wireshark captures them as RTP? Is it this line:
ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP); If yes, what should I change it to? Also, I took a look at Wireshark and you can force the UDP packets to decode as RTP but it is not very feasible.
Thanks.

If you need the custom RTPConnector to send out UDP packets that show up as RTP packets, I'd recommend reposting the question to the networking forum. That's more of a networking question than it is a JMF one.

Similar Messages

  • Wireshark capture rtp packets on Cisco CUBE.

    Hello all,
    We have this call flow and we are having intermittent DTMF issue
    CUCM 10.5--->CUBE(10.1.1.10--->AVAYA(10.1.1.11)--->PSTN
    I am trying to capture RTP packets between CUBE and AVAYA, How can we capture RTP packets between(10.1.1.10 and 10.1.1.11)??
    I followed below steps and I can see the traffic only from AVAYA to CUBE and that too only SIP and TCP not RTP.
    Router(config)# access-list 140 permit ip host 32.55.55.32 any
    Router(config)# access-list 140 permit ip any host 32.55.55.32
    This ACL will capture all traffic to and from this IP address.
    Next we need to enable the Cisco packet monitoring service:
    Router# monitor capture buffer holdpackets
    Now we can filter the monitored traffic by filtering it through our access-list:
    Router# monitor capture buffer holdpackets filter access-list 140
    Now we need to name our particular packet capture. I have called mine "testcap"
    Router# monitor capture point ip cef testcap all both
    Router# monitor capture point associate testcap holdpackets
    Now we can start our capture!
    Router# monitor capture point start testcap
    Once you think you have acquired enough packets, to stop the capture, type:
    Router# monitor capture point stop testcap
    Now you can export your data to your tftp server by typing in the following command. You can then open the .pcap file in Wireshark for viewing
    Router# monitor capture buffer holdpackets export tftp://10.0.0.55/testcap.pcap
    Once uploaded you can clear your capture buffer by typing the following:
    Router# no monitor capture buffer holdpackets
    Any help is much appreciated
    Thanks!

    But when i configure the destination as USB0 my pendrive, it fails.
    Could be a bug but I wouldn't recommend configuring the destination as your USB drive because no one has the same luxury as you to have the USB sit there all the time.
    Store to the flash and transfer to USB is probably the best solution.

  • Error in feeding JMF with inputstream, please help

    Hi,
    in order to feed JMF with inputstreams, audioinputstreams actually, you have to modify the DataSource.java and write a custom one so that it accepts inputstreams for the construction of the datasource, because with MediaLocator you can only specify existing files in the hard disk or somewhere in the network.
    Searching I found this ByteBufferDataSource, which allows you to construct a DataSource from a ByteBuffer object.
    The problem is that when using it and trying to send the stream via RTP to another machine, i get the following error:
    Exception in thread "JMF thread: com.sun.media.ProcessEngine@d6a05e[ com.sun.media.ProcessEngine@d6a05e ] ( configureThread)" java.lang.NullPointerException
         at com.sun.media.ProcessEngine.isRTPFormat(ProcessEngine.java:99)
         at com.sun.media.ProcessEngine.reenableHintTracks(ProcessEngine.java:107)
         at com.sun.media.ProcessEngine.doConfigure(ProcessEngine.java:63)
         at com.sun.media.ConfigureWorkThread.process(BasicController.java:1370)
         at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    This error has appeared in some other post, but haven�t found the solution to it, I guess is something to do with the file format.
    So please, I really need your help with this, as I�m getting stuck in a academical project because of this. I attach the bytebufferdatasource
    Thank you for your time,
    bye
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullDataSource;
    import java.nio.ByteBuffer;
    import java.io.IOException;
    import javax.media.MediaLocator;
    import javax.media.Duration;
    import javax.media.Time;
    * @author Chad McMillan
    public class ByteBufferDataSource extends PullDataSource {
    protected ContentDescriptor contentType;
    protected SeekableStream[] sources;
    protected boolean connected;
    protected ByteBuffer anInput;
    protected ByteBufferDataSource(){
    * Construct a <CODE>ByteBufferDataSource</CODE> from a <CODE>ByteBuffer</CODE>.
    * @param source The <CODE>ByteBuffer</CODE> that is used to create the
    * the <CODE>DataSource</CODE>.
    public ByteBufferDataSource(ByteBuffer input, String contentType) throws IOException {
    anInput = input;
    this.contentType = new ContentDescriptor(contentType);
    connected = false;
    * Open a connection to the source described by
    * the <CODE>ByteBuffer/CODE>.
    * <p>
    * The <CODE>connect</CODE> method initiates communication with the source.
    * @exception IOException Thrown if there are IO problems
    * when <CODE>connect</CODE> is called.
    public void connect() throws java.io.IOException {
    connected = true;
    sources = new SeekableStream [1];
    sources[0] = new SeekableStream(anInput);
    * Close the connection to the source described by the locator.
    * <p>
    * The <CODE>disconnect</CODE> method frees resources used to maintain a
    * connection to the source.
    * If no resources are in use, <CODE>disconnect</CODE> is ignored.
    * If <CODE>stop</CODE> hasn't already been called,
    * calling <CODE>disconnect</CODE> implies a stop.
    public void disconnect() {
    if(connected) {
    sources[0].close();
    connected = false;
    * Get a string that describes the content-type of the media
    * that the source is providing.
    * <p>
    * It is an error to call <CODE>getContentType</CODE> if the source is
    * not connected.
    * @return The name that describes the media content.
    public String getContentType() {
    if( !connected) {
    throw new java.lang.Error("Source is unconnected.");
    return contentType.getContentType();
    public Object getControl(String str) {
    return null;
    public Object[] getControls() {
    return new Object[0];
    public javax.media.Time getDuration() {
    return Duration.DURATION_UNKNOWN;
    * Get the collection of streams that this source
    * manages. The collection of streams is entirely
    * content dependent. The MIME type of this
    * <CODE>DataSource</CODE> provides the only indication of
    * what streams can be available on this connection.
    * @return The collection of streams for this source.
    public javax.media.protocol.PullSourceStream[] getStreams() {
    if( !connected) {
    throw new java.lang.Error("Source is unconnected.");
    return sources;
    * Initiate data-transfer. The <CODE>start</CODE> method must be
    * called before data is available.
    *(You must call <CODE>connect</CODE> before calling <CODE>start</CODE>.)
    * @exception IOException Thrown if there are IO problems with the source
    * when <CODE>start</CODE> is called.
    public void start() throws IOException {
    * Stop the data-transfer.
    * If the source has not been connected and started,
    * <CODE>stop</CODE> does nothing.
    public void stop() throws IOException {
    }

    Sorry for the formatting, I attach it again here with well format:
    the error was:
    Exception in thread "JMF thread: com.sun.media.ProcessEngine@d6a05e[ com.sun.media.ProcessEngine@d6a05e ] ( configureThread)" java.lang.NullPointerException
         at com.sun.media.ProcessEngine.isRTPFormat(ProcessEngine.java:99)
         at com.sun.media.ProcessEngine.reenableHintTracks(ProcessEngine.java:107)
         at com.sun.media.ProcessEngine.doConfigure(ProcessEngine.java:63)
         at com.sun.media.ConfigureWorkThread.process(BasicController.java:1370)
         at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    and the java file for generating the datasource from the bytebuffer was:
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullDataSource;
    import java.nio.ByteBuffer;
    import java.io.IOException;
    import javax.media.MediaLocator;
    import javax.media.Duration;
    import javax.media.Time;
    * @author  Chad McMillan
    public class ByteBufferDataSource extends PullDataSource {
        protected ContentDescriptor contentType;
        protected SeekableStream[] sources;
        protected boolean connected;
        protected ByteBuffer anInput;
        protected ByteBufferDataSource(){
         * Construct a <CODE>ByteBufferDataSource</CODE> from a <CODE>ByteBuffer</CODE>.
         * @param source The <CODE>ByteBuffer</CODE> that is used to create the
         * the <CODE>DataSource</CODE>.
        public ByteBufferDataSource(ByteBuffer input, String contentType) throws IOException {
            anInput = input;
            this.contentType = new ContentDescriptor(contentType);
            connected = false;
         * Open a connection to the source described by
         * the <CODE>ByteBuffer/CODE>.
         * <p>
         * The <CODE>connect</CODE> method initiates communication with the source.
         * @exception IOException Thrown if there are IO problems
         * when <CODE>connect</CODE> is called.
        public void connect() throws java.io.IOException {
            connected = true;
            sources = new SeekableStream [1];
            sources[0] = new SeekableStream(anInput);
         * Close the connection to the source described by the locator.
         * <p>
         * The <CODE>disconnect</CODE> method frees resources used to maintain a
         * connection to the source.
         * If no resources are in use, <CODE>disconnect</CODE> is ignored.
         * If <CODE>stop</CODE> hasn't already been called,
         * calling <CODE>disconnect</CODE> implies a stop.
        public void disconnect() {
            if(connected) {
                sources[0].close();
            connected = false;
         * Get a string that describes the content-type of the media
         * that the source is providing.
         * <p>
         * It is an error to call <CODE>getContentType</CODE> if the source is
         * not connected.
         * @return The name that describes the media content.
        public String getContentType() {
            if( !connected) {
           throw new java.lang.Error("Source is unconnected.");
            return contentType.getContentType();
        public Object getControl(String str) {
            return null;
        public Object[] getControls() {
            return new Object[0];
        public javax.media.Time getDuration() {
            return Duration.DURATION_UNKNOWN;
         * Get the collection of streams that this source
         * manages. The collection of streams is entirely
         * content dependent. The  MIME type of this
         * <CODE>DataSource</CODE> provides the only indication of
         * what streams can be available on this connection.
         * @return The collection of streams for this source.
        public javax.media.protocol.PullSourceStream[] getStreams() {
            if( !connected) {
           throw new java.lang.Error("Source is unconnected.");
            return sources;
         * Initiate data-transfer. The <CODE>start</CODE> method must be
         * called before data is available.
         *(You must call <CODE>connect</CODE> before calling <CODE>start</CODE>.)
         * @exception IOException Thrown if there are IO problems with the source
         * when <CODE>start</CODE> is called.
        public void start() throws IOException {
         * Stop the data-transfer.
         * If the source has not been connected and started,
         * <CODE>stop</CODE> does nothing.
        public void stop() throws IOException {
    }

  • How to capture rtp packet??

    Hi,
    can someone plz tell me how to capture rtp packets. And also can u tell me how to remove the rtp header. I want to add another header to the rtp packet. I will be glad if u can also send me some code samples too.
    Thank you in advance.
    bye
    R.Ravi Kiran

    To Capture the RTP Packet all you need to do is listen for a UDP packet on the destination address and you will be able to receive the data. The Data field is by default 256 bytes long (just to let you know).
    So you will send the RTP Packet to Localhost port 4444
    To capture the packet you need to be listening for a UDP packet on that Address
    it would look something like this:
    byte[] buf = new byte[256];
    DatagramSocket socket = new DatagramSocket(4444);
    DatagramPacket packet = new DatagramPacket(buf, buf.length);
    socket.receive(packet);
    then you just have to do what you want with the buf array
    I'm not to sure about the RTP Header I'm working on that as well.. so if I find anything I will let you know.

  • JMF with IPv6

    Hello!
    I am trying to solve the MediaLocator problem wirh JMF and IPv6. I read the solution for JMF with IPv6 allready brought up in this forum and the article 'http://www.ctie.monash.edu.au/DSS-IPv6/jmf-ipv6.htm', but it is not working.
    I checked all hints, and all my IPv6 settings like reverse lookup on my machine... but I still get the message 'Cannot create the DataSink: java.io.IOException: No Valid RTP MediaLocator
    Failed to create a DataSink for the given output MediaLocator' when i try to transmit a rtp stream.
    I am using Linux with working (allready tested), Java 1.5 and JMF2.1.1e
    Does anybody has a suggestion how to solve my problem and how to use JMF with IPv6.
    Thanks
    Adam

    Hello!
    I am trying to solve the MediaLocator problem wirh JMF and IPv6. I read the solution for JMF with IPv6 allready brought up in this forum and the article 'http://www.ctie.monash.edu.au/DSS-IPv6/jmf-ipv6.htm', but it is not working.
    I checked all hints, and all my IPv6 settings like reverse lookup on my machine... but I still get the message 'Cannot create the DataSink: java.io.IOException: No Valid RTP MediaLocator
    Failed to create a DataSink for the given output MediaLocator' when i try to transmit a rtp stream.
    I am using Linux with working (allready tested), Java 1.5 and JMF2.1.1e
    Does anybody has a suggestion how to solve my problem and how to use JMF with IPv6.
    Thanks
    Adam

  • Bundle JMF with application or ask user to install it?

    I have added some video capturing functionality to my application (not an applet).
    Now I am not sure if I should bundle JMF with the application or if I should ask the user to download and install JMF him/herself. Personally I think it is nicer to have extensions like JMF installed so that they are available for other applications as well. But I wonder about the acceptance of users having to download and install something additionally to an application they are interested in.
    Any experiences on that?
    Thanks in advance!
    Torsten

    Ideally, you should support both options. The system should install out of the box
    on standard configurations that you support, with as little extra work as possible.
    However, there should be some way to work around this if JMF is already installed.
    We use IzPack, and so far things have gone ok, but we haven't done anything really
    complicated.
    One tricky bit is that JMF has native libraries. I wanted to have an application that
    needed native libraries to be nothing but an executable jar file, but I couldn't figure
    out how to do it untill I found an article describing how to do this: basically you have
    to copy the dll or .so file from the jar file to a tmp file, and then load it from the tmp file.
    There is a web page somewhere that explains this, but I couldn't find it right away.
    Good luck,
    -- cary

  • I have photoshop C6 on my MAC Pro and want to install it on my new MAC desktop.  I sent the files with AirDrop but photoshop wont open I get an error message that it cant find the Library.  Any thoughts?

    I have photoshop C6 on my MAC Pro and want to install it on my new MAC desktop.  I sent the files with AirDrop but photoshop wont open I get an error message that it cant find the Library.  Any thoughts?

    download the installation files and install using your serial number or adobe id,
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • I'm looking for a capture device that is compatible with Adobe Flash Media Live Encoder. I bought elgato but it is not compatible. Anyone know?

    I'm looking for a capture device that is compatible with Adobe Flash Media Live Encoder. I bought elgato but it is not compatible. Anyone know?

    This is just a shot in the dark....
    Do you have all your devices hooked up (and on) when you launch FMLE?  For example -- your camera or digitizer?  When FMLE launches it will try to launch with the last known settings... including input devices.  If it can't find these devices (they're not hooked up and on) it can crash, although in most situations it will simply show a default screen with default settings.
    If you do have your equipment hooked up (and on) when you launch FMLE, try unplugging them and then launching FMLE so that it opens up in default configuration mode (no input devices selected; all default settings).  Then uncheck the "preview" boxes for both your input and output preview windows.  Close FMLE and then plug in your equipment (and turn it on) and relaunch FMLE.  I offer this suggestion as FMLE can sometimes act funny when the preview windows are open with certain types of input devices.  Don't worry -- you don't have to keep the preview windows off forever.  If you can get FMLE to successfully launch with the preview windows off, then you can set your settings however you like and save the profile.  Then quit and relaunch FMLE and then turn the preview windows back on and see if it works.  If it does, great.  Just be aware that making any settings changes while the preview windows are open could result in FMLE crashing.   Again -- this only happens with some capture devices, such as certain Dazzle capture boxes.
    If none of this works, you could always try to upgrade to FMLE 3.2 and see if that solves your problem.

  • HT2736 I was sent a code with redeem button & I get in a loop of Redeem to Sign in. I never get to redeem the code.  I am already signed in.

    I was sent a code with redeem button & I get in a loop of Redeem to Sign in. I never get to redeem the code.  I am already signed in.  What can I do to solve this?

    Hi kvnkines,
    Welcome to the Support Communities!
    The article below explains how to redeem an iTunes Gift Card.
    The terms and conditions are usually printed on the back of the card.
    If you have a specific question about a card, follow the information in the articles below to contact iTunes Store Support.
    iTunes Store: How to redeem a code
    http://support.apple.com/kb/ht1574
    If you have trouble redeeming your code, this article may help:
    iTunes Store: Invalid, inactive, or illegible codes.
    http://support.apple.com/kb/TS1292
    Cheers,
    - Judy

  • Sent messages problem with 6021

    I have brand new 6021 - the memory of the phone is by default half empty.
    In the settings I have enabled the option of save sent messages.
    However, this does not happen. Simply, sent messages are not saved. Up to only one message is saved - on the sim card. After that, the phone simply does not register sent messages.
    With the inbox, everything works fine.
    I tried reset to factory settings, and other options, but unfortunately nothing is working.
    ANy idea how can I activate this function?? And what might be the cause of the problem?
    Thanks in advance,

    Those message usually indicates, that your in an area with a weak wifi or cellular data signal.  I speak from experience as this is the only I see that message pop up on my phone.

  • JMF with Fobs4jmf:  Problem getting supported formats

    I'm trying to use JMF with fobs4jmf to try stitching together video files into a single file. Fortunately, I found a sample program to do just that in the SDN website (http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/Concat.html).
    I copied and pasted the Concat.java class in a new Eclipse Java class, set up the classpaths, and tested it. (I've gone through the pain of setting up and resetting classpaths so that the JMF diagnostics is able to detect the correct JMF installation in my machine).
    However, in the tryMatch method of Concat.java, I am getting an empty array of Format objects, represented by the "supported" variable, during a call to the following:
    {color:#0000ff}TrackControl tc = pInfo[0].tracksByType[type][trackID].tc;
    Format origFmt = tc.getFormat();
    Format newFmt, oldFmt;
    Format supported[] = tc.getSupportedFormats();
    for (int i = 0; i < supported.length; i++) {
    if (supported[i] instanceof AudioFormat) {
    // If it's not the original format, then for audio, we'll
    // only do linear since it's more accurate to compute the
    // audio times.
    if (!supported.matches(tc.getFormat()) &&
    !supported[i].getEncoding().equalsIgnoreCase(AudioFormat.LINEAR))
    continue;
    {color:#000000}Here's my problem: While on debug mode, I see that the "supported" variable shows an empty array, when I look deeper in the TrackControl tc variable and look the its supportedFormats instance variable, I can see that it has a value. For my testing, I used a .mov file and the supportedFormats variable contains an {color:#0000ff}AudioFormat{color} with the value {color:#0000ff}mp4a, 32000.0 Hz, 16-bit, Stereo, BigEndian, Signed, FrameSize=32 bits{color}.
    {color}
    {color:#000000}I can't get past through this hurdle for now. Why am I getting an empty array of Format objects when the TrackControl tc variable actually contains value in its supportedFormats property?
    I'd appreciate any help on this matter.
    Anthony
    {color}
    {color}

    I again don't have my code in front of me, but I did take a look at the sample code my code is based on...
    Format format = tracks.getFormat();
    if (tracks[i].isEnabled()) {
    supported = tracks[i].getSupportedFormats();
    Just a shot in the dark, but perhaps getSupportedFormats returns the empty set when the TrackControl object is disabled?
    Try enabling the TrackControl before you try to get its supported formats, and see if that changes the behavior in any sort of meaningful way?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • My laptop macbook pro with maverick was working well with AVERTV VOLAR a dongle to capture tv programmes but now with yosemite it does not recognise what options I have

    My laptop with macbook pro with maverick was working fine with a dongle AVERTV VOLARGO to capture tv programmes but now with yosmite it does not recognise what options have

    I also understand that there is particular software 'TRIM' a software introduced by CINDORI SOFTWARE which will disable KEXT SIGNING a security application of YOSEMITE ,Is it the only option or there are any better options for this

  • Every time i sent an email with 1 attachment, the recipient receives my attachment plus ATT00047.htm or some other file. why is that? how do i stop that?

    every time i sent an email with 1 attachment, the recipient receives my attachment plus ATT00047.htm or some other file. why is that? how do i stop that?

    We have the same problem every time we send out an email with attachments.
    BTW, the ATT prefix on every file has nothing to do with you ATT card. It's just the naming convention used by Mail.app for ATTachment.
    Now, can someone tell us how to fix this problem?
    Thanks.

  • Using JMF with JBuilder

    I was trying to use JMF with JBuilder 2005 but didnt know how to configure the libraries. I asked many people but no one could help me. I just found a web site about this problem so i would like to share it with those who are facing the same problem. hope it will help.
    check http://www.computer-logic.net/javafaq/JFAQ_MediaFiles.htm

    put the two jar files,jdom jar and xerces.jar files into the resourec in jbuilder.sorry if i am not clear in the answer.
    cheers

  • Recently I couldn't sent e-mails with photoshop elements.

    Recently I couldn't sent e-mails with photoshop elements 9.
    It has always worked and at once I wasn't unable to use this way to share my photo's.
    I've tried to change the settings, but that didn't work also.
    I've also tried to get a verification-e-mail, but I didn't get  that either.
    What else can I do?

    We took our MacBook Pro to the  apple store, after a long trial and error, they FIXED the  problem!
    It turns out that one of the files was corrupt, it was either Java or Silverlight.
    My suggestion to you is to remove Java than restart and then reinstall Java. See if hotmail works. If not, than, remove Silverlight reboot than reinstall Silverlight.
    For us, it was one of those two files that were corrupt and that was causing hotmail to not be able to send email.
    I'm not sure what the procedure is to remove and reinstall files, all I know is that my wives MacBook can now send email using hotmail.
    Hope this helps.
    Stephen

Maybe you are looking for

  • Issue with game on FB

    I am having a problem with a game I play on FB.  It's called "Treasure Isle'.  The game takes forever to load and when it does it is very slow.  As soon as I right click to get the Adobe player settings panel to come up it freezes the who le browser.

  • Integrate or connect SAP system to non-SAP system

    Hi All, We need to connect SAP system or integrate inspHire rental software to SAP. Do you know the process or initial summary on how to integrate this one? As of now, the only way that we know to integrate SAP to non-SAP for posting is thru LSMW and

  • Question Mark in Quicktime icon

    When I try to play a clip in Quicktime, all I get is a large question mark. Can anyone help? Thanks... Songstan

  • Can't open folders or emails by double clicking mouse

    I can't open folders or emails by double clicking my mouse. I was using a corded Apple mouse, so I switched to a Logitech cordless optical mouse, still can't open them. I can open my folder with command O, but not email. Any suggestions?

  • Accessing "Configuration Model"-classes

    hi, i've created a "Configuration Model" and added some classes to store my data during runtime of a webdynpro-application. but how can i access these classes? the wizard created the objects as interfaces (even if i hadn't selected the option "Interf