How to enable ffmpeg in yocto image

Hi
How to enable the ffmpeg in wp7608 yocto image

You can have a try on this:

1.download the yocto source and go to ./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc

2.add the following line:
IMAGE_INSTALL_append = " ffmpeg"

3.go to ./meta-swi/meta-swi-mdm9x28/conf/machine/swi-mdm9x28.conf
change UBI_ROOTFS_SIZE ?= “48MiB”

  1. Make the yocto image and download to the module

one more step before making the image:

./build_bin/conf/local.conf
add
LICENSE_FLAGS_WHITELIST=“commercial”

please share full path of ./build_bin/conf/local.conf
I am not getting build_bin in yocto

seems you need to build once by “make” when you first get the yocto source.

hi
I am followed your steps.but I’m not get ffmpeg.please help me

What did you see after typing make in PC?

first i get error and then i add LICENSE_FLAGS_WHITELIST=“commercial” in /build_bin/conf/local.conf, finally i got yocto_wp76xx.4k.cwe.

Please upload you cwe file here.
I will have a try.

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'

please check this

Seems the image is too big as you have embedded “ffmpeg”, please run the ffmpeg in RAM as mentioned above.

Requesting system reboot
[ 365.576888] reboot: Restarting system
[ 365.580355] Calling SCM to disable SPMI PMIØ
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.2-00095
S - IMAGE_VARIANT_STRING=LAATANAZA
S - OEM_IMAGE_VERSION_STRING=mktarg-wp76xx
S - Boot Config, 0x000002e1
B - 1216 - PBL, Start
B - 3720 - bootable_media_detect_entry, Start
B - 5007 - bootable_media_detect_success, Start
B - 5011 - elf_loader_entry, Start
B - 8467 - auth_hash_seg_entry, Start
B - 8693 - auth_hash_seg_exit, Start
B - 60077 - elf_segs_hash_verify_entry, Start
B - 107143 - PBL, End
B - 115503 - SBL1, Start
B - 173789 - pm_device_init, Start
B - 193949 - PM_SET_VAL:Skip
D - 18422 - pm_device_init, Delta
B - 195261 - boot_config_data_table_init, Start
D - 0 - boot_config_data_table_init, Delta - (0 Bytes)
B - 204014 - CDT version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:129
B - 210938 - sbl1_ddr_set_params, Start
B - 214750 - Pre_DDR_clock_init, Start
D - 213 - Pre_DDR_clock_init, Delta
D - 0 - sbl1_ddr_set_params, Delta
B - 227469 - pm_driver_init, Start
D - 4453 - pm_driver_init, Delta
B - 233752 - cpr_init, Start
D - 122 - cpr_init, Delta
B - 238327 - cpr_cx_mx_apc_vol_update, Start
D - 91 - cpr_cx_mx_apc_vol_update, Delta
B - 253607 - clock_init, Start
D - 152 - clock_init, Delta
B - 253821 - boot_flash_init, Start
D - 39802 - boot_flash_init, Delta
B - 296643 - boot_flash_swi_ddr_init, Start
D - 26901 - boot_flash_swi_ddr_init, Delta
B - 437370 - Invalid PMIC gpio 3
B - 437431 - Invalid PMIC gpio 3
B - 437461 - Failed to configure/read HW ID minor bit 0
B - 442768 - hw_family:5, hw_type:18, hw_rev:12
B - 451430 - SSMEM init OK
B - 452742 - ssmem_get: region 18 not exists
B - 454084 - cannot get SSMEM fwupdate region
B - 475525 - USB non-zero endpoint requirements: 9 in, 5 out
B - 477630 - opening partition 0:SWIFOTA
B - 20217260 - smart recovery counter cleared
B - 24957997 - VERSION=Fri Mar 6 10:30:31 UTC 2020,SIZE 0x2a4ba20, IMG_TYPE=0x8,NON-SPKG/FOTA IMG,SUBIMAGE=SYST,ERROR=Flash write failed: Image size out of range (0X83),STATUS=FAIL
B - 24969313 - API change: date not generated by cwe_header_init
B - 24973949 - API change: date not generated by cwe_header_init

hi
to add the ffmpeg.Please share the yocto_wp76xx.4k.cwe file

I cannot make it, that is why i run it in RAM.

mangoh@mangoh-vm:~$ sudo ifconfig usb0 192.168.2.3
SIOCSIFADDR: No such device
usb0: ERROR while getting interface flags: No such device

did you enable ECM port in AT!USBCOMP?

no i didn’t enable ECM port in AT!USBCOMP

then please enable it.

Hi

I am getting error like,
at
OK
AT!USBCOMP?
ERROR

then i add
at
OK
at!entercnd=“A710”
OK
AAt
OK
at!usbcomp?
Config Index: 1
Config Type: 1 (Generic)
Interface bitmask: 0008010D (diag,nmea,modem,rmnet0,ecm)

OK

please tell me,Is at!usbcomp? enabled or not?