Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Trying to figure out a way to start an instance of VLC from the command line to stream 3 displays on a Win7 box. We can start an instance of each one individually, and connect to each (though not at the same time, hence the need for 1 instance; we are assuming this will fix it).

Constraints & progress thus far:

  • HTTP stream/connect method with authentication = working individually
  • Same IP and Port (192.168.x.x & 8181 respectively) = working individually
  • Different paths (/screen1, /screen2, /screen3) = working individually
  • Running separate instances using multiple IP's and/or NIC's = works as alt solution; not desirable as final solution

Sample cmd string for primary monitor with local display option (nothing fancy):

vlc screen:// :screen-fps=20.000000 :live-caching=300 :sout=#transcode{vcodec=MJPG,vb=800,fps=20,scale=0.5,acodec=none,user=admin,pwd=admin}:duplicate{dst=http{mux=mpjpeg,dst=:8181/screen1},dst=display} :sout-keep

Sample cmd string for second monitor with local display option:

vlc screen:// :screen-fps=20.000000 :screen-width=1600 :screen-height=900 :screen-top=-900 :screen-left=-1280 :live-caching=300 :sout=#transcode{vcodec=MJPG,vb=800,fps=20,scale=0.5,acodec=none,user=admin,pwd=admin}:duplicate{dst=http{mux=mpjpeg,dst=:8181/screen2},dst=display} :sout-keep

Again, is there a way to combine them into same cmd string, resulting in 2+ streams (1 for each monitor/display), within said instance? Started looking at VLM and MOSAIC, but seemed overkill? Stuck for the moment.

share|improve this question
add comment

1 Answer

VLM is the way to go for multiple streams.

Here is a guide from the VLC docs on how to do multiple streaming. I created two streams, both with the input of screen:// and the output being:

#transcode{vcodec=MJPG,vb=800,fps=20,scale=0.5,acodec=none,user=admin,pwd=admin}:duplicate{dst=http{mux=mpjpeg,dst=:8181/screen1},dst=display}

Obviously with a different URL path for the different streams.

To add the screen options on the second and third screens use the setup option command.

Here are all of the commands I issued to make it work on my machine:

new Screen1 broadcast enabled
setup Screen1 input screen://
setup Screen1 output #transcode{vcodec=MJPG,vb=800,fps=20,scale=0.5,acodec=none,user=admin,pwd=admin}:duplicate{dst=http{mux=mpjpeg,dst=:8181/screen1},dst=display}

new Screen2 broadcast enabled
setup Screen2 input screen://
setup Screen2 output #transcode{vcodec=MJPG,vb=800,fps=20,scale=0.5,acodec=none,user=admin,pwd=admin}:duplicate{dst=http{mux=mpjpeg,dst=:8181/screen2},dst=display}
setup Screen2 option screen-width=1920
setup Screen2 option screen-height=1080
setup Screen2 option screen-top=0
setup Screen2 option screen-left=-1920

control Screen1 play
control Screen2 play
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.