Use Xuggle in Java to trancode and streaming video/audio
I create an HTTP streaming server, but the clients can not play all video formats, so my question开发者_StackOverflow社区 is, if there is a way, using xuggle in the server to transcode the video in a specific format and streaming it directly, on the fly.
I mean, not have to wait to finish the transcoding and then start the http streaming. I mean that I have a loop for example and get everytime a number of transcoded bytes and writes them to the socket.
Yes, but...
I'd not recommend taking this approach. Encoding videos is generally very CPU intensive. The generally accepted aproach to solving this problem is to transcode the video file off-line and store on the streaming server. Yes, that means a couple of different media files with the same video, but it scales muuuuuuuuch better. Most (all?) successful streaming servers do it this way.
精彩评论