• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Executing VLC in Java swing

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone. I'm not really sure whether this topic is appropriate in this forum. Please pardon me if I'm wrong.

I'm currently able to play media files using VLC in my swing program. However, it isn't working out as I wanted it to be. I'm hoping that anyone who has been using VLC in their program/project can help me understand why or how can I resolve this.

I'm building a GUI program that allows user to open and play media files(eg. movie file, music files). If its a music file, the player will not be visible and the music will play in the program UI without being noticed.

I've managed to do this by adding some command lines for it to work through Terminal*.

*Terminal*


When I tried to make it as executable and run in java swing, It isn't running like in the Terminal. While running the program, the music will be played but with the player visible.

Attached below is the code that I've placed in my program.


Attached in song1.sh file is exactly the same command line that I've used in Terminal*.

I'm using:
Fedora Core 6
VLC media player 0.8.6a
Eclipse 3.2

Thanks in advance.

Adrian Lee
[ July 20, 2007: Message edited by: Adrian Lee ]
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all I have to say that I do not have an immediate solution for your problem.

I am wondering however why you are not using the Java API for VLC (JVLC). Maybe this will help you to have some more control over VLC.

But if you really want to do it like you are doing at the moment, some questions come to mind. Have you tried running the .sh script itself (without java program)? Does it work correctly?

Have you tried using the runtime without the .sh script? You can also execute the vlc command directly, maybe that solves the problem.

Sorry that I cannot be more helpful.
 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Manuel. Thanks for the reply.

Sorry, I don't quite understand the installation/usage of JVLC. I've downloaded the file "org.videolan.jvlc-0.9.0-20070225-linux-x86_64.jar" from http://trac.videolan.org/jvlc/wiki/download and extracted it but I don't quite understand how it works.

I've found another way to start the vlc player to play in the background. However, I've no control over it as it's using a dummy interface.

// in .sh file
vlc -I dummy --key-quit='ESC' mms://164.78.247.23/music1.wma

Will be grateful if you can give me any links that can help me understand more on JVLC.

I'm still looking for ways to play music files hidden and controlling of the player..
 
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
Hello Adrian,

Take a look at the following link for an example on how to use JVLC.

JVLC example

Again, I have only played with JVLC for a short while. I'am not sure that it fits your needs. But it seems interesting!
 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Manuel. I will look on that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic