Flash vs Java for Streaming Video

Discussion in 'Programming' started by projectshifter, Jun 26, 2007.

  1. #1
    I'm about to start on a site that will record video/sound from a user (via webcam and microphone), occasionally multiple users and run them simultaneously (for karaoke) and show them to all the users currently watching, and recording them on the server. I was trying to do some research on whether it would be better to write this application with flash and a flash communication server, or writing a java applet and server to handle all of this. I've seen a few pros and cons, but nothing really conclusive and very few articles on the specific subject. The market shares for Flash vs Java are almost identical so it's not a matter of what reaches more viewers, Java is actually a little more far reaching for 64bit sytems, my main concern is speed (or lag rather).

    I'm wondering if using Flash is going to be slower and lag more when relaying all the data between client->server-->clients on a real time basis. If two people are recording something together, if they're seeing eachother on a delay, it undermines the entire process. I'm slightly concerned that flash being a higher level language will be a lot slower than if I wrote a server and an applet in Java to handle it all. There is also the concern later of flash storing as flv, so larger file sizes and lower quality in general, but with Java there are a lot more options and I could build in specific plugins and formats if needed.

    I'm capable of writing this in both languages, although i'll have to do a little extra research into video and audio capture in java, but the rest is not an issue. I actually kind of hate flash, not a big fan of java either, but I think a Java applet might be able to handle it, but I have no real working knowledge of how either would hold up in a high traffic environment, most of what I do is php/mysql/javascript under heavy loads with a flash video player or so, I'm not really sure how this type of application would be able to support it all. Any insight would be much appreciated, gracious :)
     
    projectshifter, Jun 26, 2007 IP
  2. ProgrammersTalk

    ProgrammersTalk Peon

    Messages:
    684
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I personally would prefer to combine them together. I'm not sure on how exactly you do this, but I know that it's possible because my Professor had a research too for his PhD degree about Traffic detection by using Flash + Java :) indeed, he passed his dessertation and received his degree about 1 month ago...
     
    ProgrammersTalk, Jun 26, 2007 IP
  3. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Doing both is just a hassle, twice as much work and I won't be receiving twice the pay from the client, so not really feasible. Plus it really doesn't make as much sense, so I need to either decide to do it in flash with a flash communication server, or write a java server program and a java applet.
     
    projectshifter, Jun 26, 2007 IP
  4. daringtakers

    daringtakers Well-Known Member

    Messages:
    808
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Do u plan to develop an applet which will capture video from users cam and tht send it to server?

    Note: applets can't capture video from users cam. applets runs within securitumanager of users VM (virtual machine). applets are not allowed to access users machine. they even cant open socket connections.

    If u want ur applet to capture video from users cam thn u wil hav to sign tht applet (trusted applet) for tht u may hav to buy digital certifiate from an authority like verisign or thawte. one more thing is, user must accept ur applet as trusted applet.

    any way, if u want any kind of help, let me know....
     
    daringtakers, Jun 27, 2007 IP
  5. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I haven't done a lot with video capture on Java, thanks for the heads up there, an ssl cert won't be that big of a deal to get, godaddy has them for 10 or 20 bucks, although I've never quite understood why purchasing a certificate my linux box can generate makes it more secure ;) Any thoughts on performance differences in doing it via a java applet or in flash?
     
    projectshifter, Jun 27, 2007 IP
  6. ProgrammersTalk

    ProgrammersTalk Peon

    Messages:
    684
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6

    haha, not really, I just asked today to him on how exactly it works. It's basically ActionScript connects to Server (written on Java) and then the logic is from Server :)
     
    ProgrammersTalk, Jun 27, 2007 IP
  7. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    With a java applet you have it connect to a server (most likely written in java as well), but with a flash server you have it connection to a flash communications server.
     
    projectshifter, Jun 27, 2007 IP
  8. PooPoly

    PooPoly Peon

    Messages:
    404
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #8
    FlV is better for streaming Video like youtube

    PooPoly
     
    PooPoly, Jun 27, 2007 IP
  9. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    YouTube isn't streaming video, but yeah it's good for easily playing videos in a cross-browser/os environment, but I'm not trying to just display videos on a user's computer, I need to capture video and audio, encode, and then play it back to them, which is a very different thing than just playing a video. The user also needs to be able to download the video when done, but there are ways to convert flv into a generally usable format.
     
    projectshifter, Jun 27, 2007 IP