Page 15 of 17

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

Posted: Wed May 17, 2017 8:14 am
by gkreidl
I've just updated the OP to version 2.2.5.1.

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

Posted: Wed May 17, 2017 4:07 pm
by richardcgiroux
I confess that I am using the Pi for development so I am not sure how I ended up with ver. 57.

I've been considering building a new Pi with the default Jessie image. Still, this could be a setback for development but I guess it may be necessary.

I'll build one and get back to you.

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

Posted: Wed May 17, 2017 4:34 pm
by runboy93
I can't download 2.2.5.1 version, is it pull back?

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

Posted: Wed May 17, 2017 4:43 pm
by gkreidl
runboy93 wrote:I can't download 2.2.5.1 version, is it pull back?
No, I just tested it with wget (had used the browser before).

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

Posted: Wed May 17, 2017 11:23 pm
by mrblue1234
Is there anything different that needs to be done to get this to work for Raspberry Pi Zero or Zero W?

Thanks.

-Mike

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

Posted: Thu May 18, 2017 1:58 am
by richardcgiroux
@ gkreidl

I reimaged with Raspbian Jessie and your instructions worked perfectly. Thanks

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

Posted: Thu May 18, 2017 4:03 am
by gkreidl
mrblue1234 wrote:Is there anything different that needs to be done to get this to work for Raspberry Pi Zero or Zero W?

Thanks.

-Mike
You have to remove all the compiler options (CPU, FPU etc.) from the configuration string. But it's not really worth the effort. It will only work eith SD video. VLC is not as efficient as omxplayer.

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

Posted: Thu May 18, 2017 6:14 pm
by mrblue1234
gkreidl wrote:
mrblue1234 wrote:Is there anything different that needs to be done to get this to work for Raspberry Pi Zero or Zero W?

Thanks.

-Mike
You have to remove all the compiler options (CPU, FPU etc.) from the configuration string. But it's not really worth the effort. It will only work eith SD video. VLC is not as efficient as omxplayer.

Are you saying that the Raspberry Pi Zero won't play 1080p videos?

1.) I had an older version of the VLC player that was compiled with hardware acceleration a Raspberry Pi 3 with. When we "tar'ed up" the files on the Raspberry Pi 3 and moved over to a Raspberry Pi Zero W we were able to play 1080p videos.

2.) The strange thing is that the latest VLC player (2.2.5.1) that I compiled on a Raspberry Pi 3 with hardware acceleration and able to play 1080p videos with vlc. With this image I am able to boot the Pi Zero successfully and things look normal. But when I run vlc I get an error "illegal command" or something similar.

3.) Does anyone know why point 1 would be different than point 2?

4.) My goal is to get the latest VLC player working on the Pi Zero.

Thanks for any comments.

-Mike

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

Posted: Thu May 18, 2017 6:28 pm
by mrblue1234
I was able to get 1080p videos playing with the hardware accelerated version of VLC! Thank you for posting this.

When playing 1080p videos I did notice that the video played but would pause for several seconds through out the video.

I noticed that enabling turbo mode and updating the clocking for the gpu and cpu the quality of the playback improved dramatically.

gpu_freq=500
gpu_mem=192
force_turbo=1
core_freq=400

But even after these changes sometimes the video will slightly glitch. I would not say that it is 100% bullet proof all of the time.

Are there any other optimizations that I should make? Any suggestions to the settings that I am using above?

Thanks.

-Mike

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

Posted: Thu May 18, 2017 7:01 pm
by rpdom
mrblue1234 wrote:Are you saying that the Raspberry Pi Zero won't play 1080p videos?
No, it can play them quite happily using the hardware decoder.
1.) I had an older version of the VLC player that was compiled with hardware acceleration a Raspberry Pi 3 with. When we "tar'ed up" the files on the Raspberry Pi 3 and moved over to a Raspberry Pi Zero W we were able to play 1080p videos.

2.) The strange thing is that the latest VLC player (2.2.5.1) that I compiled on a Raspberry Pi 3 with hardware acceleration and able to play 1080p videos with vlc. With this image I am able to boot the Pi Zero successfully and things look normal. But when I run vlc I get an error "illegal command" or something similar.

3.) Does anyone know why point 1 would be different than point 2?
Probably because the Pi3 has a different ARM CPU (ARMv8) to the Pi0 (ARMv6) and if you don't put the right compiler options in you will get code that uses instructions that exist on the Pi3, but not the Pi0.

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

Posted: Thu May 18, 2017 10:48 pm
by gkreidl
Years ago I had compiled a HW accelerated version on a B+ running wheezy (that's how this thread got started). The B+ was overclocked (CPU 1000 MHz, GPU 500 MHz). It played most of my 720p50 files jerkily and none of my 1080p files.
Maybe the code has improved a bit but VLC has much more overhead than omxplayer.

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

Posted: Wed May 24, 2017 10:52 pm
by cjan
2.2.6 fix subtitle security issue.

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

Posted: Wed Jun 14, 2017 4:53 pm
by mrblue1234
All,

1.) After reading this post I have been able to successfully run VLC 2.2.5.1 on my Raspberry Pi 3 with hardware acceleration. Thank you so much to the OP.

