Page 1 of 1

Several videos in the same application

Posted: 21 Jan 2013 15:50
by ronhash
Hello there,
I need to open several windows playing videos in a c++ ms-windows application, allowing the user to control each of them (play/pause location etc...)
As a simple test I created a window, created 4 media_player instances (libvlc_media_player_new), assigned each of them to a window (libvlc_media_player_set_hwnd), and played all 4 videos.
The result was that the CPU was exploding... is there a better way to do this? is there any limitation on the number of videos that can be played concurrently?
Thanks!

Re: Several videos in the same application

Posted: 21 Jan 2013 17:02
by Rémi Denis-Courmont
Of course, the hardware has limitations.

Re: Several videos in the same application

Posted: 21 Jan 2013 18:25
by joseAndresGomezTovar
I recommend you to use GPU-Z
http://www.techpowerup.com/gpuz/

Re: Several videos in the same application

Posted: 23 Jan 2013 10:01
by ronhash
Of course, the hardware has limitations.
I understand that there might be some limitations, is there any way that I can prioritize the update of the video window, and give the UI higher priority for example?
The problem is that the UI becomes non-responsive - I would prefer to lower the frame-rate for example.

Re: Several videos in the same application

Posted: 23 Jan 2013 10:12
by ronhash
I recommend you to use GPU-Z
http://www.techpowerup.com/gpuz/
When I run the 4 videos, I do see that the GPU is getting close to 100%:
Image
This is my card data:
Image
My question is how can I control this...
Thanks.

Re: Several videos in the same application

Posted: 23 Jan 2013 21:22
by Rémi Denis-Courmont
It's up to your application to prioritize its UI thread if it wants to. Whether that will work effectively is quite dubious though.

Re: Several videos in the same application

Posted: 24 Jan 2013 09:53
by ronhash
OK, I think U have a solution - I am working in Windows 7, so changing vlc to use Direct2D (--vout=direct2d) lowered the GPU Load to around 20% while running 4 video windows, and the application is fully responsive now.
Is there any downside to using Direct2D (expect it being platform specific)?

Re: Several videos in the same application

Posted: 24 Jan 2013 18:58
by Jean-Baptiste Kempf
no.