This discussion is archived
6 Replies Latest reply: Jul 1, 2011 7:22 PM by 869655 RSS

Does JMF support audio PCMA or PCMU codec?

869655 Newbie
Currently Being Moderated
Hi experts,

The first thing I must say that I'm really not good at audio/video/codec field, so I'm not sure I can use the term exactly. Please correct me if any mistakes.

I use JMF and make a desktop application to record my voice, and packetize to RTP packet formatted with ULAW_RTP, GSM_RTP or Gxxx_RTP before sending them to my other android application. My Android app supports two codecs - PCMA and PCMU, and it cannot understand those packets sent from the desktop one.

So I wonder if I can use JMF to create RTP packet which is understandable for Android. Does anyone experience on this problem?



Thanks,
H

Edited by: 866652 on Jun 17, 2011 8:56 AM
I must correct something after reading several lovely complains of Andrew Thompson :-)
  • 1. Re: Does JMF support audio PCMA or PCMU codec?
    793415 Pro
    Currently Being Moderated
    866652 wrote:
    ..Edited by: 866652 on Jun 17, 2011 8:56 AM
    I must correct something after reading several lovely complains of Andrew Thompson :-)
    Huh?
  • 2. Re: Does JMF support audio PCMA or PCMU codec?
    869655 Newbie
    Currently Being Moderated
    Andrew Thompson wrote:
    866652 wrote:
    ..Edited by: 866652 on Jun 17, 2011 8:56 AM
    I must correct something after reading several lovely complains of Andrew Thompson :-)
    Huh?
    Before posting this queestion, I also read and searched some topics but no any related one. Moreover, I met your complain about the way of posting a question, so I decided to edit my post to avoid your asking.

    H
  • 3. Re: Does JMF support audio PCMA or PCMU codec?
    captfoss Pro
    Currently Being Moderated
    At the bottom of this document,
    http://www.oracle.com/technetwork/java/javase/formats-138492.html

    There is a list of RTP formats you can use JMF to create.

    Of the three you listed specifically, JMF is capable of sending and receiving all three: ULAW_RTP, GSM_RTP, and G723_RTP (assuming the xxx was a placeholder for any numbers).
  • 4. Re: Does JMF support audio PCMA or PCMU codec?
    869655 Newbie
    Currently Being Moderated
    Thanks captfoss for your reply.

    I tried to capture the packet from Android to PC and PC to Android, their payloadtype's value is the same, in this case is 0. But Android can not undersatnd it, and in addition, their ULAW packet's size is also different, from Android -> PC (PC can understand) is 172 but the one from PC->Android is 492 (???). I'm not sure that this problem is not entirely from JMF but I also ask another guys on Android area but have not received any answer about this.

    HTS
  • 5. Re: Does JMF support audio PCMA or PCMU codec?
    captfoss Pro
    Currently Being Moderated
    hoangtuansu wrote:
    their payloadtype's value is the same, in this case is 0. But Android can not undersatnd it, and in addition, their ULAW packet's size is also different, from Android -> PC (PC can understand) is 172 but the one from PC->Android is 492 (???).
    Things like sample rate, sample size, number of channels, etc will affect the packet size. Additionally, mobile devices may very well have a lower MTU than a normal machine, so that can affect it too.

    Even then, there's nothing saying how big an RTP packet should be, how many encoded samples it should hold, etc. So it could be a simple as the PC packing more data per packet.

    Most likelly the issue is that Android is 0-4 years old, whereas JMF is 12 years old... so it's almost definately using different versions of the RTP standard.
  • 6. Re: Does JMF support audio PCMA or PCMU codec?
    869655 Newbie
    Currently Being Moderated
    Thanks captfoss! It's very kind of you to help me. Finally, I fixed that by changing several parameters in my system :)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points