Jump to content
streaming video online - j2ee
Asked by msayed_asm
Posted Nov 12 2009 04:42 AM
i am working in a project using j2ee application, where the customer can watch video online where the video size is bigger than 700MB , my application hosted under Tomcat container and video file shared using IIS (i have a huge video size )
i am using media object to play to video inside the jsp page , but ir's very slow where the file downloaded first in the client machine
could you please help me how to stream these video (i have not good experience in this topic)
Answered by bmclaugh
Posted Nov 16 2009 05:02 PM
Unfortunately, streaming video by hand -- using your own custom-rolled JSP or servlet or whatever -- is almost impossible to get right. More importantly, it's not very stable. If you're looking to provide even moderate professionalism, you're going to need a commercial solution.
Better yet, why not use a video hosting service like vimeo.com or blip.tv? You can easily embed the code to show your video, or create the HTML in your code. Better yet, the Vimeo player is pretty straightforward, and you could build a simple JSP to serve up videos in your own preferred size by just passing in the ID of the video on Vimeo.
Basically, my answer is this: don't reinvent the wheel. There are lots of good wheels out there, just build your chassis on top. Okay, yes, the metaphor breaks down. But you get the idea.
By the way, I vastly prefer Vimeo to any other service. It's really not even close.
O'Reilly Media, Inc.
Answered by m_reese
Posted Nov 23 2009 04:52 PM
You'll also want to work on that file size. That is an enormous file to try to deliver. There are many ways to compress your video pretty substantially without compromising your quality.
When I upload videos (that originally weigh in at around 2GB) to Vimeo, I simply run it through Compressor and compress it with H.264. I try to target my bit rate anywhere from 3000-5000 kbps. Keep in mind, thats for live video of people, so I need the detail. The less detail you need, the more you can compress without it looking like it belongs on YouTube.
Comment by msayed_asm : Nov 24 2009 05:34 AM
thanks alot for your reply , actually this mainly intranet project contain server education material , so we could't save the file outside
what about using flv file , is flash player support auto stream??