• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

playing video java

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application in which i want to embed a video inside the swing component. I am trying to figure out the best way to play video, I have looked at JMF but am having problems with it not having the right codec for files i can play with vlc, or mplayer. I noticed that vlc does provide ways to embed their player in a java application but can not get it to work, and have not been able to find any resources on the web. I am getting errors with the bindings i believe, any help or suggestions on the best way to play video would be appreciated. I would like to be able to do so in linux and win.

thanks,
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did this once using JMF. I noticed that I could play everything that my Windows MediaPlayer could play. So on Windows I suppose it uses that Windows Media Player.
Does the video you are referring to play in WMP? Maybe that is your problem.

I suppose the VM on Linux should map the JMF calls to the correct player too but I have never tried that.

As for VLC! I integrated it once in an HTML page using an activex control and that worked perferctly (I addressed it using javascript) but never integrated it in a Java app.
 
Brandon Broschinsky
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply, I am using some .avi files from my digicam, and they play fine using wma, mplayer, etc. but JMF says that the header is the wrong size something about only being 48 when 52 was expected, i'm not at that machine right now. When using vlc, I am trying to use the JVLC bindings. But is says that i do not have jvlc in my java path, i have tried compiling them but still have errors, I would prefer to go with JMF as that will allow my application to be more os independant. Any help on how you used vlc in your app would be appreciated.

thanks,
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the JVLC error you need to add jvlc in your java.library.path
You can do this by passing it to the java command
eg.
java SwingClient -Djava.library.path=D:\jvlc
 
It's a tiny ad only because the water is so cold.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic