Blog of Alexander Mamchenkov http://alex.mamchenkov.net ... mammoth cave ... Wed, 10 Dec 2014 09:00:20 +0000 en-US hourly 1 http://wordpress.org/?v=4.0.1 Blog of Alexander Mamchenkov http://0.gravatar.com/avatar/28fa14800d5183df0b0e73cf9c22b5ee.png?s=48 http://alex.mamchenkov.net Instagram Daily Digest http://alex.mamchenkov.net/2014/12/10/instagram-digest-20141210/ http://alex.mamchenkov.net/2014/12/10/instagram-digest-20141210/#comments Wed, 10 Dec 2014 09:00:20 +0000 http://alex.mamchenkov.net/?p=5637 Плюша Люблю обедать дома. Жена чудо!]]> http://alex.mamchenkov.net/2014/12/10/instagram-digest-20141210/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/30/instagram-digest-20141130/ http://alex.mamchenkov.net/2014/11/30/instagram-digest-20141130/#comments Sun, 30 Nov 2014 09:00:04 +0000 http://alex.mamchenkov.net/?p=5629 Монстер компостер Вдруг откуда не возьмись]]> http://alex.mamchenkov.net/2014/11/30/instagram-digest-20141130/feed/ 0 VLC mosaic for multiple RSTP streams http://alex.mamchenkov.net/2014/11/27/vlc-mosaic-multiple-rstp-streams/ http://alex.mamchenkov.net/2014/11/27/vlc-mosaic-multiple-rstp-streams/#comments Thu, 27 Nov 2014 08:17:33 +0000 http://alex.mamchenkov.net/?p=5626 Recently had a task to open streams from 4 cameras over RSTP in a single windows using VLC. There is a bunch of howtos on net with relevant info and examples, but after trying many options non of them worked out of the box. Tweaking things here and there for a while I managed to come up with the working configuration, so I post it here for future reference and hopefully it will be helpful to anyone else.

My cameras stream dimensions is 1280×720 and as I want to fit 4 cameras on one screen, I will scale them in half to have screen size 1280×720 and each stream size 64×360.

First thing to do is to create some background image with exact size of the desired screen (1280×720 in my case) and save somewhere near (bg.jpg in my case).

Then we need to create a VLM config file (let it be cam.vlm.conf) to tell VLC about my streams and how to deal with them:

new channel1 broadcast enabled                                                       
setup channel1 input "rtsp://x.x.x.x:554/?user=foo&password=bar&channel=1&stream=0.sdp"
setup channel1 output #mosaic-bridge{id=1,height=360,width=640}

new channel2 broadcast enabled                                                       
setup channel2 input "rtsp://x.x.x.y:554/?user=foo&password=bar&channel=1&stream=0.sdp"
setup channel2 output #mosaic-bridge{id=2,height=360,width=640}

new channel3 broadcast enabled                                                       
setup channel3 input "rtsp://x.x.x.z:554/?user=foo&password=bar&channel=1&stream=0.sdp"
setup channel3 output #mosaic-bridge{id=3,height=360,width=640}

new channel4 broadcast enabled                                                       
setup channel4 input "rtsp://x.x.x.w:554/?user=foo&password=bar&channel=1&stream=0.sdp"
setup channel4 output #mosaic-bridge{id=4,height=360,width=640}

new mosaic broadcast enabled
setup mosaic input file:///home/user/Pictures/bg.jpg
setup mosaic option image-duration=-1
setup mosaic option image-fps=0
setup mosaic option mosaic-rows=2
setup mosaic option mosaic-cols=2
setup mosaic option mosaic-position=1
setup mosaic output #transcode{sfilter=mosaic,vcodec=mp4v,VB=8500,acodec=none,fps=25,scale=1}:display

control channel1 play
control channel2 play
control channel3 play
control channel4 play
control mosaic play

The input path to the camera streams as well as full path to the background image should be adjusted accordingly.

Somehow VLC doesn’t want to recognize mosaic-(height|width|order) parameters in the VLM file, so need to supply them inline as arguments when calling VLC. Now as we have VLM file ready, we can start the stream with the following command:

cvlc --vlm-conf /home/user/Desktop/cam.vlm.conf --mosaic-width 1280 --mosaic-order "1,2,3,4" --mosaic-height 720

Adjust the path to the VLM file accordingly as well as mosaic order or whatever else you want. For me all of the above worked out perfectly well and I can see all my 4 cameras in single window.

]]>
http://alex.mamchenkov.net/2014/11/27/vlc-mosaic-multiple-rstp-streams/feed/ 0
Instagram Daily Digest http://alex.mamchenkov.net/2014/11/24/instagram-digest-20141124/ http://alex.mamchenkov.net/2014/11/24/instagram-digest-20141124/#comments Mon, 24 Nov 2014 09:02:36 +0000 http://alex.mamchenkov.net/?p=5619 Ночной Лимассол ]]> http://alex.mamchenkov.net/2014/11/24/instagram-digest-20141124/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/20/instagram-digest-20141120/ http://alex.mamchenkov.net/2014/11/20/instagram-digest-20141120/#comments Thu, 20 Nov 2014 09:00:02 +0000 http://alex.mamchenkov.net/?p=5614 Ух ты мы улицу светим Photo of a selfie in progress)]]> http://alex.mamchenkov.net/2014/11/20/instagram-digest-20141120/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/15/instagram-digest-20141115/ http://alex.mamchenkov.net/2014/11/15/instagram-digest-20141115/#comments Sat, 15 Nov 2014 09:00:52 +0000 http://alex.mamchenkov.net/?p=5607 В Амстердаме было солнышко, а на Кипре вот так On a way home Котэ в ирландском баре]]> http://alex.mamchenkov.net/2014/11/15/instagram-digest-20141115/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/05/instagram-digest-20141105/ http://alex.mamchenkov.net/2014/11/05/instagram-digest-20141105/#comments Wed, 05 Nov 2014 09:00:26 +0000 http://alex.mamchenkov.net/?p=5584 I can see it even from central station Setting up a new tablet for my mom. Looks like good birthday present. Still here, just can't walk away from this amazing place Menu on iPad. Cool Мамуля Это надо увидеть в живую Грандиозно!]]> http://alex.mamchenkov.net/2014/11/05/instagram-digest-20141105/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/04/instagram-digest-20141104/ http://alex.mamchenkov.net/2014/11/04/instagram-digest-20141104/#comments Tue, 04 Nov 2014 09:06:49 +0000 http://alex.mamchenkov.net/?p=5577 ]]> http://alex.mamchenkov.net/2014/11/04/instagram-digest-20141104/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/11/03/instagram-digest-20141103/ http://alex.mamchenkov.net/2014/11/03/instagram-digest-20141103/#comments Mon, 03 Nov 2014 09:01:03 +0000 http://alex.mamchenkov.net/?p=5568 Пасмурное Амстедамское утро Найди цаплю ]]> http://alex.mamchenkov.net/2014/11/03/instagram-digest-20141103/feed/ 0 Instagram Daily Digest http://alex.mamchenkov.net/2014/10/26/instagram-digest-20141026-2/ http://alex.mamchenkov.net/2014/10/26/instagram-digest-20141026-2/#comments Sun, 26 Oct 2014 09:01:19 +0000 http://alex.mamchenkov.net/?p=5561 Steak Saturday New desk in new the office Lunch time]]> http://alex.mamchenkov.net/2014/10/26/instagram-digest-20141026-2/feed/ 0