Skip to content
Advertisement

How to run VLC stream on Linux server using Java code?

I am trying to run vlc stream from my Java code on Debian server. Simple commands as given in the example below works fine both from java code as well as terminal.

JavaScript

But I try to run more advanced command with multiple options”

JavaScript

This is my main class:

JavaScript

and this is class for executing shell commands:

JavaScript

Process in Linux is created, but the stream is I will say “offline”, because I cannot connect and get it. Executing the same command directly from command line in Linux works and creates stream.

Any ideas?

Advertisement

Answer

You should use VLCJ instead of calling vlc by shell.

http://www.capricasoftware.co.uk/projects/vlcj/faq.html

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement