Help with mosaic and CPU load

*nix specific usage questions
giox969
New Cone
New Cone
Posts: 3
Joined: 31 May 2020 09:18

Help with mosaic and CPU load

Postby giox969 » 12 Sep 2021 12:21

I'm using ubuntu 20.04 and vlc 3.0.16 from snap, CPU is an Intel Core i5-10500T

Streaming a single RTSP video (720x576 HEVC) takes 12% of the CPU:



Code: Select all

top - 11:57:23 up 1:41, 5 users, load average: 1,02, 1,24, 1,09 Tasks: 435 total, 1 running, 434 sleeping, 0 stopped, 0 zombie %Cpu(s): 4,0 us, 1,3 sy, 0,0 ni, 93,7 id, 0,0 wa, 0,0 hi, 1,0 si, 0,0 st MiB Mem : 15755,5 total, 4964,6 free, 3968,7 used, 6822,2 buff/cache MiB Swap: 16276,0 total, 16276,0 free, 0,0 used. 10172,8 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7541 giovanni 20 0 3371828 152940 99220 S 12,3 0,9 3:24.74 kwin_x11 33041 giovanni 20 0 3121960 140092 93784 S 11,6 0,9 0:24.55 vlc 7552 giovanni 20 0 3852096 332616 150556 S 8,6 2,1 0:42.20 plasmashell
Command line:

Code: Select all

vlc rtsp://ma0001:thepassword@192.168.44.1:554/unicast/c1/s1/live

But, converting this single stream to a mosaic with display output will make CPU load to raise to 71%

Code: Select all

top - 12:00:51 up 1:44, 5 users, load average: 1,76, 1,48, 1,21 Tasks: 435 total, 1 running, 434 sleeping, 0 stopped, 0 zombie %Cpu(s): 7,6 us, 0,7 sy, 0,0 ni, 91,6 id, 0,0 wa, 0,0 hi, 0,1 si, 0,0 st MiB Mem : 15755,5 total, 4796,3 free, 4093,7 used, 6865,5 buff/cache MiB Swap: 16276,0 total, 16276,0 free, 0,0 used. 10009,0 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 34209 giovanni 20 0 3388360 249760 117440 S 71,1 1,5 0:46.56 vlc 7541 giovanni 20 0 3373152 152976 99240 S 7,6 0,9 3:43.75 kwin_x11 9534 giovanni 20 0 4852280 783412 301840 S 6,3 4,9 10:39.00 firefox 2799 root 20 0 1259856 258516 206624 S 5,3 1,6 3:07.64 Xorg 7672 giovanni 20 0 945564 178164 122124 S 2,0 1,1 1:14.22 previews_creato 23245 giovanni 20 0 2507312 157948 104884 S 1,7 1,0 1:41.67 Web Content
the VLM file for my mosaic is

Code: Select all

del all new ch1 broadcast enabled setup ch1 input "rtsp://ma0001:thepassword@192.168.44.1:554/unicast/c1/s1/live" setup ch1 output #mosaic-bridge{id=ch1,width=960,height=540} new bg broadcast enabled setup bg input "bg_1920x1080.jpg" setup bg option image-duration=-1 setup bg output #transcode{vcodec=mp4v,vb=0,fps=0,acodec=none,channels=0,sfilter=mosaic{alpha=255,width=1920,height=1080,cols=2,rows=2,position=1,order="ch1",keep-aspect-ratio=enabled,mosaic-align=0,keep-picture=1}}:bridge-in{offset=100}:display control bg play control ch1 play

Why so much CPU is needed ? Is it caused by the intermediate mp4v encoding? If yes, is it possible to have the mosaic without re-encode into mp4v ?

Thank you

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Help with mosaic and CPU load

Postby Rémi Denis-Courmont » 12 Sep 2021 19:52

Mosaic is more expensive than display, and then you have to add encoding on top. And no.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

giox969
New Cone
New Cone
Posts: 3
Joined: 31 May 2020 09:18

Re: Help with mosaic and CPU load

Postby giox969 » 15 Sep 2021 22:17

Ok, thank you.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 35 guests