2

Can you tell me the best solution today to make an applet that plays mjpeg/divx/h.264. I need it to work on systems without installing any additional software (like jmf).

The client simply goes to a web page, loads the applet and sees the video stream/file.

Thanks for any help.

Radu Gancea
  • 773
  • 10
  • 19
  • 1
    Any reason you do not want to use a Flash player? – Thorbjørn Ravn Andersen Jun 18 '11 at 17:00
  • 1
    Xuggler is a good way to render these formats. However it's dependent on nativecode so it will not work unless you install it on all your targets. – jontro Jun 19 '11 at 00:05
  • @Bengt: Natives for applets became a lot simpler to use when the Plug-In 2 architecture 'next generation' JRE was released (Sun's 1.6.0_10). Plug In 2 allows embedded applets to be launched using JWS. Everything needs to be digitally signed, but otherwise, JWS makes it a breeze to add natives to the run-time class-path of an app. @TRA I agree. Java is not at the 'cutting edge' of media handling. Flash is a much simpler option. @OP Is the H264 not negotiable? H261/263 does not do it for your app.? – Andrew Thompson Jun 19 '11 at 09:47
  • @Andrew T.: mjpeg/divx are the most important. I want to use only java (no actionscript ..) and not flv. My project is a DVR Applet. @Bengt: Xuggler doesn't work for Applets unfortunately. – Radu Gancea Jun 19 '11 at 16:46
  • related question: http://stackoverflow.com/questions/5277921/playing-video-in-java – Warren P Jul 14 '11 at 16:56

1 Answers1

0

Are you looking to just serve content or have something like a player in a web browser where the user can select their files (or something along those lines?) Because if you're just serving the content, the best way would be to convert it to FLV on the server side using something like ffmpeg and then just use a flash player. If you don't want to use flash, HTML5 video would also be an option.

If you definitely want to go down the applet route, then you could wrap up something like VLCj in an applet and use that. You'll need to include libvlc.dll/so, and you'll need to make sure it's signed, but if you do that it should work.

Michael Berry
  • 70,193
  • 21
  • 157
  • 216