How to enable ffmpeg in yocto image

you can also run the ffmpeg in RAM:

Step 1: type these in PC:

sudo ifconfig usb0 192.168.2.3

scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/bin/ffmpeg root@192.168.2.2:/tmp

scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libavcodec.so.57 root@192.168.2.2:/home/root

Step 2: type these in module :

mkdir /tmp/tmp_usr_lib;mkdir /tmp/tmp_usr_lib_wr;

mount -t overlay overlay /usr/lib -o lowerdir=/usr/lib,upperdir=/tmp/tmp_usr_lib,workdir=/tmp/tmp_usr_lib_wr;

ln -s /home/root/libavcodec.so.57 /usr/lib/libavcodec.so.57

chmod 777 /tmp/ffmpeg

Step 3: type these in PC:

scp ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libavdevice.so.57 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libavfilter.so.6 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libavformat.so.57 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libpostproc.so.54 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libswresample.so.2 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libswscale.so.4 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/image/usr/lib/libavutil.so.55 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot/usr/lib/libasound.so.2 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot/usr/lib/libx264.so.152 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot/usr/lib/libtheoraenc.so.1 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot/usr/lib/libtheoradec.so.1 ./build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot/usr/lib/libogg.so.0 root@192.168.2.2:/usr/lib

step 4L: now ffmpeg can be run on module:

root@swi-mdm9x28-wp:~# /tmp/ffmpeg

ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --disable-stripping --enable-pic --enable-shared --enable-pthreads --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-libxcb-shape --cross-prefix=arm-poky-linux-gnueabi- --ld='arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot' --cc='arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot' --cxx='arm-poky-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot' --arch=arm --target-os=linux --enable-cross-compile --extra-cflags='-DSIERRA -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0=/usr/src/debug/ffmpeg/3.4.2-r0 -fdebug-prefix-map=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot= -fdebug-prefix-map=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot-native= -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed' --sysroot=/home/owner/Yocto/WP76/R13.3/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/ffmpeg/3.4.2-r0/recipe-sysroot --enable-hardcoded-tables --libdir=/usr/lib --shlibdir=/usr/lib --datadir=/usr/share/ffmpeg --disable-mipsdsp --disable-mipsdspr2 --cpu=generic --pkg-config=pkg-config --disable-static --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --disable-avresample --enable-bzlib --enable-gpl --disable-libgsm --disable-indev=jack --disable-libvorbis --enable-lzma --disable-libmp3lame --disable-openssl --enable-postproc --disable-sdl2 --disable-libspeex --enable-swresample --enable-swscale --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvpx --enable-libx264 --disable-outdev=xv
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'