Jump to content

stamasd

Members
  • Posts

    23
  • Joined

  • Last visited

Reputation Activity

  1. Like
    stamasd reacted to RagnerBG in ffmpeg on orange pi PC   
    It's not that hard to build ffmpeg on Armbian, directly from official source. I will show all steps i am using and all codecs i install, if some is not needed, skip and remove it from ffmpeg ./config. First i create some temporary folder, it's named "t" in this example. Then we can get dependencies with "apt-get build-dep". As ffmpeg is present in Ubuntu repositories, we can get directly:
    sudo apt-get update sudo apt-get build-dep ffmpeg But in Debian ffmpeg is not present, so we can get deps for libav:
    sudo apt-get update sudo apt-get build-dep libav It's also a good idea to have ffmpeg support samba, so we can install it too:
    sudo apt-get install samba samba-common attr samba-vfs-modules smbclient Get some more dependencies:
    sudo apt-get install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev We will probably need this packages too:
    cd t wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz tar xzvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure --prefix=/usr make -j2 sudo make install cd .. tar -xjvf fribidi-0.19.7.tar.bz2 cd fribidi-0.19.7 ./configure make sudo make install cd .. http://savannah.nongnu.org/download/freetype/ wget http://download.savannah.gnu.org/releases/freetype/freetype-2.6.3.tar.bz2 tar xjvf freetype-2.6.3.tar.bz2 cd freetype-2.6.3 sh autogen.sh make setup ansi make -j2 cd .. Let's install some codecs, avoid what you don't need:
    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 https://sourceforge.net/projects/lame/files/lame/ tar -xzvf lame-3.99.5.tar.gz cd lame-3.99.5 ./configure make -j2 sudo make install cd .. git clone http://git.videolan.org/git/x262.git cd x262 ./configure --prefix=/usr --enable-static --enable-shared make -j2 sudo make install sudo ldconfig cd .. git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-static --enable-shared make -j2 sudo make install sudo ldconfig cd .. video4linux/libv4l2 git clone git://linuxtv.org/v4l-utils.git cd v4l-utils ./bootstrap.sh ./configure make -j2 sudo make install cd .. 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 cd .. wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz tar xzvf opus-1.1.tar.gz cd opus-1.1 ./configure make -j2 sudo make install cd .. wget http://storage.googleapis.com/downloads.webmproject.org/releases/webm/libvpx-1.5.0.tar.bz2 tar xjvf libvpx-1.5.0.tar.bz2 cd libvpx-1.5.0 ./configure --prefix=/usr --disable-examples --disable-unit-tests make -j2 sudo make install cd .. sudo apt-get install flac git clone https://github.com/libass/libass.git cd libass ./autogen.sh ./configure --prefix=/usr make -j2 sudo make install cd .. https://www.xiph.org/downloads/ wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz tar xJvf libogg-1.3.2.tar.xz cd libogg-1.3.2 ./configure make -j2 sudo make install cd .. wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz tar xJvf libvorbis-1.3.5.tar.xz cd libvorbis-1.3.5 ./configure make -j2 sudo make install cd .. If you need x265 (as H3 support HEVC/H265) this is a tricky one and took me some time to deal with, because of a bug, so it need special attention. We need shared libraries but we will get error during make. So first some dependencies:
    sudo apt-get install mercurial cmake cmake-curses-gui build-essential hg clone https://bitbucket.org/multicoreware/x265 We have to modify one file, so shared version can be build. Open the following file:
    nano /t/x265/source/common/primitives.cpp
    and locate this lines:
    - #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 Remove the two lines with "-" in front and save (ctrl+o, ctrl+x). Now we can build what we need:
    cd x265/build/linux ./make-Makefiles.bash #> c > g make -j2 sudo make install sudo ldconfig cd ~/t As we have all packages and codecs we need, we can build ffmpeg:
    wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 tar xjvf ffmpeg-snapshot.tar.bz2 cd ffmpeg ./configure --prefix=/usr --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 make -j2 sudo make install This will take a while, but i think it worth.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines