Occasional video stutters playing back local content.

This forum is about all development around libVLC.
alan.dugdall
New Cone
New Cone
Posts: 1
Joined: 12 Jan 2016 14:33

Occasional video stutters playing back local content.

Postby alan.dugdall » 12 Jan 2016 15:07

Hi,

I am trying to playback 720p videos frame by frame onto an Open GL texture using the callback methods in libVlc 2.2.1. This Open GL texture forms the background of a game that is Cocos2d-x based; I am basically using Cocos2d-x for an animated overlay on top of local video. The videos are chained together by the main application depending on in game events and it all works nicely 95% of the time. However, the occasional video(There are about 90 in total) stutters when playing back. I don't think it is the individual videos themselves, sometimes they work flawlessly, other times they stutter, and the stuttering lasts for the duration of the video, in most circumstances, the next video plays without the stutter.

The Win 7 machine used for testing the game on has a fairly recent i5 processor and a nVidia 750TI graphics card and a fully de-fragmented 7,200 rpm HDD, so it should be up to the task.

I have used the following:

Code: Select all

libvlc_video_set_callbacks(vlc_player_, lock, unlock, display, this); // 'this' is my MoviePlayer control and is used in the callbacks. libvlc_video_set_format(vlc_player_, "RGBA", 1280, 720, 1280 * 4);
I have also experimented with:

Code: Select all

CCEGLView* eglView = CCEGLView::sharedOpenGLView(); // Gets me the HWND of the root Cocos2d-x view. libvlc_media_player_set_hwnd(vlc_player_, eglView->getHWnd());
And the video now plays back decoupled from the Open GL platform, but it still occasionally stutters.

The version of Cocos2d-x we are using is stable and has been used for other products by myself (without video) and is very low on CPU usage (0-7%)

Has anybody experienced anything similar when using libvlc_media_player_set_hwnd or libvlc_video_set_callbacks?

The frame rate of the videos is fixed at 30fps.

Kind regards,

Alan.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Occasional video stutters playing back local content.

Postby Jean-Baptiste Kempf » 28 Jun 2016 09:38

Because you are converting all frames from I420 to RGB in software. That is slow.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 32 guests