Jump to content


Photo

h.265


  • Please log in to reply
17 replies to this topic

#1 zmicro

zmicro

    Member

  • Senior Members
  • PipPip
  • 18 posts

Posted 04 May 2016 - 09:26 AM

Does armbian support h.265 video codec?

 

It seems that mpv player can reproduce only audio...

 

Should we install any codec?

 

thanks in advance



#2 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 04 May 2016 - 09:54 AM

Does armbian support h.265 video codec?

 

If you install the Desktop version of Armbian 5.10 then the following list of codecs (containing h.265 with 8 bit but not 10 bit!) is available for HW accelerated decoding: http://linux-sunxi.o...ed_codec_matrix


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#3 zmicro

zmicro

    Member

  • Senior Members
  • PipPip
  • 18 posts

Posted 04 May 2016 - 07:53 PM

Thanks very much

#4 zmicro

zmicro

    Member

  • Senior Members
  • PipPip
  • 18 posts

Posted 04 May 2016 - 09:01 PM

5.10 server installed
Libvdpau-sunxi are preinstalled
Downloaded a sample video -> checked 8bit with mediainfo
Video is not showing, only audio.

Is there a way to check if codec are running?

Probably i'm too noob for orangepi :)

#5 Seasalt

Seasalt

    Advanced Member

  • Senior Members
  • PipPipPip
  • 38 posts

Posted 08 May 2016 - 02:04 PM

 

If you install the Desktop version of Armbian 5.10 then the following list of codecs (containing h.265 with 8 bit but not 10 bit!) is available for HW accelerated decoding: http://linux-sunxi.o...ed_codec_matrix

 

Is 8 Bit versus 10 Bit a limitation. Can the Orange Pi PC with Armbian 1.10 decode all HEVC 8 or 10 bit encoding to 8 bit decoding, or can it ONLY do 8bit encoded to 8 bit decoding?

Seasalt.

#6 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 08 May 2016 - 03:14 PM

5.10 server installed
Libvdpau-sunxi are preinstalled
Downloaded a sample video -> checked 8bit with mediainfo
Video is not showing, only audio.

Is there a way to check if codec are running?

Probably i'm too noob for orangepi :)

I don't know how build-in mpv in Desktop Armbian behave. But i am using my own built of mpv and it play h265 video fine. I tried several videos, including 4k resolution and they all played with very low CPU usage. OPI PC is great device for such purpose, fueled by Armbian, of course :). I don't know if you want to try this, but here are the basic steps i think should be enough to build it yourself too. Some of this may be redundant, but this way works for me.

 

First the newest version of libvdpau-sunxi is needed for h265 and especially for subtitles support. As i don't know what is in Desktop Armbian, i will post this too. First make some temporary directory, it's "t". located in ~home in my example. We need livdpau>=1.1, so:

cd t
wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau1_1.1.1-3_armhf.deb
wget http://ftp.de.debian.org/debian/pool/main/libv/libvdpau/libvdpau-dev_1.1.1-3_armhf.deb
wget http://ftp.de.debian.org/debian/pool/main/v/vdpauinfo/vdpauinfo_1.0-1+b1_armhf.deb
sudo dpkg -i libvdpau1_1.1.1-3_armhf.deb
sudo dpkg -i libvdpau-dev_1.1.1-3_armhf.deb
sudo dpkg -i vdpauinfo_1.0-1+b1_armhf.deb

Then libvdpau-sunxi:

git clone https://github.com/linux-sunxi/libcedrus.git
cd libcedrus
make
sudo make install
cd ..

wget http://cairographics.org/releases/pixman-0.34.0.tar.gz
tar -xzvf pixman-0.34.0.tar.gz
cd pixman-0.34.0
./configure
make -j4
sudo make install
cd ..

git clone https://github.com/linux-sunxi/libvdpau-sunxi.git
cd libvdpau-sunxi
make
sudo make install

We need to "export VDPAU_DRIVER=sunxi", "export VDPAU_DISABLE_G2D=1" and for subtitles support "export VDPAU_OSD=1". As i had a lot of troubles with this and never new for sure where is the correct place for this, i do it in several places. So put this:

export VDPAU_DRIVER=sunxi
export VDPAU_OSD=1
export VDPAU_DISABLE_G2D=1

