This discussion is archived
2 Replies Latest reply: Apr 26, 2009 11:23 AM by 807588 RSS

How to stream audio / video in java?

807588 Newbie
Currently Being Moderated
Hello.

I would live to develop a java application (JavaEE, with tomcat or JBoss) that could stream audio / video over the Internet, on a controlled matter.
First, I would have to embed a flash player, correct? Need suggestions on one, paied or free.

My questions are: How can I have the flash player stream audio to users by downloading it from a java app server, if the user has a session and is logged in, etc? (picture myspace here)

Also, how do I measure network traffic in Java? (The flash player of each user will stream the songs, I'd like to know how much bandwith is going around).

The reason that I'm asking this here is because I have no idea of which forum to ask this.

I have been a Java app developper for the past five years, so coding won't be a problem, I just don't know which API / Frameworks to turn to.

Thanks for all your help.

Regard,
Carlos.
  • 1. Re: How to stream audio / video in java?
    800396 Newbie
    Currently Being Moderated
    Maybe this may give you heads up into this. [Java Audio and Video Stream|http://www.onjava.com/pub/a/onjava/excerpt/jenut3_ch17/index.html]

    Thanks,
    Thiago Santana
  • 2. Re: How to stream audio / video in java?
    807588 Newbie
    Currently Being Moderated
    ragedd wrote:
    First, I would have to embed a flash player, correct?
    No. You're just taking ideas from other popular streaming sites. It's certainly not a requirement.
    My questions are: How can I have the flash player stream audio to users by downloading it from a java app server, if the user has a session and is logged in, etc? (picture myspace here)
    The same way you would authenticate any website. Usually a database and a challenge/response. If they're not logged in, then instead of writing out the content, write out a 403 status code (or do something more graceful, such as redirect them to the login page).
    Also, how do I measure network traffic in Java? (The flash player of each user will stream the songs, I'd like to know how much bandwith is going around).
    Just keep track of how much data you send to the OutputStream.