gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Compile VLC with HW acceleration - complete tutorial

Sat Mar 12, 2016 11:40 am

nautilus27 wrote:
gkreidl wrote:I got it working now! The problems were caused by pulseaudio. After removing it, audio is working well now. And it plays 1080p finally.
I'll run some more tests and then I'll update the OP.
Please make a tutorial, pleasee!! :roll:
Probably tomorrow. I'll have to check all Jessie dependencies first to make it work for people who have never compiled something before.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 811
Joined: Sun May 06, 2012 12:00 am

Re: Compile VLC with HW acceleration - complete tutorial

Sat Mar 12, 2016 2:34 pm

@gkreidl
as for browser-plugin-vlc, which browser supported?

nautilus27
Posts: 82
Joined: Fri May 22, 2015 9:38 pm

Re: Compile VLC with HW acceleration - complete tutorial

Sun Mar 13, 2016 6:50 am

cjan wrote:@gkreidl
as for browser-plugin-vlc, which browser supported?
Wait, does this mean our browsers can benefit from HW accelerated video as well? That's fantastic news if true. A fluid YouTube video playback on Iceweasel is all I need.

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Compile VLC with HW acceleration - complete tutorial

Sun Mar 13, 2016 10:03 am

@nautilus27,cjan

Definitely not. VLC HW acceleration works in a screen overlay, similar to omxplayer. That's completely useless in a web browser.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 811
Joined: Sun May 06, 2012 12:00 am

Re: Compile VLC with HW acceleration - complete tutorial

Mon Mar 14, 2016 2:27 am

gkreidl wrote:@nautilus27,cjan

Definitely not. VLC HW acceleration works in a screen overlay, similar to omxplayer. That's completely useless in a web browser.
since ffmpeg support mmal, so build --enable-mmal then play VLC with SDL v_out, no more screen overlay, what a happy Monday^^

next step,
how to merge rebuild ffmpeg to chromium? no idea about chromiume-codecs-ffmpeg-extra.

ps. maybe default vlc-2.2.1 can do as well, copy ffmpeg to avconv, didn't try yet.

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Compile VLC with HW acceleration - complete tutorial

Mon Mar 14, 2016 5:22 am

cjan wrote:
gkreidl wrote:@nautilus27,cjan

Definitely not. VLC HW acceleration works in a screen overlay, similar to omxplayer. That's completely useless in a web browser.
since ffmpeg support mmal, so build --enable-mmal then play VLC with SDL v_out, no more screen overlay, what a happy Monday^^

next step,
how to merge rebuild ffmpeg to chromium? no idea about chromiume-codecs-ffmpeg-extra.

ps. maybe default vlc-2.2.1 can do as well, copy ffmpeg to avconv, didn't try yet.
It's not completely clear to me what you did or are trying to do.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

joyrider3774
Posts: 46
Joined: Sun Mar 13, 2016 12:21 pm

Re: Compile VLC with HW acceleration - complete tutorial

Mon Mar 14, 2016 9:24 am

i had it build on jessie (for RPI2) but for some reason video does not seem to be playing although not sure since i was using a vnc connection to view it would have to check on the actual screen when i get home. I also used the 2.2.0 tarball. Installed the prerequistes mentioned on page 1. Ran bootstrap and configured with

Code: Select all

./configure --prefix=/usr CFLAGS="-O3 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" LDFLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard" --enable-omxil --enable-omxil-vout --enable-rpi-omxil --disable-mmal-codec --disable-mmal-vout --disable-ogg --disable-mux_ogg" 
then a make -j4 and sudo make install. i also changed the video settings to use openmax as output.

here's my output from vlc -v

Code: Select all

