简体   繁体   中英

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 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM