Handle multiple inputs in one page
- use a mosaic bridge, and transcode all the streams into one output. (one vout/one canvas)
example with a vlm configuration file
new ch1 broadcast enabled
setup ch1 input "rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen02.stream"
setup ch1 output #mosaic-bridge{id=ch1,width=1280,height=512}
#setup ch1 output #display{}
new ch2 broadcast enabled
setup ch2 input "rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen03.stream"
setup ch2 output #mosaic-bridge{id=ch2,width=1280,height=512}
#setup ch2 output #display{}
new bg broadcast enabled
setup bg input "image.jpg"
setup bg output #transcode{vcodec=mp4v,vb=0,fps=0,acodec=none,channels=2,sfilter=mosaic{alpha=255,width=1280,height=10\
80,cols=1,rows=2,position=1,order="ch1,ch2",keep-aspect-ratio=enabled,mosaic-align=0,keep-picture=1}}:bridge-in{offset\
=100}:display
control bg play
control ch1 play
control ch2 play
having a broadcast, (thanks alaric) will call vlm_MediaInstanceNew() for each channel, so, we will have multiple players.
- another solution could be to use input slaves to have multiple inputs, and then use an sout to display them:
cvlc image.jpg --input-slave="./sample.mp4#./vlcjs.mp4" --sout "#display{}:display"
There could be cases where it would be better to have one vout in one canvas, and others where having multiple canvas is required.