[email protected]:~/vlc-2.2.0-git $ vlc -v
VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[0041c8f8] core libvlc warning: cannot load module `/usr/lib/vlc/plugins/access/librdp_plugin.so' (libfreerdp-primitives.so.1.1: cannot open shared object file: No such file or directory)
[0041c8f8] core libvlc warning: cannot load module `/usr/lib/vlc/plugins/access/liblive555_plugin.so' (libBasicUsageEnvironment.so.0: cannot open shared object file: No such file or directory)
[0041c8f8] core libvlc warning: cannot load module `/usr/lib/vlc/plugins/video_output/libegl_x11_plugin.so' (libEGL.so.1: cannot open shared object file: No such file or directory)
[0041c8f8] core libvlc warning: cannot load module `/usr/lib/vlc/plugins/video_output/libgles2_plugin.so' (libGLESv2.so.2: cannot open shared object file: No such file or directory)
[004b1fe0] lua demux meta warning: Error loading script /usr/lib/vlc/lua/meta/reader/filename.luac: /usr/lib/vlc/lua/meta/reader/filename.luac: bad header in precompiled chunk
[0041c8f8] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[722996d0] lua generic warning: Error loading script /usr/lib/vlc/lua/extensions/VLSub.luac: /usr/lib/vlc/lua/extensions/VLSub.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/01_googleimage.luac: /usr/lib/vlc/lua/meta/art/01_googleimage.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: bad header in precompiled chunk
[004bf700] mp4 demux warning: elst box found
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/03_lastfm.luac: /usr/lib/vlc/lua/meta/art/03_lastfm.luac: bad header in precompiled chunk
[004bf700] mp4 demux warning: STTS table of 1 entries
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/01_googleimage.luac: /usr/lib/vlc/lua/meta/art/01_googleimage.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: bad header in precompiled chunk
[6e903f40] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/03_lastfm.luac: /usr/lib/vlc/lua/meta/art/03_lastfm.luac: bad header in precompiled chunk
[004bf700] mp4 demux warning: CTTS table of 196743 entries
[004bf700] mp4 demux warning: elst box found
[004bf700] mp4 demux warning: STTS table of 195441 entries
[0196d860] lua demux meta warning: Error loading script /usr/lib/vlc/lua/meta/reader/filename.luac: /usr/lib/vlc/lua/meta/reader/filename.luac: bad header in precompiled chunk
[01968ef0] faad decoder warning: decoded zero sample
[004b7888] alsa audio output warning: device cannot be paused
[6eb090a0] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: bad header in precompiled chunk
[6eb00b80] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: bad header in precompiled chunk
[6eb00b80] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/01_googleimage.luac: /usr/lib/vlc/lua/meta/art/01_googleimage.luac: bad header in precompiled chunk
[6eb00b80] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: bad header in precompiled chunk
[6eb00b80] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/03_lastfm.luac: /usr/lib/vlc/lua/meta/art/03_lastfm.luac: bad header in precompiled chunk
[6eb01b58] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: /usr/lib/vlc/lua/meta/fetcher/tvrage.luac: bad header in precompiled chunk
[6eb00aa8] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac: bad header in precompiled chunk
[6eb00aa8] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/01_googleimage.luac: /usr/lib/vlc/lua/meta/art/01_googleimage.luac: bad header in precompiled chunk
[6eb00aa8] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: /usr/lib/vlc/lua/meta/art/02_frenchtv.luac: bad header in precompiled chunk
[6eb00aa8] lua art finder warning: Error loading script /usr/lib/vlc/lua/meta/art/03_lastfm.luac: /usr/lib/vlc/lua/meta/art/03_lastfm.luac: bad header in precompiled chunk


[6fe00620] core video output warning: Not enough direct buffers, using system memory
[6eb03af0] core vout display error: Failed to set fullscreen
[6eb03af0] core vout display error: Failed to change zoom
[6eb03af0] core vout display error: Failed to set on top
[6fe00620] core video output warning: picture is too late to be displayed (missing 3262 ms)
[6fe00620] core video output warning: picture is too late to be displayed (missing 3263 ms)
[6fe00620] core video output warning: picture is too late to be displayed (missing 3265 ms)
this message keeps repeating while playing "core video output warning: picture is too late to be displayed (missing 3262 ms)"