in /etc/environment , in /home/"user"/.bashrc  and in /etc/X11/Xsession.d/ create file named "90environment" (sudo nano /etc/X11/Xsession.d/90environment) and put the lines there too. This is all done for libvdpau-sunxi.

 

For mpv, first get dependencies:

sudo apt-get update
sudo apt-get build-dep libav
sudo apt-get build-dep mpv

If you want youtube support, install youtube-dl:

sudo curl https://yt-dl.org/downloads/2016.02.27/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Install x264:

git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static --enable-shared
make -j4
sudo make install
sudo ldconfig
cd ..

and get x265:

sudo apt-get install mercurial cmake cmake-curses-gui build-essential
hg clone https://bitbucket.org/multicoreware/x265

There is a bug here and we can't build shared libraries, so before compilation open this file x265/source/common/primitives.cpp (sudo nano x265/source/common/primitives.cpp) and at the end remove the lines i marked with "-" in front:

- #if ENABLE_ASSEMBLY && X265_ARCH_ARM == 0
  void PFX(cpu_neon_test)(void) {}
  int PFX(cpu_fast_neon_mrc_test)(void) { return 0; }
- #endif
  }
  #endif

now compile and install x265:

cd x265/build/linux
./make-Makefiles.bash
make -j4
sudo make install
sudo ldconfig
cd ~/t

I used to install some other codecs, but this should be enough for most people. Now the mpv itself:

sudo apt-get install git devscripts equivs
git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
./update
rm -f mpv-build-deps_*_*.deb
mk-build-deps -s sudo -i

.deb part is to get some more dependencies. This may not be necessary, but i remember i had build errors because of this before.

Put some options for ffmpeg:

echo --enable-nonfree >> ffmpeg_options
echo --enable-gpl >> ffmpeg_options
echo --enable-version3 >> ffmpeg_options
echo --enable-vdpau >> ffmpeg_options
echo --enable-libass >> ffmpeg_options
echo --enable-libfdk-aac >> ffmpeg_options
echo --enable-libfreetype >> ffmpeg_options
echo --enable-libmp3lame >> ffmpeg_options
echo --enable-libopus >> ffmpeg_options
echo --enable-libtheora >> ffmpeg_options
echo --enable-libvorbis >> ffmpeg_options
echo --enable-libvpx >> ffmpeg_options
echo --enable-libpulse >> ffmpeg_options
echo --enable-libv4l2 >> ffmpeg_options
echo --enable-libx264 >> ffmpeg_options
echo --enable-libx265 >> ffmpeg_options
echo --enable-libmpv-shared > mpv_options

If you miss some of this codecs just skip the line, or remove it later from ~/t/mpv-build/ffmpeg_options file. Finish building and installation:

./rebuild -j4
sudo ./install

That's all

 

Optionally, you can add your config in file, so you don't write it every time - sudo nano /usr/local/etc/mpv/mpv.conf :

vo=vdpau
hwdec=vdpau
framedrop=vo
hwdec-codecs=all
ao=alsa:device=[hw:1,0]
slang=bg,en,
fs=yes

"slag" line is for subtitles, you can replace "bg" with your language, or remove it at all.



#7 john0815

john0815

    Member

  • Senior Members
  • PipPip
  • 11 posts

Posted 08 May 2016 - 07:26 PM

How many time needs this part:

 

now compile and install x265:

cd x265/build/linux
 

-->   ./make-Makefiles.bash > c , g

 

it hangs at this point.

 

 

later:

the process isnt finishing without mistakes.

 

eg.

 

