How to install ffmpeg libs for MIPSEL platform using console

Advance

Before installation make sure that you have enough space in your rootfs. You need at least 15MB free space. To check free space in your rootfs you can use following command:

df -h /

Sample output:

    Filesystem                Size      Used Available Use% Mounted on
    ubi0:rootfs             440.3M    183.2M    257.0M  42% /

 



To choose the correct ffmpeg package for your image you need to find out the following:

  1. OpenSSL version
  2. glibc version
  3. hard/soft float

 

1. How to check your OpenSSL version:


Connect to your STB console, for example, using a programme called PuTTy. Then execute following command:

openssl version

Sample output:

OpenSSL 1.0.2d 9 Jul 2015

In that case we know that we have version 1.0.2

In case when you get the following output:

-sh: openssl: not found

You must check OpenSSL version as follow:

ls -la /usr/lib/libssl*

Example output:
-rwxr-xr-x    1 root     root        383624 Aug 19  2015 /usr/lib/libssl.so.0.9.8

In this example the OpenSSL version is 0.9.8

When you get:

/usr/lib/libssl.so.1.0.0

you must do an additional check:

grep OPENSSL /usr/lib/libssl.so.1.0.0

Sample output:

    OPENSSL_cleanse
    OPENSSL_DIR_read
    OPENSSL_DIR_end
    OPENSSL_1.0.0
    OPENSSL_1.0.1
    OPENSSL_1.0.1d
    OPENSSL_1.0.2
    OPENSSL_DIR_read
    OPENSSL_malloc Error

In this example we have version 1.0.2

 

2. How to check glibc version:


Checking glibc version is very easy:

ls -la /lib/libc-*

Example output:

-rwxr-xr-x    1 root     root       1541476 Aug 19  2015 /lib/libc-2.21.so

In this example we have version 2.21

If you have glibc version lower than 2.20 you need to use package for _old_

 

3. Checking for hard/soft float:


To check if you have HARD or SOFT FLOAT glibc you need execute following commands:

cd /tmp
wget http://iptvplayer.pl/tools/mipsel/readelf
chmod 777 readelf
./readelf -a /lib/libc-*.so | grep FP:
rm readelf

Example output:

Tag_GNU_MIPS_ABI_FP: Soft float

or

Tag_GNU_MIPS_ABI_FP: Hard float (double precision)

 



When you already know versions of:

  1. OpenSSL
  2. glibc
  3. FPU mode

you are ready to choose ffmpeg package.

All packages are available here: http://iptvplayer.pl/resources/

Packages for MIPSEL platforms:

  • ffmpeg3.2.2_mipsel_fpu_hard_openssl0.9.8_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.0_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_hard_openssl0.9.8_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_hard_openssl1.0.0_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_fpu_soft_openssl0.9.8_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_fpu_soft_openssl1.0.0_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_fpu_soft_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_soft_openssl0.9.8_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_soft_openssl1.0.0_dash_librtmp_native_rtmp.tar.gz
  • ffmpeg3.2.2_mipsel_old_fpu_soft_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz

 

ffmpeg installation procedure


For example if you have:

  • OpenSSL: 1.0.2
  • glibc: 2.22
  • Hard float

Then the valid package for you it is:

ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz

and you can install it using following commands:

cd /tmp
wget  http://iptvplayer.pl/resources/ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz
tar -xvf ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz -C /
rm ffmpeg3.2.2_mipsel_fpu_hard_openssl1.0.2_dash_librtmp_native_rtmp.tar.gz

You should always collect output returned by install command, it will be useful when installation failed.

After installation you should check if the ffmpeg is working correctly using following command:

ffmpeg -version

Sample output:

ffmpeg version 3.2.2 Copyright (C) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --sysroot=/mnt/new2/xspeedlx1/build-enviroment/builds/openatv/release/et4x00/tmp/sysroots/et4x00 --cross-prefix=mipsel-oe-linux- --prefix=/mnt/new2/_BRCM_/exteplayer3/tmp/ffmpeg/tmp/mipsel/ffmpeg-3.2.2/usr/ --enable-cross-compile --target-os=linux --arch=mipsel --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --enable-pic --enable-shared --disable-static --disable-debug --disable-ffplay --disable-ffprobe --disable-ffserver --disable-outdevs --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-lzma --enable-openssl --enable-zlib --enable-cross-compile --enable-small --disable-sdl --disable-xlib --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-nonfree --disable-muxers --disable-encoders --disable-devices --enable-librtmp --extra-cflags=' -mel -mabi=32 -march=mips32 -I/mnt/new2/xspeedlx1/build-enviroment/builds/openatv/release/et4x00/tmp/sysroots/et4x00/usr/include/libxml2/ -I/mnt/new2/new_openssl_mipsel/openssl-1.0.2g/include/ -L/mnt/new2/new_openssl_mipsel/openssl-1.0.2g/ -L/mnt/new2/new_openssl_mipsel/rtmpdump/librtmp/ ' --extra-ldflags=' -L/mnt/new2/new_openssl_mipsel/openssl-1.0.2g/ -L/mnt/new2/new_openssl_mipsel/rtmpdump/librtmp/ -lssl -lcrypto -lrtmp -lxml2 '
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100