it also can't seem to find a few libs on my system although not sure if they are needed.

this also seems intresting.
[6fe00620] core video output warning: Not enough direct buffers, using system memory

the culprit is probably although not sure, since these are errors from the video output

[6eb03af0] core vout display error: Failed to set fullscreen
[6eb03af0] core vout display error: Failed to change zoom
[6eb03af0] core vout display error: Failed to set on top

Not sure what i did wrong though

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Compile VLC with HW acceleration - complete tutorial

Mon Mar 14, 2016 11:40 am

You cannot view it on VNC, as it has to use omxil output (similar to omxplayer).
Wait for my new tutorial. It will contain all dependencies. I'm just testing it on a second Pi (2).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Mon Mar 14, 2016 12:55 pm

I've just updated the OP.
New tutorial for Raspbian Jessie and RPi 2/3.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

joyrider3774
Posts: 46
Joined: Sun Mar 13, 2016 12:21 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Mon Mar 14, 2016 1:10 pm

would building on RPI3 with -mcpu=cortex-a53 -mfpu=neon-fp-armv8 make any (speed) diffrence ? don't have a pi3 to test with though since i'm using my pi3 in a picade but i had (re)build ppsspp with those flags although did not see any diffence. compiling with those flags would make the vlc binarie only work on a rpi 3 though but if that's the only thing one is using with the sd card why not try it ?

anyway i'm building it again now on a rpi2 with jessie. But would have to wait till this evening to actually test it out since i only have a vnc connection at work

joyrider3774
Posts: 46
Joined: Sun Mar 13, 2016 12:21 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Mon Mar 14, 2016 6:12 pm

works fine when i tested it at home on the screen itselve. I guess the previous version i had build would have worked as well, i just had to look on the real screen. The overlay is a bit weird though but i guess it's normal for this openmax output.

For fun i was trying out the other video outputs but could not get them to work it never displayed a picture but did hear sound..

thanks again.

nautilus27
Posts: 82
Joined: Fri May 22, 2015 9:38 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Mon Mar 14, 2016 8:00 pm

Code: Select all

[email protected]:~ $ cd vlc-2.2.2
[email protected]:~/vlc-2.2.2 $ ./bootstrap
./bootstrap: 40: ./bootstrap: cannot create m4/private.m4: Directory nonexistent
[email protected]:~/vlc-2.2.2 $ 
when i type ./bootstrap i get this error.

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Mon Mar 14, 2016 9:46 pm

gkreidl wrote:Update March 14th, 2016:
This is now finally working again! This tutorial is for Raspbian Jessie and the RPi 2 and 3 only!
Perfect instructions, worked fine for me on RPi3. 35 mins make, approx 12 mins install but my SDcard is far from optimised for small file writes.
gkreidl wrote:Enjoy!
Certainly will do - many thanks for your efforts & persistance
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

nautilus27
Posts: 82
Joined: Fri May 22, 2015 9:38 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Tue Mar 15, 2016 10:09 am

I contacted with Jean-Baptiste Kempf from VideoLan and asked whether we could override this playing in an overlay thing. He replied it was not correctly build and "it needs MMAL decoding and MMAL output."

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Tue Mar 15, 2016 10:20 am

nautilus27 wrote:I contacted with Jean-Baptiste Kempf from VideoLan and asked whether we could override this playing in an overlay thing. He replied it was not correctly build and "it needs MMAL decoding and MMAL output."
... which is broken in 2.2.2 and also in all 3.0 versions I've tried so far.

BTW: for SD video you can select SDL output and it will run in a separate window. But don't go to full screen.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 811
Joined: Sun May 06, 2012 12:00 am

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 3:07 am

off topic

update #858 VC4 driver, smtube play youtube 1080p.mp4 with VLC, no more screen overlay.

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 8:47 am

cjan wrote:off topic