root@orangepiplus2:~/vdpau/mpv-build# mk-build-deps -s sudo -i
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dpkg-gencontrol: Warnung: File::FcntlLock nicht verfügbar: verwende flock, der für NFS nicht sicher ist
dh_md5sums
dh_builddeb
dpkg-deb: Paket »mpv-build-deps« wird in »../mpv-build-deps_0.17.0_armhf.deb« gebaut.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
Vormals nicht ausgewähltes Paket mpv-build-deps wird gewählt.
(Lese Datenbank ... 175821 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von mpv-build-deps_0.17.0_armhf.deb ...
Entpacken von mpv-build-deps (1:0.17.0) ...
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Abhängigkeiten werden korrigiert ... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libsdl2-2.0-0 libxkbcommon-dev
Verwenden Sie »apt-get autoremove«, um sie zu entfernen.
Die folgenden zusätzlichen Pakete werden installiert:
  libegl1-mesa-dev
Die folgenden NEUEN Pakete werden installiert:
  libegl1-mesa-dev
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
1 nicht vollständig installiert oder entfernt.
Es müssen noch 0 B von 50,7 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 113 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n] j
(Lese Datenbank ... 175825 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../libegl1-mesa-dev_10.3.2-1+deb8u1_armhf.deb ...
Entpacken von libegl1-mesa-dev:armhf (10.3.2-1+deb8u1) ...
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/libegl1-mesa-dev_10.3.2-1+deb8u1_armhf.deb (--unpack):
 Versuch, »/usr/include/KHR/khrplatform.h« zu überschreiben, welches auch in Paket sunxi-mali-r3p0 4.0.0.0 ist
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/libegl1-mesa-dev_10.3.2-1+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
(Lese Datenbank ... 175825 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von mpv-build-deps (1:0.17.0) ...
mk-build-deps: apt-get install call failed

root@orangepiplus2:~/vdpau/mpv-build#

 

 

and later

 

 

root@orangepiplus2:~/vdpau/mpv-build# ./rebuild -j4
+ git pull --rebase
Current branch master is up to date.
+ do_clone_all
+ do_clone ffmpeg https://github.com/FFmpeg/FFmpeg.git
+ set -ex
+ test -e ffmpeg
+ cd ffmpeg
+ git remote set-url origin https://github.com/FFmpeg/FFmpeg.git
+ git fetch
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 34 (delta 6), reused 34 (delta 6), pack-reused 0
Unpacking objects: 100% (34/34), done.
From https://github.com/FFmpeg/FFmpeg
   5df703a..0193858  master     -> origin/master
+ do_clone fribidi http://anongit.freed...idi/fribidi.git
+ set -ex
+ test -e fribidi
+ cd fribidi
+ git remote set-url origin http://anongit.freed...idi/fribidi.git
+ git fetch
+ do_clone libass https://github.com/libass/libass.git
+ set -ex
+ test -e libass
+ cd libass
+ git remote set-url origin https://github.com/libass/libass.git
+ git fetch
+ do_clone mpv https://github.com/mpv-player/mpv.git
+ set -ex
+ test -e mpv
+ cd mpv
+ git remote set-url origin https://github.com/mpv-player/mpv.git
+ git fetch
+ do_releasetag ffmpeg n
+ cd ffmpeg
+ git tag
+ grep -v rc
+ grep -v dev
+ versort_with_prefix n
+ tail -n 1
+ sed -e s/^/n/
+ sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4
+ sed -n -e s/^n\([0-9]\)/\1/p
+ version=n3.0.2
+ git checkout --detach refs/tags/n3.0.2
HEAD is now at c66f4d1... Changelog: Fix minor formating inconsistency
+ do_releasetag fribidi
+ cd fribidi
+ git tag
+ grep -v rc
+ grep -v dev
+ tail -n 1
+ versort_with_prefix
+ sort -n -t . -k 1,1 -k+ sed -e s/^//
+ sed -n -e s/^\([0-9]\)/\1/p
 2,2 -k 3,3 -k 4,4
+ version=0.19.7
+ git checkout --detach refs/tags/0.19.7
HEAD is now at 1a6935c... 0.19.7
+ do_gitmaster libass
+ set -ex
+ cd libass
+ git checkout --detach origin/master
HEAD is now at 6a61a7a... rasterizer: drop outlines with points at too large coordinates
+ git remote prune origin
+ do_releasetag mpv v
+ cd mpv
+ git tag
+ grep -v dev
+ tail -n 1
+ grep -v rc
+ versort_with_prefix v
+ sed -n -e s/^v\([0-9]\)/\1/p
+ sed -e s/^/v/
+ sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4
+ version=v0.17.0
+ git checkout --detach refs/tags/v0.17.0
HEAD is now at 0536841... Release 0.17.0
+ do_update_debian_versions
+ scripts/debian-update-versions
+ do_bootstrap
+ scripts/mpv-bootstrap
Found 'waf', skipping download.
'distclean' finished successfully (0.024s)
Running autoreconf...
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:6: installing './compile'
configure.ac:6: installing './config.guess'
configure.ac:6: installing './config.sub'
configure.ac:2: installing './install-sh'
configure.ac:2: installing './missing'
libass/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking dependency style of gcc... gcc3
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for stdint.h... (cached) yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for strdup... yes
checking for strndup... yes
checking for library containing libiconv_open... no
checking for library containing iconv_open... none required
checking for fabs in -lm... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for FREETYPE... yes
checking for FRIBIDI... yes
checking for FONTCONFIG... yes
checking for CORETEXT... no
checking for DIRECTWRITE... no
checking for HARFBUZZ... yes
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libass/Makefile
config.status: creating test/Makefile
config.status: creating profile/Makefile
config.status: creating libass.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make: Entering directory '/root/vdpau/mpv-build/libass'
Making install in libass
make[1]: Entering directory '/root/vdpau/mpv-build/libass/libass'
  CC       ass_cache.lo
  CC       ass_font.lo
  CC       ass_fontselect.lo
  CC       ass.lo
  CC       ass_render.lo
  CC       ass_utils.lo
  CC       ass_bitmap.lo
  CC       ass_blur.lo
  CC       ass_library.lo
  CC       ass_drawing.lo
  CC       ass_parse.lo
  CC       ass_render_api.lo
  CC       ass_shaper.lo
  CC       ass_strtod.lo
  CC       ass_fontconfig.lo
  CC       ass_string.lo
  CC       ass_rasterizer.lo
  CC       ass_rasterizer_c.lo
  CCLD     libass.la
make[2]: Entering directory '/root/vdpau/mpv-build/libass/libass'
 /bin/mkdir -p '/root/vdpau/mpv-build/build_libs/lib'
 /bin/mkdir -p '/root/vdpau/mpv-build/build_libs/include/ass'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libass.la '/root/vdpau/mpv-build/build_libs/lib'
 /usr/bin/install -c -m 644 ass.h ass_types.h '/root/vdpau/mpv-build/build_libs/include/ass'
libtool: install: /usr/bin/install -c .libs/libass.lai /root/vdpau/mpv-build/build_libs/lib/libass.la
libtool: install: /usr/bin/install -c .libs/libass.a /root/vdpau/mpv-build/build_libs/lib/libass.a
libtool: install: chmod 644 /root/vdpau/mpv-build/build_libs/lib/libass.a
libtool: install: ranlib /root/vdpau/mpv-build/build_libs/lib/libass.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /root/vdpau/mpv-build/build_libs/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /root/vdpau/mpv-build/build_libs/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Leaving directory '/root/vdpau/mpv-build/libass/libass'
make[1]: Leaving directory '/root/vdpau/mpv-build/libass/libass'
make[1]: Entering directory '/root/vdpau/mpv-build/libass'
make[2]: Entering directory '/root/vdpau/mpv-build/libass'
make[2]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/root/vdpau/mpv-build/build_libs/lib/pkgconfig'
 /usr/bin/install -c -m 644 libass.pc '/root/vdpau/mpv-build/build_libs/lib/pkgconfig'
make[2]: Leaving directory '/root/vdpau/mpv-build/libass'
make[1]: Leaving directory '/root/vdpau/mpv-build/libass'
make: Leaving directory '/root/vdpau/mpv-build/libass'
Auto-enabling GnuTLS.
Using ffmpeg options: --enable-gpl --disable-debug --disable-doc --enable-pic --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libpulse --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-gnutls

ERROR: libfdk_aac not found

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.



 



#8 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 08 May 2016 - 09:35 PM

How many time needs this part:

 

now compile and install x265:

cd x265/build/linux
 

-->   ./make-Makefiles.bash > c , g

 

 

ERROR: libfdk_aac not found

 

You have to execute ./make-Makefiles.bash only, then press "c" for configure and then press "g" for generate. Sorry if it's been unclear, but it's written in cmake description, i just put this there for my ease. And before this, you have to modify primitives.cpp file, as i wrote, or you will have error during "make".

About other problem i can't help you much, i don't understand german :). Seems like you have some conflict with libegl1-mesa-dev:armhf . Try to install libegl1-mesa-dev manually and repeat this step.

And the last i already mention. In "echo --enable-xxx >> ffmpeg_options" i add some codecs i installed before, which i don't mention, because i think only x264 and x265 are important and Armbian/Debian have most of these codecs built-in. If you have some not found error in ffmpeg build part, just remove this line in ~/t/mpv-build/ffmpeg_options file and repeat ./rebuild . If you still have error after this, that's mean this is crucial component and can't be skipped. In this case you have to install it first and repeat. I guess libfdk_aac is important, so you can build it this way:

cd t
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.4.tar.gz
tar xzvf fdk-aac-0.1.4.tar.gz
cd fdk-aac-0.1.4
./configure --prefix=/usr --disable-static
make -j2
sudo make install


#9 john0815

john0815

    Member

  • Senior Members
  • PipPip
  • 11 posts

Posted 09 May 2016 - 09:27 PM

 

You have to execute ./make-Makefiles.bash only, then press "c" for configure and then press "g" for generate. Sorry if it's been unclear, but it's written in cmake description, i just put this there for my ease. And before this, you have to modify primitives.cpp file, as i wrote, or you will have error during "make".

About other problem i can't help you much, i don't understand german :). Seems like you have some conflict with libegl1-mesa-dev:armhf . Try to install libegl1-mesa-dev manually and repeat this step.

