Vlc windows port (2013, 2015) and libvlcpp test application...

This forum is about all development around libVLC.
TarmoPikaro
Blank Cone
Blank Cone
Posts: 34
Joined: 01 Mar 2017 22:08

Vlc windows port (2013, 2015) and libvlcpp test application...

Postby TarmoPikaro » 01 May 2018 13:53

Hi !

I have my own custom compilation of vlc on windows (using vs2013 and vs2015, visual studio compiler, windows platform), and I've managed to integrate demo application
using C++ API's from libvlcpp - that is this source code: https://code.videolan.org/videolan/libv ... t/main.cpp

As an input I'm using one .mp4, which I have downloaded from youtube, and if you're using as video format
mp.setVideoFormatCallbacks ...
"RV32" - then I'm getting error as "Failed to create video filter2":

c:\prototyping\vlc2\src\modules\modules.c(232): filter debug: looking for video filter2 module matching "any": 8 candidates
c:\prototyping\vlc2\src\modules\modules.c(322): filter debug: no video filter2 modules matched
c:\prototyping\vlc2\src\misc\filter_chain.c(442): vout display error: Failed to create video filter2

, and as a result in setVideoCallbacks I'm not getting any Lock/Unlock callback, as to my best understanding input video is using "I420" chroma (is it video format ?) and test application requests "RV32" and conversion could not be performed.

Now to return a little bit back - I'm not compiling all plugins from vlc, only some of them. I was suspecting that I need to compile some video_filter plugin, and compiled some of them, but
chroma conversion still did not work, or may be I have compiled some plugin incorrectly, or did not compiled it at all.

Does someone knows what .dll's must be present if I want to change chroma from "I420" to "RV32" ?
I'm also using bit old vlc (2.2.1), maybe such video filters appeared in newer vlc builds ?

I have tried also to change chroma to "I420" - then video fetching starts successfully (memcpy(chroma, "I420", 4);)

TarmoPikaro
Blank Cone
Blank Cone
Posts: 34
Joined: 01 Mar 2017 22:08

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Postby TarmoPikaro » 02 May 2018 22:51

And answering to myself.

modules/video_chroma/*.* contains a lot of "video filter2" plugins, which can perform chroma conversion, including RV32 as a target format.
Not sure which of those are actually needed, I've compiled only some of them, seems to work out of box.

TarmoPikaro
Blank Cone
Blank Cone
Posts: 34
Joined: 01 Mar 2017 22:08

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Postby TarmoPikaro » 02 May 2018 23:09

Suspect that modules\video_chroma\i420_rgb.c is correct module.

chouquette
Developer
Developer
Posts: 291
Joined: 15 Apr 2010 00:54

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Postby chouquette » 03 May 2018 10:17

Hi,

It's a bit hard to say without the full logs. Chroma conversion definitely requires some video filters (for the vmem case, otherwise some conversions can be performed by the hardware directly). Depending on the target architecture/video properties different modules might be used. The required conversion is usually displayed a bit before the "looking for video filter2 modules" log line.

As a side note, I really can't advise you to use 2.2.1, and unless you have some specific changes to do in VLC, you don't need to build it yourself, feel free to use the .7z version (http://get.videolan.org/vlc/3.0.2/win32 ... 2-win32.7z) which contains the sdk

TarmoPikaro
Blank Cone
Blank Cone
Posts: 34
Joined: 01 Mar 2017 22:08

Re: Vlc windows port (2013, 2015) and libvlcpp test application...

Postby TarmoPikaro » 03 May 2018 15:11

https://sourceforge.net/p/vlc2/code/159/log/?path=
https://sourceforge.net/p/vlc2/code/HEAD/tree/

Recollected all changes into my own svn repo, including libvlcpp headers.
At the end I've needed these two modules: video_chroma/i420_rgb, video_output/vmem

Solution vlc_windows.sln.

Will try now recombine with godot player.
Godot's libtheora + theora module looks like doing similar thing to video_chroma/i420_rgb, only vlc have much wider set of conversion dll's.

There are plenty of different ways to optimize code, and I think I will need to deal with it when running under Android - for windows -
at least my windows seems to have sufficient power
to run without any optimizations whatsoever. However - to enable assembly optimization + visual studio seems to be non-trivial.

Sunqueen seems to made such step - that he have detached some of assembly parts
from his main repository (https://github.com/sunqueen/vlc-2.2.1.32-2013) into separate static library cover (https://github.com/sunqueen/vlc-2.2.1.32-cover)

but that requires some effort in order to make it happen.

I have also experimenting with Visual studio - and it's possible to compile gcc like inline assembly using clang as visual studio toolset - Visual studio uses clang + windows API headers.

https://blogs.msdn.microsoft.com/vcblog ... -update-1/

Sounds still bit bizarre - don't want to fight with struct alignments or compilers / linkers incompatibilities. :)

Will try to survive without assembly magic for timebeing.

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: Vlc windows port (2013, 2015) and libvlcpp test application...

Postby Jean-Baptiste Kempf » 06 Jun 2018 13:33

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 7 guests