开发者

How to upload and stream flash videos using java?

开发者 https://www.devze.com 2023-01-28 22:47 出处:网络
I want to create a html page that can be used to upload videos and also able to playback the videos. I am totally new to this. 2 weeks before only i learnt uploading and processing images. So, i need

I want to create a html page that can be used to upload videos and also able to playback the videos. I am totally new to this. 2 weeks before only i learnt uploading and processing images. So, i need some guidelines like

  • How to upload video?
  • what concepts i have to learn?
  • what are all the libraries i may require?
  • How to convert it into flash f开发者_Python百科ormat?
  • How to stream it back to user?

I am using Java in server side!

And i also want to know that Is there any way to do them all with AJAX?

Any suggestions or advices or links or anything that can help me would be more appreciative!!!

Thanks in Advance!


Hmmm... seems interesting..

How to upload video?

Well it depends.

  1. If you are using a thick client (aka swing or swt) then you can use Apache Commons File Uplaod API.
  2. For JSP http://www.roseindia.net/jsp/file_upload/index.shtml
  3. With JSF - (http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html and http://onjava.com/pub/a/onjava/2005/07/13/jsfupload.html)
  4. With AJAX - http://www.openjs.com/articles/ajax/ajax_file_upload/ (basic example but enough to guide in right direction :))

what concepts i have to learn?

  1. As a library integrator you will need to know about the front end technology you are going to use (JSF, JSP or PHP etc)
  2. You should know about basic of multimedia handling in java (sometimes help in debugging)
  3. Basic of flash video (specially how streaming works in internet video http://blog.xuggle.com/2009/01/23/overly-simplistic-guide-to-internet-video/ )
  4. Assuming you already know about servlets etc.
  5. Have a look at HTML5. It has some great offerings like video playback etc.

what are all the libraries i may require?

Again depends

  1. IF choosing javascript for front end + AJAX in mind http://jqueryui.com/ or http://jquery.com/
  2. IF JSF is the choice for front end - http://www.jboss.org/richfaces or http://www.primefaces.org/ along with JSTL etc
  3. You will need a library like http://www.xuggle.com/xuggler/

Xuggler is the easy way to uncompress, modify, and re-compress any media file (or stream) from Java. Xuggler is available under the GNU Lesser General Public License.

Most of the Flash video sites either use xuggler or FFMpeg for conversion and playback.

How to convert it into flash format?

Use Xuggler http://www.xuggle.com/xuggler/. It uses the FFMpeg http://www.ffmpeg.org/. Though you have to use at server side for conversion (As of now you can not use it in applet). Refer to http://wiki.xuggle.com/Tutorials for more information.

How to stream it back to user?

I normally do it in this fasion.

<embed height="385" width="640" type="application/x-shockwave-flash" src="http://s.ytimg.com/yt/swf/watch_as3-vflofTU0v.swf" id="movie_player" flashvars="rv.7.length_seconds=107&amp;rv.2.thumbnailUrl=http%3A%2F%2Fi4....." allowscriptaccess="always" allowfullscreen="true" bgcolor="#000000">

I hope it will help you :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号