Page 1 of 1

libvlc raspberry pi2 and omxil codec

Posted: 01 Sep 2015 11:26
by plaublin
Hello

I am developing a video player on the Raspberry Pi2 using libVLC. How do I tell libVLC to use the Raspberry Pi2 hardware acceleration (codec omxil)?

I have compiled vlc from the revision of the tag 2.1.0-git. I can use vlc with hardware acceleration:

Code: Select all

$ vlc --verbose=3 --vout omxil_vout --codec omxil video.mp4
When I start my program, I initialise libVLC as follows:

Code: Select all

char const *vlc_argv[] = { "--vout", "omxil_vout", "--codec", "omxil", "--verbose=3", }; int vlc_argc = sizeof(vlc_argv) / sizeof(*vlc_argv); libvlc_instance_t* instance = libvlc_new(vlc_argc, vlc_argv); libvlc_media_t* media = libvlc_media_new_path(instance, "video.mp4"); libvlc_media_player_t* mediaPlayer = libvlc_media_player_new_from_media(media); libvlc_media_release(media); libvlc_media_player_play(mediaPlayer);
However, the omxil codec does not seem to be called: playing the video is as slow as when vlc_argv[] is empty and there is no reference to omxil in the verbose output while there is when I play the video from vlc.
How can I use the omxil codec from libVLC?

Thank you.

Re: libvlc raspberry pi2 and omxil codec

Posted: 08 Oct 2015 16:14
by Jean-Baptiste Kempf
Use VLC 3.0.0 and the MMAL module.

Re: libvlc raspberry pi2 and omxil codec

Posted: 27 Nov 2015 10:55
by plaublin
Hi

Sorry for my late reply.

I tried to compile vlc 3.0.0 on the raspberry pi2, but I get an error, with gcc-4.8 (previous versions of gcc, 4.7 or 4.8, also fail to compile it):
/usr/include/c++/4.8/bits/move.h: In function ‘constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&&)’:
../include/vlc_fixups.h:265:54: error: types may not be defined in ‘sizeof’ expressions
# define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))

My raspberry runs a raspbian wheezy.

Is there a special version of gcc or special git of vlc needed?

Re: libvlc raspberry pi2 and omxil codec

Posted: 28 Jun 2016 09:25
by Jean-Baptiste Kempf
VLC compiles with gcc 4.8 on Android, so it works with this gcc.