How to include x264enc on yocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to include x264enc on yocto

28,988 Views
tejasshah
Contributor III

DaianeAngolini

I have a wandboard-dual board and I am using master branch.

Here is my build configuration:

Build Configuration:

BB_VERSION        = "1.21.0"

BUILD_SYS         = "x86_64-linux"

NATIVELSBSTRING   = "Ubuntu-12.04"

TARGET_SYS        = "arm-poky-linux-gnueabi"

MACHINE           = "wandboard-dual"

DISTRO            = "poky"

DISTRO_VERSION    = "1.5+snapshot-20131030"

TUNE_FEATURES     = "armv7a vfp neon callconvention-hard cortexa9"

TARGET_FPU        = "vfp-neon"

I am doing a power consumption of video applications and therefore need to add x264enc to my image.

Now I have tried it two ways but x264 is not showing up in my final image.

1) First, I have placed gst-plugins-ugly-x264enc in local.conf file

COMMERCIAL_VIDEO_PLUGINS ?= " \

    gst-plugins-ugly-x264enc \

"

and added this line to local.conf file: @PACKAGECONFIG_pn_gstreamer1.0-plugins-ugly += "x264" to enable it.

This configuration gives me an error:

| Computing transaction...error: Can't install gst-meta-video-0.10-r13@cortexa9hf_vfp_neon: no package provides gst-plugins-ugly-x264enc

|

| Saving cache...

|

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_rootfs (log file is located at /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/wandboard_dual-poky-linux-gnueabi/fsl-image-gui/1.0-r0/temp/log.do_rootfs.16656)

ERROR: Task 7 (/home/pshah9/Desktop/yocto-master/fsl-community-bsp/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb, do_rootfs) failed with exit code '1'

NOTE: Tasks Summary: Attempted 6575 tasks of which 6522 didn't need to be rerun and 1 failed.

No currently running tasks (6575 of 6576)

Summary: 1 task failed:

  /home/pshah9/Desktop/yocto-master/fsl-community-bsp/sources/meta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb, do_rootfs

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.


2) Second, I have placed gst-plugins-ugly-meta in local.conf file

CORE_IMAGE_EXTRA_INSTALL += " \

       gst-plugins-ugly-meta \

"

and again added this line to local.conf file: PACKAGECONFIG_pn_gstreamer1.0-plugins-ugly += "x264"

Please help. It is urgent

Labels (2)
75 Replies

7,084 Views
mb1
Contributor III

Hi.

The solution is this in local.conf:

IMAGE_INSTALL_append = " \
        x264 \
        gstreamer1.0-plugins-ugly \
"

PACKAGECONFIG_append_pn-gstreamer1.0-plugins-ugly = " x264" 
0 Kudos
Reply

8,356 Views
daiane_angolini
NXP Employee
NXP Employee

Could you, please, try this recipe:

poky - Poky Build Tool and Metadata

Try bitbake x264_git before add this on your CORE_IMAGE_EXTRA_INSTALL, only to make sure the package name is OK

As I told in private message, my ubuntu machine is dead and I will not be able to work on your issue until it´s up again :smileysad:

8,356 Views
tejasshah
Contributor III

I am getting an error when I do bitbake x264_git :

ERROR: Nothing PROVIDES 'x264_git'

0 Kudos
Reply

8,356 Views
daiane_angolini
NXP Employee
NXP Employee

try to remove the _git

bitbake x264

I´m not confortable with this recipe, it looks like it´s not part of gstreamer.....

0 Kudos
Reply

8,355 Views
tejasshah
Contributor III

Yes, this one worked. It gives me

NOTE: Tasks Summary: Attempted 549 tasks of which 549 didn't need to be rerun and all succeeded.

Is there anything else I can do?

0 Kudos
Reply

8,355 Views
daiane_angolini
NXP Employee
NXP Employee

bitbake x264 will only build the package.

Go to work dir and try to find where it is built. try something like:

find work -name x264*

you should find a directory with the x264 source code, and two dir: package and packages-split

Go under package and try to find where the binaries are placed. Look if the binary you want is there (x264enc.so or libgstreamer_x264.so.0 I don´t know the file name, but with a ls you may find it)

Does this package provide what you need?

(after that we can try to install it in your image)

0 Kudos
Reply

8,356 Views
tejasshah
Contributor III

Ok, so I found package and package-split folder and inside them I found x264 binary file at

package/usr/bin/x264(binary file)

and .so files are here

package/lib/libx264.so

packages-split/x264/usr/lib/libx264.so.133

There are more libx264.so.133 instances in packages-split folder.

0 Kudos
Reply

8,356 Views
daiane_angolini
NXP Employee
NXP Employee

ok, in folder work/deploy/rpm (or ipk, or deb, depending on how your system in configured) you may find the rpm for x264.

Could you, please, try to install that package on a working rootfs? And see if it does provide what you need?

In order to install the package, for example, if it´s rpm, google will help you

https://www.google.com/search?q=install+rpm&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&cl...

Please, let me know the results

0 Kudos
Reply

8,356 Views
tejasshah
Contributor III

I have mounted the rootfs I have on the sdcard which I am using for booting.

In the mounted rootfs, I go to /usr/bin where all the executables

are placed, so I want x264 there, but when I try to use the following

command, it is looking for some dependencies:

$ rpm -ivh ~/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-dev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm

rpm: RPM should not be used directly install RPM packages, use Alien instead!

rpm: However assuming you know what you are doing...

warning: /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-dev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm: Header V4 DSA/SHA1 Signature, key ID d2a2fd9a: NOKEY

error: Failed dependencies:

  libx264-133 = r2265+git0+585324fee3-r0 is needed by libx264-dev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc6-dev is needed by libx264-dev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

