3

I'm working on a VLC project for myself. My goal is to create an HTML front end to start a stream. I am doing this through the use of Java Servlets.

Overview: Ubuntu 13.04, Java 7-21 : IcedTea 2.3.9, Eclipse JAVAEE IDE, Tomcat 7

I am trying to start a VLC HTTP video stream using this call.

vlc -vvv /home/jca310ms/Videos/test.avi.flv \
    --sout '#transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}:std{access=http,mux=flv,dst=0.0.0.0:8081/stream.flv}'

Now, this call does work from the command line. However, when it is run using :

String args = "vlc -vvv /home/jca310ms/Videos/test.avi.flv --sout '#transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}:std{access=http,mux=flv,dst=0.0.0.0:8081/stream.flv}'";
Runtime runtime = Runtime.getRuntime();
Process p = runtime.exec(args);

I get these errors from the output:

err: [0x7ff2d8000b78] main input debug: Creating an input for 'test.avi.flv'
err: [0x7ff2ac001108] main stream output debug: using sout chain=`standard{mux="",access="'#transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}",dst="std{access=http,mux=flv,dst=0.0.0.0:8081/stream.flv   }'"}'
err: [0x7ff2ac001108] main stream output debug: stream=`standard'
err: [0x7ff2ac0014f8] main stream out debug: looking for sout stream module: 1 candidate
err: [0x7ff2ac0014f8] main stream out warning: missing value for option mux
err: [0x7ff2ac0014f8] main stream out debug: set config option: sout-standard-access to '#transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}
err: [0x7ff2ac0014f8] main stream out debug: set config option: sout-standard-dst to std{access=http,mux=flv,dst=0.0.0.0:8081/stream.flv}'
err: [0x7ff2ac0014f8] stream_out_standard stream out error: no mux specified or found by extension
err: [0x7ff2ac0014f8] main stream out debug: no sout stream module matching "standard" could be loaded
err: [0x7ff2ac0014f8] main stream out debug: TIMER module_need() : 1.743 ms - Total 1.743 ms / 1 intvls (Avg 1.743 ms)
err: [0x7ff2ac0014f8] main stream out debug: destroying chain... (name=(null))
err: [0x7ff2ac0014f8] main stream out debug: destroying chain done
err: [0x7ff2ac001108] main stream output error: stream chain failed for `standard{mux="",access="'#transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}",dst="std{access=http,mux=flv,dst=0.0.0.0:8081/stream.flv}'"}'
err: [0x20dd928] main playlist debug: finished input
err: [0x7ff2d8000b78] main input error: cannot start stream output instance, aborting
err: [0x20dd928] main playlist debug: dead input
err: [0x20dd928] main playlist debug: changing item without a request (current 0/1)
err: [0x20dd928] main playlist debug: nothing to play

Any ideas what might be causing the difference between vlc ability to start the stream through console, but not being able to start the stream using runtime.exec()?

Any and all help is well appreciated!!!

1
  • 4
    I solved the issue by removing the single quote starting from '#transcode and }'. Apparently this is necessary when using console, but not necessary as the command was stored as a string in Java Aug 13, 2013 at 6:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.