update #858 VC4 driver, smtube play youtube 1080p.mp4 with VLC, no more screen overlay.
This is really cryptic. Please explain what you are doing (which VLC version etc.) or stop adding such comments to this thread.

I installed smtube from the repository. If I start it, I get a message: could not connect to youtube server. I suppose this versions still uses the old deprecated youtube API, which was shut off last year (April, if I remember correctly). Lot's of youtube programs stopped working then.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 811
Joined: Sun May 06, 2012 12:00 am

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 9:59 am

gkreidl wrote:This is really cryptic. Please explain what you are doing (which VLC version etc.) or stop adding such comments to this thread.
sorry, share what im try, just like rebuild vlc-2.2.2 and you update OP.

1. build last smtube
2. rpi-update
3. enable GL driver, reboot
4. set VLC v_out to OpenGL GLX(XCB)
5. start smtube setup player to vlc and 720p or 1080p

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 12:35 pm

cjan wrote:
gkreidl wrote:This is really cryptic. Please explain what you are doing (which VLC version etc.) or stop adding such comments to this thread.
sorry, share what im try, just like rebuild vlc-2.2.2 and you update OP.

1. build last smtube
2. rpi-update
3. enable GL driver, reboot
4. set VLC v_out to OpenGL GLX(XCB)
5. start smtube setup player to vlc and 720p or 1080p
OK, and which version of VLC do you use? Repository or built yourself and which configuration options set before building?
VLC cannot play 730/1080p without support by the GPU. There are two possibilities to enable hardware decoding: omx or MMAL. If I enable MMAL for the build VLC always crashes. If I disable it, I can use omx, but always get full screen overlay.
I don't want to run rpi-update right now (need a stable system) and I also don't want to enable the GL driver for similar reasons, so I have to rely on your information.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

nautilus27
Posts: 82
Joined: Fri May 22, 2015 9:38 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 8:59 pm

I can play SD content with experimental GL driver enabled (I set video output to open gl in vlc settings). But higher resolution lags.

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Thu Mar 17, 2016 11:53 pm

nautilus27 wrote:I can play SD content with experimental GL driver enabled (I set video output to open gl in vlc settings). But higher resolution lags.
You can do the same with SDL output, But all of this uses software decoding only.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

nautilus27
Posts: 82
Joined: Fri May 22, 2015 9:38 pm

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Fri Mar 18, 2016 9:57 pm

gkreidl wrote:
nautilus27 wrote:I can play SD content with experimental GL driver enabled (I set video output to open gl in vlc settings). But higher resolution lags.
You can do the same with SDL output, But all of this uses software decoding only.
I just tested it and you are correct. Well, you know what gkreidl? Screw these, let's code our own OpenMAX based GUI player and kick ass, WAIT FOR ME!!! I'm gonna make UI look shinier than iTunes!

*goes to learn basics of C++*

gkreidl -> http://2.bp.blogspot.com/-gFTOqOThQhk/U ... eleton.jpg

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Sat Mar 19, 2016 3:54 am

nautilus27 wrote: I just tested it and you are correct. Well, you know what gkreidl? Screw these, let's code our own OpenMAX based GUI player and kick ass, WAIT FOR ME!!! I'm gonna make UI look shinier than iTunes!
You seem to have no idea how complex this is. Have a look at the omxplayer source code. And it doesn't even have an UI.
But there do exist at least three GUIs for omxplayer now. Why do you want to want to invent the wheel again?
I don't need a "shiny UI". And iTunes is one of the worst software products I've ever encountered, IMHO.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

cjan
Posts: 811
Joined: Sun May 06, 2012 12:00 am

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Sat Mar 19, 2016 9:23 am

one question,

SDL --vout : software YUV SDL output, so which video codec using?

gkreidl
Posts: 6275
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Tutorial: Compile VLC with HW acceleration - Jessie, RPi

Sat Mar 19, 2016 9:35 am

cjan wrote:one question,

SDL --vout : software YUV SDL output, so which video codec using?
Selected automatically by VLC.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Raspberry Pi OS”