Page 1 of 2
Could vlc make a video mosaic?
Posted: 12 May 2005 13:02
by alvsant
Could vlc make a video mosaic streaming or playing?
Posted: 12 May 2005 19:33
by xtophe
Yes, but:
-It's a bit tricky,
-Required the latest development version
-It's very cpu intensive
You should search in the vlc-devel mailing list archive for mosaic.
hth,
Posted: 13 May 2005 13:14
by dionoea
a sample vlm configuration file to make a mosaic:
Code: Select all
new tf1 broadcast enabled
setup tf1 input udp://@239.255.2.60:1234
setup tf1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180},select=video,dst=bridge-out{id=1},select=audio}
new fr2 broadcast enabled
setup fr2 input udp://@239.255.10.200:1234
setup fr2 output #duplicate{dst=mosaic-bridge{id=2,height=144,width=180},select=video,dst=bridge-out{id=2},select=audio}
new TVEi broadcast enabled
setup TVEi input udp://@239.255.6.9:1234
setup TVEi output #duplicate{dst=mosaic-bridge{id=3,height=144,width=180},select=video,dst=bridge-out{id=3},select=audio}
new bg broadcast enabled
#setup bg loop input /home/via/videolan/videolan_mp1v.ts
setup bg input fake:
setup bg output #switcher{files=/home/via/videolan/image_orange.uyvy,sizes=360x288,command=1}:transcode{sfilter=mosaic,vcodec=mp2v,vb=10000,scale=1}:bridge-in{delay=400,id-offset=100}:standard{access=udp,mux=ts,url=239.255.99.99,sap,group=Mosaic,name="[mosaic] TF1 - FR2 - TVEi"}
control bg play
control tf1 play
control fr2 play
control TVEi play
and the VLC command line to launch it
Code: Select all
./vlc $1 --color -I telnet --vlm-conf ../mosaic.vlm.conf --ttl 12 \
--mosaic-width 360 --mosaic-height 288 --udp-caching 800 \
--mosaic-keep-picture \
--mosaic-rows 2 --mosaic-cols 2 --mosaic-position 1 --mosaic-order 1,2,3
what it basically does :
take image_orange.uyvy as the background image
take 3 network streams as input
mix the video
add 1 audio channel per original network stream (or more if the original stream had more than one channel)
stream the resulting image/audio to a multicast ip address with an sap announce
Posted: 13 May 2005 13:29
by alvsant
Thanks, I´m going to test it now.
Posted: 13 May 2005 14:26
by dionoea
to generate the background image here is what i use: (you need it to be uyvy ...)
convert the original image (bmp, png, jpeg ...):
Code: Select all
convert -size 720x576 image.ext -resize 720x576 image.uyvy
test the image:
test using the image in VLC:
Code: Select all
./vlc --sout-switcher-files=videolan.uyvy --sout-switcher-sizes=720x576 \
--sout-switcher-command=1 --ttl 12 --sout "#switcher:display" fake:
(convert and display comme with the "imagemagick" package in linux debian)
Posted: 14 May 2005 21:52
by alvsant
This is what i´m looking for and runs well, thanks.
Posted: 08 Jun 2005 09:22
by bXn
Is the use of an image as background mandatory ?
And another question: I read here
http://wiki.videolan.org/index.php/Mosaic#Appendix that ffmpeg was
necessary, can someone confirm this ?
(I am trying to make a mosaic on Windows )
Posted: 08 Jun 2005 09:39
by dionoea
you can use another video stream as a background image.
ffmpeg isn't allways necessary, just highly recomended since it encodes/decodes most of the video codec you will use.
Posted: 08 Jun 2005 09:56
by bXn
Ok thanks for the info.
It works ;o)
here's my working config :
Code: Select all
vlc --color -I telnet --vlm-conf mosaic.cfg --ttl 12 --udp-caching 800
--mosaic-width 360 --mosaic-height 288 --mosaic-keep-picture
--mosaic-rows 2 --mosaic-cols 2 --mosaic-position 1 --mosaic-order 1,2
---------------------------
Fichier mosaic.cfg
new channel1 broadcast enabled
setup channel1 input "x.mpg"
setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180},select=video,dst=bridge-out{id=1},select=audio}
new channel2 broadcast enabled
setup channel2 input "y.mpg"
setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=144,width=180},select=video,dst=bridge-out{id=2},select=audio}
new background broadcast enabled
setup background input "back.mpg"
setup background output #transcode{sfilter=mosaic,vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}:duplicate{dst=display,dst=standard{mux=ts,access=udp,url=192.168.1.53,sap,name="toto"}}
control background play
control channel1 play
control channel2 play
Posted: 14 Jun 2005 19:11
by Guest
Don't we have to connect to the vlm via telnet?
Posted: 14 Jun 2005 20:51
by Feivel
Well, I got the last example running, but now I tried to set an image as background. What could be wrong with the following code:
new channel1 broadcast enabled
setup channel1 input "scrubs.avi"
setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=150,width=250},select=video,dst=bridge-out{id=1},select=audio}
new channel2 broadcast enabled
setup channel2 input "psilodump.mpeg"
setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=150,width=250},select=video,dst=bridge-out{id=1},select=audio}
new background broadcast enabled
setup background input fake:
setup background output #switcher{files=C:\Program Files\VideoLAN\vlc-test\new.uyvy,sizes=500x300,command=1}:transcode{sfilter=mosaic,vcodec=mp2v,vb=1000,scale=1}:bridge-in{delay=400,id-offset=100}:duplicate{dst=display}
control background play
control channel1 play
control channel2 play
I'm startin the vlc as you recommended, and I'm not getting any error but no display either.
Posted: 14 Jun 2005 22:56
by dionoea
are you using vlc 0.8.2 ? the --vlm-conf option doesn't exist in 0.8.1
Posted: 14 Jun 2005 23:19
by Feivel
Yes I'm using the newest version. And I succeeded in arranging 3 videos, but putting the .uyvy-file as the background-image did'nt show anything at all.
Btw., I don't really know, what the switcher-module and the bridge-in is. I'd like to understand everything, but it's kind of complicated and the documentation lacks some good examples.
Anyway, thanks for any kind of suggestions.
Posted: 15 Jun 2005 01:49
by dionoea
the switcher module is in fact being deprecated (even though its all new). In latest versions, you can do :
vlc fake: --fake-file image.png
That is quite simpler then the switcher solution. (And you just need a png or jpeg file ...
)
the switcher module basically takes a list of image and makes a video out of them.
the bridge module takes several elementary streams and groups them.
I've added a small diagram to the wiki page to explain how the differents bricks fit together.
Posted: 16 Jun 2005 15:00
by Feivel
Thanks man! I will post again in case of success.
Posted: 18 Jun 2005 00:30
by Feivel
This fake: command is not working.
new channel1 broadcast enabled
setup channel1 input "one.avi"
setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=150,width=250},select=video,dst=bridge-out{id=1},select=audio}
new channel2 broadcast enabled
setup channel2 input "two.mpeg"
setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=150,width=250},select=video,dst=bridge-out{id=2},select=audio}
new background broadcast enabled
setup background input fake: --fake-file="C:\VLC\bg.jpg"
setup background output #transcode{sfilter=mosaic,vcodec=WMV2,vb=1000,scale=1}:bridge-in{delay=400,id-offset=100}:duplicate{dst=display}
This is not showing anything, but loading massive stuff into memory.
I'm really frustrated right now, because I can't find my mistake.
And I still think, that some modules are not documented at all.
This one gives just too little information:
http://wiki.videolan.org/index.php/VLC_ ... -line_help
Posted: 18 Jun 2005 00:48
by dionoea
the --fake-file option needs to be passed to vlc on the command line, not in vlm
Posted: 21 Jul 2005 12:30
by Spider
the switcher module is in fact being deprecated (even though its all new). In latest versions, you can do :
vlc fake: --fake-file image.png
That is quite simpler then the switcher solution. (And you just need a png or jpeg file ...
)
Code: Select all
new background broadcast enabled
setup background input fake: --fake-file image.jpg
setup background output #transcode{sfilter=mosaic,vcodec=mp4v,vb=150}:bridge-in{delay=400,id-offset=100}:display
crached down with no message, just:
[00000078] main module debug: using packetizer module "rawvideo"
/X/bin/mosaic-vlc: line 8: 2623 Killed vlc -vvv --vlm-conf /X/bin/mosaic.vlm.conf --no-audio --no-sout-audio --color -I telnet --vout X11 --v4l-chroma "I420" --mosaic-width 800 --mosaic-height 600 --mosaic-keep-picture --mosaic-rows 2 --mosaic-cols 2 --mosaic-position 1 --mosaic-order 1,2,3
Posted: 21 Jul 2005 13:51
by dionoea
You should try this instead :
Code: Select all
new background broadcast enabled
setup background input fake:
setup background output #transcode{sfilter=mosaic,vcodec=mp4v,vb=150}:bridge-in{delay=400,id-offset=100}:display
Code: Select all
vlc -vvv --vlm-conf /X/bin/mosaic.vlm.conf --no-audio --no-sout-audio --color -I telnet --vout X11 --v4l-chroma "I420" --mosaic-width 800 --mosaic-height 600 --mosaic-keep-picture --mosaic-rows 2 --mosaic-cols 2 --mosaic-position 1 --mosaic-order 1,2,3 --fake-file image.jpg
Posted: 21 Jul 2005 14:30
by Spider
Can I view picture localy with out transcode?
Posted: 22 Jul 2005 09:24
by dionoea
Posted: 22 Jul 2005 14:45
by Spider
No! Not fake.
How to view mosaic localy with out transcode?
Posted: 22 Jul 2005 15:48
by dionoea
oh ... you need the transcode to do the mosaic. What you don't need to view it localy is the standard (or std). Just replace it with :display
Posted: 22 Jul 2005 18:46
by Spider
wou wou wou
1. I want to view mosaic localy on my display
2. Whow to view it with out transcode? I try to remove vcodec, but vlc process freezing with this way
Posted: 22 Jul 2005 19:49
by dionoea
you can't do a mosaic without transcode. (but you might want to try to transcode to raw data ... but i don't know how that works. never tried it)