Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Audio/Video streaming Codecs and Protocols

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia 3250, Nokia 6600
Created: senthilkumar05 (28 Dec 2007)
Last edited: hamishwillee (06 Sep 2013)


RTSP protocol

If mobile device supports RTSP (Real Time Streaming Protocol), it is possible to stream the video from the server, and play using the Real Time Player.

For Instance, YouTube web site for mobile devices provides video streaming services

We can browse the site and we can select the video, Once if we click "watch video" it will start invoking the "Real Player" and start playing the video in the real time. The RTSP protocol URL is something like this:


We did the test run in Nokia 3250, by accessing the YouTube site for mobile. It starts playing using the real player.

The Same test run we did in Samsung D900i, it failed to stream, and throws "Malformed URL Exception" Since this mobile dont support the RTSP protocol.

So, it is depend up on the protocol supported by the mobile devices.

Streaming in Java ME Application

For J2ME Application also it is possible to stream the video if the mobile supports RTSP. We can stream the video using the "platform request" method which is available in MIDP. For Instance:


(1) We have to gather the information about the protocols supported (RTSP) for the mobiles we are targeting. Some mobile phones wont supports RTSP protocol. For example:

  • Samsung SGH D900i
  • Nokia 6600
  • Nokia 6270

(2) We have to gather the information about the video file formats supported by the mobile devices.

Protocols used for mobile streaming with Java ME platform

  1. RTSP—Real Time Streaming Protocol - RTSP is a control protocol
    • Play, Pause, Stop
    • It is always used with a data transport protocol
    • RTP—Real-time Transport Protocol
    • Can be delivered via UDP or TCP
    • 3GPP specifies UDP transport for RTP
  2. HTTP
    • Protocol underlying the Web, may also be used for streaming
    • TCP transport
    • Control and data on the same connection
    • Non-standard for streaming
    • Most implementations of MMAPI have problems with HTTP streaming
    • Entire clip is buffered prior to playback

Audio Codecs for Streaming:

  1. RealAudio
    • Good quality at 48-64Kbps
    • Much better than mp3 at same bitrates
  2. AMR
    • Widely implemented voice codec
    • Standardized by 3GPP
  3. AAC/aacPlus
    • Great quality across range of mobile bitrates
    • Standardized by 3GPP

Video Codecs for Streaming:

  1. RealVideo
    • Proprietary codec from Real
    • Low cost licensing
    • Great quality across a wide range of bitrates
  2. H.263
    • Widely implemented, but lower quality
    • Standardized in 3GPP PSS
  3. MPEG-4
    • Similar to H.263
    • Standardized in 3GPP PSS
  4. H.264 (MPEG-4 AVC)
    • High quality codec
    • Starting to see implementations accessible from Java ME platform
    • Standardized in 3GPP PSS

Limitations of Multi Media API (JSR 135) Implementations:

  • Codec support differs from handset to handset
  • Implementations may incorrectly report what is supported
  • Behaviour differences
  • Volume often not mapped to system volume
  • Player events not always reported
  • HTTP streaming not widely supported
  • No access to the data stream
  • Precludes things like decryption at Java technology layer

Note.pngNote: Most of the mobiles support JSR 135( Multi Media API),
JSR 234 (Advanced Multimedia API) and JSR 184( 3D Graphics API) are not supported by most of the mobiles.

Practical Issues

  • Server must be accessible to the handset (Internet)
  • Problems with carrier firewalls
  • Carrier must allow RTSP traffic (port 554)
  • Carrier must allow streaming of UDP traffic
  • Streaming charges can really add up!
  • Client side debugging is tricky
This page was last modified on 6 September 2013, at 02:57.
133 page views in the last 30 days.