2.) What I am trying to do now is to have the capability of doing bitstreaming of Dolby Digital + and Atmos. It seems this is supported in VLC 3.0.

3.) I have previously downloaded the source code for VLC 2.2.51 from the following link:

http://download.videolan.org/pub/videolan/vlc/

When I look on this same link I don't find VLC 3.0 anywhere. Where can I get this? Where do the beta versions get placed?

4.) Any other direction on this would be appreciated.

Thanks.

-Mike

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

Posted: Wed Jun 14, 2017 5:39 pm
by gkreidl
mrblue1234 wrote:All,

1.) After reading this post I have been able to successfully run VLC 2.2.5.1 on my Raspberry Pi 3 with hardware acceleration. Thank you so much to the OP.

2.) What I am trying to do now is to have the capability of doing bitstreaming of Dolby Digital + and Atmos. It seems this is supported in VLC 3.0.

3.) I have previously downloaded the source code for VLC 2.2.51 from the following link:

http://download.videolan.org/pub/videolan/vlc/

When I look on this same link I don't find VLC 3.0 anywhere. Where can I get this? Where do the beta versions get placed?

4.) Any other direction on this would be appreciated.

Thanks.

-Mike
You could clone it with git: https://git.videolan.org/?p=vlc.git;a=summary

But I do not recommend it:
1) It may require newer package versions not available in Jessie
2) I really never got them to work with HW acceleration, but stopped trying it a long time ago.

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

Posted: Wed Jun 21, 2017 11:48 am
by 21stylecrew
Hi,
Thank you for the steps! I finally got VLC running HD videos.
Now my question is: What parameters have I to use to select "OpenMAX IL video output" and ALSA sound output while using libvlc?

I writing a program based on libvlc and I want to play HD videos.

Thank you!

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

Posted: Wed Jun 21, 2017 2:36 pm
by gkreidl
21stylecrew wrote:Hi,
Thank you for the steps! I finally got VLC running HD videos.
Now my question is: What parameters have I to use to select "OpenMAX IL video output" and ALSA sound output while using libvlc?

I writing a program based on libvlc and I want to play HD videos.

Thank you!
I've never used libvlc directly and so cannot tell you anything about it.

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

Posted: Fri Jun 23, 2017 1:51 am
by Micha1982
Works - but without fullscreen-gui or black borders around a not-fullscreen-video its almost useless.

And OmxplayerGUI is only available inside a browser-package??
Is there any alternative?
Why are borders and Gui-elements are missing and how to solve that, how o get it windowed with hardware-acceleration? Its like driving a car without a steering-wheel....

Using Kodi is no alternative...there are other good reasons people use/need a working, good desktop-player - like VLC - not only for watching movies...I am creating animations with the Raspberry - but I am not able to check the results on the Pi in a proper way for example. Be it as it is for now...

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

Posted: Fri Jun 23, 2017 5:09 am
by gkreidl
Micha1982 wrote:Works - but without fullscreen-gui or black borders around a not-fullscreen-video its almost useless.

And OmxplayerGUI is only available inside a browser-package??
Is there any alternative?
Why are borders and Gui-elements are missing and how to solve that, how o get it windowed with hardware-acceleration? Its like driving a car without a steering-wheel....

Using Kodi is no alternative...there are other good reasons people use/need a working, good desktop-player - like VLC - not only for watching movies...I am creating animations with the Raspberry - but I am not able to check the results on the Pi in a proper way for example. Be it as it is for now...
Micha1982 wrote:Works - but without fullscreen-gui or black borders around a not-fullscreen-video its almost useless.

And OmxplayerGUI is only available inside a browser-package??
Is there any alternative?
Why are borders and Gui-elements are missing and how to solve that, how o get it windowed with hardware-acceleration? Its like driving a car without a steering-wheel....

Using Kodi is no alternative...there are other good reasons people use/need a working, good desktop-player - like VLC - not only for watching movies...I am creating animations with the Raspberry - but I am not able to check the results on the Pi in a proper way for example. Be it as it is for now...
This is clearly stated in the OP: it will not display the video inside a window. It uses an additional layer like omxplayer does. The following quote from omxplayerGUI manual should explain it:
It's important to understand how omxplayer works. It uses the GPU of the Raspberry Pi
to decode the video and sends it directly to the video output superimposing it on top of
the normal display (of the desktop, for example) in a separate layer. That's one of the
reasons, why it's so efficient. Other methods can be used to display the decoded video
inside a GUI application, but this requires real time copying of the decoded video into the
frame buffer; the webkit3 engine supplied by the Raspberry Pi Foundation (and used by
epiphany and kweb3) works this way to play (HTML5) web video inside the browser
window. But this method is very inefficient compared to omxplayer's layer method and
only works well for low resolutions and limited screen areas.