And the last i already mention. In "echo --enable-xxx >> ffmpeg_options" i add some codecs i installed before, which i don't mention, because i think only x264 and x265 are important and Armbian/Debian have most of these codecs built-in. If you have some not found error in ffmpeg build part, just remove this line in ~/t/mpv-build/ffmpeg_options file and repeat ./rebuild . If you still have error after this, that's mean this is crucial component and can't be skipped. In this case you have to install it first and repeat. I guess libfdk_aac is important, so you can build it this way:

cd t
wget http://downloads.sourceforge.net/opencore-amr/fdk-aac-0.1.4.tar.gz
tar xzvf fdk-aac-0.1.4.tar.gz
cd fdk-aac-0.1.4
./configure --prefix=/usr --disable-static
make -j2
sudo make install

 Thank you - it works



#10 dony71

dony71

    Advanced Member

  • Senior Members
  • PipPipPip
  • 67 posts

Posted 18 May 2016 - 02:47 AM

RagnerBG,

 

I couldn't find 

- #if ENABLE_ASSEMBLY && X265_ARCH_ARM == 0

in

x265/source/common/primitives.cpp

but I find 

#if X265_ARCH_ARM

 

so I remove this.
However while "make -j4", I have this error
Scanning dependencies of target common
[ 21%] Built target encoder
[ 22%] Building CXX object common/CMakeFiles/common.dir/primitives.cpp.o
[ 56%] Built target common
Linking CXX shared library libx265.so
Linking CXX static library libx265.a
/usr/bin/ld: encoder/CMakeFiles/encoder.dir/analysis.cpp.o: relocation R_ARM_MOVW_ABS_NC against `_ZN4x26510g_log2SizeE' can not be used when making a shared object; recompile with -fPIC
encoder/CMakeFiles/encoder.dir/analysis.cpp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/x265-shared.dir/build.make:220: recipe for target 'libx265.so.84' failed
make[2]: *** [libx265.so.84] Error 1
CMakeFiles/Makefile2:158: recipe for target 'CMakeFiles/x265-shared.dir/all' failed
make[1]: *** [CMakeFiles/x265-shared.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 77%] Built target x265-static
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
 


#11 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 18 May 2016 - 09:44 PM

 

RagnerBG,

 

I couldn't find 

- #if ENABLE_ASSEMBLY && X265_ARCH_ARM == 0

in

x265/source/common/primitives.cpp

but I find 

#if X265_ARCH_ARM

Huh, this is my favorite developers behavior. Make some minor change and ruin something that hasn't any problems before. You are right, i check it and my "fix" doesn't work any more. The primitives.cpp file is the same, except those 2 lines, but built failing with or without it. And i have to note, the whole last lines of this file are the "fix" for ARM architecture, discovered before, but this checking in "#if ENABLE_ASSEMBLY && X265_ARCH_ARM == 0" doesn't work, so i just remove it. Maybe it's because there is separate build instructions for ARM - ARM Instructions, but when i try to execute "./make-Makefiles.bash" in "x265/build/arm-linux" i got permission denied, but you may try this as well if you know what to fix, i can only guess, it searching for something missing in armbian system.

Anyway, i can suggest you to using old working source, before those changes, for now. I upload it here - http://upload.bg/?ge...6ce4468b155a41b . And i intend to keep to it until someone find solution for newest version. Basically, if you try this on OrangePi PC, you should not need to build it, just untar it, enter "x265/build/linux" and execute "sudo make install". If something is not right (for example, because i use X11 version of mali driver, instead of framebuffer, as in Armbian Desktop), built it again with the above steps and maybe clean old build files before this, comparing with original source. As far, as i remember, only make-Makefiles.bash, need to be in x265/build/linux .



#12 dony71

dony71

    Advanced Member

  • Senior Members
  • PipPipPip
  • 67 posts

Posted 19 May 2016 - 01:54 AM

Huh, this is my favorite developers behavior. Make some minor change and ruin something that hasn't any problems before. You are right, i check it and my "fix" doesn't work any more. The primitives.cpp file is the same, except those 2 lines, but built failing with or without it. And i have to note, the whole last lines of this file are the "fix" for ARM architecture, discovered before, but this checking in "#if ENABLE_ASSEMBLY && X265_ARCH_ARM == 0" doesn't work, so i just remove it. Maybe it's because there is separate build instructions for ARM - ARM Instructions, but when i try to execute "./make-Makefiles.bash" in "x265/build/arm-linux" i got permission denied, but you may try this as well if you know what to fix, i can only guess, it searching for something missing in armbian system.

Anyway, i can suggest you to using old working source, before those changes, for now. I upload it here - http://upload.bg/?ge...6ce4468b155a41b . And i intend to keep to it until someone find solution for newest version. Basically, if you try this on OrangePi PC, you should not need to build it, just untar it, enter "x265/build/linux" and execute "sudo make install". If something is not right (for example, because i use X11 version of mali driver, instead of framebuffer, as in Armbian Desktop), built it again with the above steps and maybe clean old build files before this, comparing with original source. As far, as i remember, only make-Makefiles.bash, need to be in x265/build/linux .

 

I manage to get it working
What I did, comment out in x265/source/common/primitives.cpp

 
/*
#if X265_ARCH_ARM
void PFX(cpu_neon_test)(void) {}
int PFX(cpu_fast_neon_mrc_test)(void) { return 0; }
#endif // X265_ARCH_ARM
*/
 
then after execute ./make-Makefiles.bash, need to choose "ENABLE_PIC = ON" then press c, g
 
everything compile OK
however now I have problem execute mpv, got this error below
any idea? 
 
pi@bananapim2plus:~/Videos$ mpv Wildlife.wmv 
Playing: Wildlife.wmv
 (+) Video --vid=1 (vc1)
 (+) Audio --aid=1 --alang=eng (wmav2)
File tags:
 Comment: Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
 Title: Wildlife in HD
[vo/vdpau] Error when calling vdp_device_create_x11: 25
Error opening/initializing the selected video_out (-vo) device.
Video: no video
 


#13 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 19 May 2016 - 05:58 PM

I just tried the same file, taken from here and it plays fine:

30hm2zc.jpg

There is something on your side. With quick google-ing this either have something with environment variables, or with some modules not loaded, or have no correct permissions. Did you try this on Armbian Desktop, or add environment variables manually, as i shown above? "export VDPAU_DRIVER=sunxi" need to be set and perhaps before ffmpeg and mpv build, although it's usually there by default. I have the following modules in /etc/modules for H3:

disp
ump
mali
drm
mali_drm
ion

I also create file named 50-mali.rules in /etc/udev/rules.d , with the following contents for correct permissions:

KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
KERNEL=="disp", MODE="0660", GROUP="video"
KERNEL=="fb*", MODE="0660", GROUP="video"
KERNEL=="cedar_dev", MODE="0660", GROUP="video"
KERNEL=="ion", MODE="0660", GROUP="video"

You may try this as well. Or just start everything from scratch on clean image. This manual building is a little catchy and i always have sort of different results in every new try, even if i follow exactly the same steps.



#14 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 19 May 2016 - 06:19 PM

This manual building is a little catchy and i always have sort of different results in every new try, even if i follow exactly the same steps.

 

Can someone please enlighten me why it should be necessary going through 'this manual building' at all? We provide Server and Desktop versions of our OS images. The desktop version at least for H3/A10/A20 should already contain all the stuff that's needed to get HW accelerated video decoding (using mpv -- list of supported codes is still here). So where's the benefit trying to build this stuff from source?

 

I still want to understand the whole issue so that we might eventually be able to save users the hassles going through this since we simply add the missing stuff to the build system. Shouldn't it be better to improve the build process so that everything that's needed is part of a new Armbian image (and comes with apt-get update/upgrade)?


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#15 dony71

dony71

    Advanced Member

  • Senior Members
  • PipPipPip
  • 67 posts

Posted 19 May 2016 - 06:55 PM

Can someone please enlighten me why it should be necessary going through 'this manual building' at all? We provide Server and Desktop versions of our OS images. The desktop version at least for H3/A10/A20 should already contain all the stuff that's needed to get HW accelerated video decoding (using mpv -- list of supported codes is still here). So where's the benefit trying to build this stuff from source?

 

I still want to understand the whole issue so that we might eventually be able to save users the hassles going through this since we simply add the missing stuff to the build system. Shouldn't it be better to improve the build process so that everything that's needed is part of a new Armbian image (and comes with apt-get update/upgrade)?

 

Hi Kaiser,

 

I have desktop image from armbian.com for banana pi m2 plus platform and mpv is not working with that fresh image

Since not working, then try apt-get update and apt-get upgrade, but still not working

That's why I'm trying different things



#16 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 19 May 2016 - 06:55 PM

As for me, it's necessary because things works better with 'this manual building', at least for me. And i find LXDE more confortable as desktop environment. I appreciate your efforts to support more boards and to cover more functions and aspects, but i need to tweak thing a little for my easy. Armbian is almost perfect in hardware and networking support, but as you already mentioned, multimedia need more attention and is not yours main goal (nor mine, but it's fun to play with it :) ). I really would like to have newer mali driver in hands and to avoid all this vdpau workaround, but as i already read here, more skillful man is needed to cover this. Til then i read here and there and prefer to do thing my way, if i am able.



#17 dony71

dony71

    Advanced Member

  • Senior Members
  • PipPipPip
  • 67 posts

Posted 19 May 2016 - 07:18 PM

KERNEL=="mali", MODE="0660", GROUP="video"
KERNEL=="ump", MODE="0660", GROUP="video"
KERNEL=="disp", MODE="0660", GROUP="video"
KERNEL=="fb*", MODE="0660", GROUP="video"
KERNEL=="cedar_dev", MODE="0660", GROUP="video"
KERNEL=="ion", MODE="0660", GROUP="video"

You may try this as well. Or just start everything from scratch on clean image. This manual building is a little catchy and i always have sort of different results in every new try, even if i follow exactly the same steps.

 

Add those permission in 50-mali.rules in /etc/udev/rules.d helps. Now mpv working when playing locally

Now I try to play mpv via remote using X2GO

mpv is executing well, but no video (blank)

I don't see any error message either ....

You have any idea what's I'm missing?

 

pi@bananapim2plus:~/Videos$ mpv Wildlife.wmv 
Playing: Wildlife.wmv
 (+) Video --vid=1 (vc1)
 (+) Audio --aid=1 --alang=eng (wmav2)
File tags:
 Comment: Footage: Small World Productions, Inc; Tourism New Zealand | Producer: Gary F. Spradling | Music: Steve Ball
 Title: Wildlife in HD
[VDPAU SUNXI] VE version 0x1680 opened
[VDPAU SUNXI] OSD enabled, using pixman
AO: [alsa] 44100Hz stereo 2ch s32
Using software decoding.
VO: [vdpau] 1280x720 yuv420p
[osd/libass] PlayResX undefined, setting to -1
[VDPAU SUNXI] Presentation time not supported
AV: 00:00:10 / 00:00:30 (33%) A-V: -0.012

Attached Images

  • 2016-05-19_11-20-18.jpg


#18 RagnerBG

RagnerBG

    Advanced Member

  • Senior Members
  • PipPipPip
  • 160 posts

Posted 19 May 2016 - 07:41 PM

Sorry, i can't be of much help here. I planned to deal with remote desktops sooner, but have no experience yet. I know that most of protocols doesn't support a/v streaming, so it's normal to see black screen. There where some topics here and a sort of walkthroughs about this. From @hatahata and some other, i don't remember nickname, so check it out.