Xuggle can handle many different video formats. What I am thinking about is to wrap the Xuggle into Swing component, and make a start/pause button and a progress bar on the top of it. Any suggestions? Sample codes would be great.

MyDreamGirl

> Any suggestions?
Sure, start reading their tutorials on the site.

I did. However, it does not work when I tried to wrap Xuggle into a Swing component. If you have done that before, please share your knowledge with me. Thanks,MyDreamGirl

This example app from the tutorials seems applicable:
http://xuggle.wordpress.com/2009/01/23/how-to-use-xuggler-to-decode-and-play-video/

They are updating a VideoImage frame with a BufferedImage from the stream. VideoImage just extends JFrame, so you could probably either look at that source or override paintComponent(Graphics) on a JPanel of your own and render the BufferedImage on that panel with drawImage().

It works. Thanks.

DO you know how to do volume control? Any tutorials?

When I do the tutorials you mentioned (DecodeAndPlayVideo.java and VideoImage.java), there is not sound. Do you know how to add sound into it?

There is 3 methods to decode audio and/or video :
- DecodeAndPlayVideo
- DecodeAndPlayAudio
- DecodeAndPlayAudioAndVideo

They are all in : com.xuggle.xuggler.demos

DecodeAndPlayAudioAndVideo wraps all thing together and leaves no room for custmozing Swing component. I am looking into combining video and audio, any other code that has already done the job? Thanks,

Got it to work. Thanks a lot for your help.

I got my application running fine against .mov, .mp3 and .flv. However, when I ran it against .avi file, it poped up following error:

JVMDUMP006I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" - please wait.
JVMDUMP032I JVM requested Snap dump using 'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\Snap.20111025.134539.12108.0001.trc' in response to an event
JVMDUMP010I Snap dump written to C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\Snap.20111025.134539.12108.0001.trc
JVMDUMP032I JVM requested Heap dump using 'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\heapdump.20111025.134539.12108.0002.phd' in response to an event
JVMDUMP010I Heap dump written to C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\heapdump.20111025.134539.12108.0002.phd
JVMDUMP032I JVM requested Java dump using 'C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\javacore.20111025.134539.12108.0003.txt' in response to an event
JVMDUMP010I Java dump written to C:\Users\xh2453\IBM\rationalsdp\workspace_70\TestWebAppl\javacore.20111025.134539.12108.0003.txt
JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError".
Exception in thread "main" java.lang.OutOfMemoryError: Failed to create a thread: retVal -1073741830, errno 12
at java.lang.Thread.startImpl(Native Method)
at java.lang.Thread.start(Thread.java:887)
at com.test.xuggle.fileconvert.DecodeAndPlayVideo$VideoAudio.setAudio(DecodeAndPlayVideo.java:473)
at com.test.xuggle.fileconvert.DecodeAndPlayVideo.playJavaSound(DecodeAndPlayVideo.java:453)
at com.test.xuggle.fileconvert.DecodeAndPlayVideo.<init>(DecodeAndPlayVideo.java:233)
at com.test.xuggle.fileconvert.VideoPlayer.main(VideoPlayer.java:7)


Any suggestions?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.