OmxplayerGUI works differently: It looks like it's playing the video inside a window, but
in fact the video area is still running in a screen overlay; you will immediately notice
that, if you move another window on top of the video window: the video is shining
through. But nevertheless you can move or resize the video window and the video size
and position will immediately match the new window size and position without
breaking the video playback. You can also hide the video window and let it play on in the
background.

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

Posted: Sat Jul 01, 2017 7:52 pm
by kreisler
Just wondering, do i need to perform the instructions from the OP?

i installed Synaptic Package Manager and can see seven(7) 'VLC entries' with "Installed Version: 2.2.6-1~deb8u1". so i do "Mark for Removal", not "Mark for Complete Removal", yes?

My point is, i have the latest Raspbian, and VLC Player came preinstalled afaik. So why didn't the Raspbian release team (Simon Long et al.) do all the changes and include HW acceleration in the first place? Feels weird that we end consumers have to optimize the raspi OS :shock:

I have a 4.36GB MKV 60fps 4500Kbps ~2h video file 720p (HD file, not FullHD) and VLC Player shows a black screen while i am hearing the audio just fine.

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

Posted: Sat Jul 01, 2017 8:13 pm
by fruitoftheloom
kreisler wrote:Just wondering, do i need to perform the instructions from the OP?

i installed Synaptic Package Manager and can see 7 entries with "Installed Version: 2.2.6-1~deb8u1". so i do "Mark for Removal", not "Mark for Complete Removal", yes?

My point is, i have the latest Raspbian, and VLC Player came preinstalled. Why didn't the Raspbian release team do all the changes or include HW acceleration?

I have a 4.5GB MKV file 720p (HD file, not FullHD) and VLC Player shows a black screen while i am hearing the audio just fine.
VLC is not installed by default AFAIAA ;)

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

Posted: Sat Jul 01, 2017 11:36 pm
by kreisler
Oki, i followed the instructions from the OP and my challenging big video file is playing now as video overlay on the HDMI monitor. VNC viewer phone app shows the VLC's orange logo symbol on a black screen background, (again) no motion picture!, and i am able to control the video overlay through my phone, as long as the WiFi connection (or the VNC server) doesn't crash ;)
The video runs super smoothly (on the HDMI monitor) and the CPU-GPU indicator shows 15~17%. That's quite low, isn't it? :o

So the drawback is, we can't see the super smooth video headlessly through remote access like VNC viewer, or can we? :?

And how do we update to 2.2.6?
http://download.videolan.org/vlc/2.2.6/

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

Posted: Sun Jul 02, 2017 1:52 am
by gkreidl
kreisler wrote:Oki, i followed the instructions from the OP and my challenging big video file is playing now as video overlay on the HDMI monitor. VNC viewer phone app shows the VLC's orange logo symbol on a black screen background, (again) no motion picture!, and i am able to control the video overlay through my phone, as long as the WiFi connection (or the VNC server) doesn't crash ;)
The video runs super smoothly (on the HDMI monitor) and the CPU-GPU indicator shows 15~17%. That's quite low, isn't it? :o

So the drawback is, we can't see the super smooth video headlessly through remote access like VNC viewer, or can we? :?

And how do we update to 2.2.6?
http://download.videolan.org/vlc/2.2.6/
I've met this misunderstanding again and again: You cannot watch video in real time across a VNC connection. A simple calculation (width x height * fps * bytes/pixel) will show this if you compare the result to the network bandwidth (100 MBit for ethernet, usually less for WiFi). RealVNC has some special mode which may include overlays, but this doesn't solve the bandwidth problem. To watch video in real time you have to connect a monitor to the RPi.

There's another misunderstanding concerning "Raspbian": Raspbian from raspbian.net is just Debian recompiled for ARMv6 without any Raspberry Pi specific patches. On top of this is the repository of raspberrypi.org, which adds a lot of additional stuff like Wolfram, RealVNC and chromium and also replaces a number of Raspbian packages with other versions containing Raspberry Pi specific modifications. This repository also delivers the firmware and the kernel. It does not include a HW accelerated version of VLC.

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

Posted: Mon Jul 03, 2017 5:47 pm
by kreisler
I've installed kweb. Has HW acceleration in the omxplayerGUI too, so maybe VLC player isn't needed after all. Thanks for your comments

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

Posted: Mon Jul 03, 2017 10:32 pm
by cjan
kreisler wrote:I've installed kweb. Has HW acceleration in the omxplayerGUI too, so maybe VLC player isn't needed after all. Thanks for your comments
vlc can play dvb-t.

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

Posted: Tue Jul 04, 2017 11:13 pm
by cjan
when do 'git pull' from git, does need 'bootstrap & configure' over again?