Please let me know if I have used a wrong command.

0 Kudos
Reply

8,356 Views
AdCmo
Contributor III

Try the none "dev" one to see if the "dev" dependencies will go away.

Use "alien -i" instead of "rpm -ivh".

If you don't have alien and it is too much trouble to install it you can

still use:

"rpm -ivh" in spite of the warning.

Ad.

..........................

On Fri, Nov 1, 2013 at 10:22 AM, Tejas Shah

0 Kudos
Reply

8,356 Views
tejasshah
Contributor III

Hi Ad,

I used alien -i with the same package inside my /usr/bin directory and removes the problem of dependencies,

but gives this error now:

$~/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-dev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm is for architecture cortexa9hf_vfp_neon ; the package cannot be built on this system

0 Kudos
Reply

8,356 Views
AdCmo
Contributor III

No, you are still using the "dev" version. Use the non-dev version.

And try this first:

libx264-133-r2265git0585324fee3-r0.cortexa9hf_vfp_neon.rpm

Use rpm if alien objects just to know if this can be installed.

Ad.

................

On Fri, Nov 1, 2013 at 10:35 AM, Tejas Shah

0 Kudos
Reply

8,356 Views
tejasshah
Contributor III

Ok, so I am using the non-dev version with rpm command first and I get the dependencies error:

$ rpm -ivh ~/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm

rpm: RPM should not be used directly install RPM packages, use Alien instead!

rpm: However assuming you know what you are doing...

warning: /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm: Header V4 DSA/SHA1 Signature, key ID d2a2fd9a: NOKEY

error: Failed dependencies:

  rtld(GNU_HASH) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc.so.6(GLIBC_2.6) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc.so.6(GLIBC_2.7) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libdl.so.2(GLIBC_2.4) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libm.so.6(GLIBC_2.4) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libm.so.6 is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libpthread.so.0 is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc6 >= 2.18 is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libdl.so.2 is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libpthread.so.0(GLIBC_2.4) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc.so.6 is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  libc.so.6(GLIBC_2.4) is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

  /bin/sh is needed by libx264-133-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

With alien it is giving the same error: the package cannot be built on this system.

0 Kudos
Reply

8,356 Views
AdCmo
Contributor III

Try the binary one:

libx264-bin-r2265git0585324fee3-r0.cortexa9hf_vfp_neon.rpm

If that fails try the static one.

libx264-staticdev-r2265git0585324fee3-r0.cortexa9hf_vfp_neon.rpm

Ad.

...............

On Fri, Nov 1, 2013 at 10:49 AM, Tejas Shah

0 Kudos
Reply

8,356 Views
tejasshah
Contributor III

I get the same errors as with the last one by using binary files for both alien and rpm

And with static, by using alien I get the same error but with rpm

it is looking for one dependency only:

$ rpm -ivh ~/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-staticdev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm

rpm: RPM should not be used directly install RPM packages, use Alien instead!

rpm: However assuming you know what you are doing...

warning: /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/deploy/rpm/cortexa9hf_vfp_neon/libx264-staticdev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon.rpm: Header V4 DSA/SHA1 Signature, key ID d2a2fd9a: NOKEY

error: Failed dependencies:

  libx264-dev = r2265+git0+585324fee3-r0 is needed by libx264-staticdev-r2265+git0+585324fee3-r0.cortexa9hf_vfp_neon

pshah9@ubuntu:~/Desktop/mx6install/mx6mount/usr/bin$

0 Kudos
Reply

8,356 Views
AdCmo
Contributor III

OK,

I will let Daiane take over from here :smileysad:

Yes it want the "dev" dependency, but:

Once you do "dev" the "dev" dependencies will come up again.

So you might have to keep installing those dependencies "dev" wants, until

they are satisfied.

But maybe Daiane has a better Yocto specific solution/workaround.

Ad.

....................

On Fri, Nov 1, 2013 at 11:03 AM, Tejas Shah

0 Kudos
Reply

8,348 Views
daiane_angolini
NXP Employee
NXP Employee

So, it was not a good idea to install only that package to rootfs.

I thought at least it would be installed....

I don´t know if x264_git.bb does provide x264enc. And I had no news for my PC so far :smileysad:

0 Kudos
Reply

8,334 Views
tejasshah
Contributor III

Hi Daiane,

I installed gstreamer plugins bad on my laptop and it did install x264,

but I don't know why it wouldn't install on the board.

Ok, I will wait for your reply.

0 Kudos
Reply

8,334 Views
LeonardoSandova
Specialist I

Hi Tejas,

I tried this packages on my local.conf file

.

.

LICENSE_FLAGS_WHITELIST = "commercial"

CORE_IMAGE_EXTRA_INSTALL += "x264-bin x264-dev"

.

.

and bake the fsl-image-test. On the Filesystem, I got these files

$ tar tvf  fsl-image-test-imx6qsabresd.tar.bz2 | grep x264

lrwxrwxrwx root/root         0 2013-11-06 12:45 ./usr/lib/libx264.so -> libx264.so.133

-rw-r--r-- root/root          272 2013-11-06 12:21 ./usr/lib/pkgconfig/x264.pc

-rwxr-xr-x root/root       746464 2013-11-06 12:21 ./usr/lib/libx264.so.133

-rwxr-xr-x root/root       822880 2013-11-06 12:21 ./usr/bin/x264

-rw-r--r-- root/root          245 2013-11-06 12:21 ./usr/include/x264_config.h

-rw-r--r-- root/root        45342 2013-11-06 12:21 ./usr/include/x264.h

I believe the -bin and -dev packages is what you need.

Leo

8,334 Views
tejasshah
Contributor III

Hi Leo,

I will add the following lines and let you know the results.

0 Kudos
Reply