Home

Monash Info

News & Events

Campuses and Faculties

Monash University

Centre for Telecommunications and Information Engineering

training

research

staff

consulting

collaboration

projects


IPv6 RTSP/RTP streaming video using Java JMF on Solaris and Linux

ATcrc project 1.1 required a demonstrator application to run over IPv6. Streaming video (like Quicktime (RTSP/RTP/UDP streaming) is one such application. It is possible to stream videos to JAVA equiped clients over IPv6 using Java Media Framework API (JMF).

JMF supports IPv6 for RTSP/RTP streaming much better than most people realise.

If you look back through the JMF mailing lists you will see many people trying to use IPv6 and JMF together. there have been many statements like the following [NOT chosen as an example of something bad, just convieniently found using google search]:
From http://www.cynet.ac.cy/general/IPv6presentations/P/Diaz/Diaz.pdf
T. Gayraud, LAAS-CNRS IPv6 conference, Paris, October 2002 13
"Conclusion : questions about IPv6
Not fully available in high level programming: for instance, JMF (Java) not implemented in IPv6"

Initial investigations at CTIE for the ATcrc 1.2 project showed that the RTP modules supported IPv6.
Java 1.4x is required for IPv6 support

Through a combination of ATcrc sponsored research and B.Technology (computing) Industrial Design project student group work, Java JMF has been shown to successfully request and play videos using IPv6 from both an IPv6 streaming proxy and an IPv6 native Darwin Streaming Server.
This has been done using URL's of the form:
rtsp://streamipv6server.fake.au/darkcityjpeg.mov in JMStudio.

The URL handlers for Java and JMF are a bit fussy, requiring "[]" around IPv6 addresses. This is an accepted way of implementing the use of IPv6 addresses within user interfaces though. Refer to Format for Literal IPv6 Addresses in URL's" RFC2732 also rfc3266 IPv6 support in SDP
Some URL handlers also refused [ff::ff] type of addresses.
URL handling rules within applications like JMStudio explicitly checked for things that prevented the use of explicit IPv6 addresses in URL's.

The JMStudio application used was the precompiled one from the JMF 2.1.1a download from sun. It was run on redhat linux systems with j2sdk 1.4.0 and newer.
Eventually it was discovered that none of the JMF code was required to be modified for IPv6 NATIVE operation!
Some modules had to be recompiled to allow use of the streaming proxy, but once the B.Tech group of studnets had identified the correct classes, the changes were relatively minor.

The following is a quick how-to on using JMF for IPv6 RTSP/RTP streaming.

  1. Ensure that you have DNS global IPv6 address AAAA records for all machines involved and that you have IPv6 routing capability between machines.
    • Alternative to global DNS is to have /etc/hosts with an IPv6 address for each machine in it. Also need to have /etc/nsswitch.conf set to do files first then dns, if you take the alternative approach. eg: /etc/nsswitch will have the line hosts: files dns
  2. Ensure that the machine running JMF can do reverse lookup on its own global IPv6 address:
    The simplest way to do that is to put an entry in /etc/hosts on a linux system if your DNS server doesn't support reverse lookup.
  3. Ensure that you have configured IPv6 on your system. That includes having Java 1.4x installed (j2re) for IPv6 support. For linux refer to the IPv6-howto to install IPv6.
  4. Start JMStudio with the command line option as below:
    java -Djava.net.preferIPv6Addresses=true JMStudio
  5. Installed in the bin directory of JMF (eg: JMF2.1.1/bin) is a script called jmstudio. If you modify the last line of that as below, then you can just call that bin/jmstudio to start with IPv6 turned on (See Linux or Solaris below for some version specific requirements).
    exec java -Djava.net.preferIPv6Addresses=true JMStudio $*
If creating non-DNS based email addresses I believe you can use site local addresses in your /etc/hosts files, but link local may not work.
IPv6 Multicast support has not been tested.

Putting it all together - streaming videos via RTSP/RTP using JMF on an IPv6 network

  • Linux JMF and JMStudio support IPv6 Streaming
  • The linux system used had relatively old software installed JMF 2.1.1a and java 1.4.0.
    > java -version
    java version "1.4.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92) Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
    /etc/hosts
    #
    # Internet host table
    #
    127.0.0.1 localhost
    10.1.1.30 gryphonlinux loghost
    2001:0DB8::12:5ae7 gryphonlinux

    A test program that reports the interface IP addresses reports:
    > java Nets
    Names: ce0 / ce0
    Address: 2001:0DB8::12:1234
    Address: fe80:0:0:0::1234
    Address: 10.1.1.30
    Names: lo0 / lo0
    Address: 0:0:0:0:0:0:0:1
    Address: 127.0.0.1

    A test program that reports the IP address lookup for a hostname [not setting any preferences for java]
    > java simpleipv6 steamipv6server.fake.au
    Address: 10.1.1.30

    Same program with the java.net.preferIPv6Addresses set true:
    > java -Djava.net.preferIPv6Addresses=true simpleipv6 steamipv6server.fake.au
    Address: 2001:0DB8:::0:0:0:4
    Note: Untested but I would expect that the linux systems running latest 1.4.2 java will aslo need the nameservice provider set as per the solaris description below.

  • Solaris JMF and JMStudio support IPv6 Streaming
  • Trials were also conducted using JMF-2.1.1.e on Solaris 8 (SunOS 5.8) using the latest J2SDK-1.4.2-beta
    The packages installed were:
    • j2sdk-1_4_2-beta-solaris-sparc.tar.Z
    • jmf-2_1_1e-solaris-sparc.bin

    java version "1.4.2-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19) Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
    The IPv6 requirements were all satisfied as per the linux description above.

    /etc/hosts
    #
    # Internet host table
    #
    127.0.0.1 localhost
    10.1.1.10 gryphonsol loghost
    2001:0DB8::12:5ae7 gryphonsol

    A test program that reports the interface IP addresses reports:
    > java Nets
    Names: ce0 / ce0
    Address: 2001:0DB8::12:5ae7
    Address: fe80:0:0:0::5ae7
    Address: 10.1.1.10
    Names: lo0 / lo0
    Address: 0:0:0:0:0:0:0:1
    Address: 127.0.0.1

    A test program that reports the IP address lookup for a hostname [not setting any preferences for java]
    > java simpleipv6 steamipv6server.fake.au
    Address: 10.1.1.20

    Test program run again with appropriate IPv6 helper preferences (note: should be one very large line)
    > java -Djava.net.preferIPv6Addresses=true -Dsun.net.spi.nameservice.provider.1=dns,sun
    simpleipv6 steamipv6server.fake.au
    Address: 2001:0DB8:::0:0:0:4

  • Mac OS X 10.3 - Yes, Java and JMF can use IPv6 - using preference as above
  • MS Windows XP - Yes, Java and JMF can use IPv6

Other java based RTSP/RTP systems including the IBM MPEG4 toolkit also work with IPv6 if you set the preferences as above.

Other ATcrc projects at Monash CTIE

Using IPv4
Monash University ABN 12 377 614 012
Copyright © 1994-2002 Monash University - Last Date Modified: 07 October 2004 - Caution

Help Contacts Site Map Staff Directory Search