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
Hi Leo,
I compiled the image with the above changes in the local.conf file and the tar file has all the files you indicated above,
but still somehow there is no x264 plugin/element installed in the image.
Since you have the image compiled, is it possible for you to check if
it installed x264 plugin/element in your image?
Oh, what we only did was installing the library. Now add the gstreamer element. Follow what Daiane suggested https://community.freescale.com/docs/DOC-95254#comment-7694
Leo
Hi Leo,
I added the bin and dev libraries as you had asked plus already had what Daiane suggested earlier.
LICENSE_FLAGS_WHITELIST = "commercial"
CORE_IMAGE_EXTRA_INSTALL += " \
x264-bin x264-dev \
"
PACKAGECONFIG_pn-gstreamer1.0-plugins-ugly += "x264"
After successful compilation of the image also, x264enc didn't show up in the image.
I also checked if I have got the libraries you had showed in your output, and they were also there.
$ tar tvf fsl-image-gui-wandboard-dual.tar.bz2 | grep x264
lrwxrwxrwx root/root 0 2013-11-09 16:18 ./usr/lib/libx264.so -> libx264.so.133
-rw-r--r-- root/root 272 2013-10-28 11:06 ./usr/lib/pkgconfig/x264.pc
-rwxr-xr-x root/root 746464 2013-10-28 11:12 ./usr/lib/libx264.so.133
-rw-r--r-- root/root 245 2013-10-28 11:06 ./usr/include/x264_config.h
-rw-r--r-- root/root 45342 2013-10-28 11:06 ./usr/include/x264.h
-rwxr-xr-x root/root 822880 2013-10-28 11:12 ./usr/bin/x264
-rw-r--r-- xuser/root 104553 2013-08-15 11:45 ./opt/viv_samples/hal/unit_test/resource/source_264x264.yuv420
Please, be carefull on what gstreamer version you're using.
I was about to send an email to meta-oe mail list when I found this link:
http://comments.gmane.org/gmane.comp.handhelds.openembedded.core/41416
So, you can use local.conf OR bbappend.
You must build x264 BEFORE gstreamer (or, make sure you had sstate-cleaned gstreamer)
Use the right version.
Could you, please, try the suggestions from the link?
Hi Daiane,
I wrote following 3 lines to my local.conf file.
CORE_IMAGE_EXTRA_INSTALL += " \
gst-plugins-ugly-meta \
"
and then I got the error:
Nothing provides gst-plugins-ugly-meta ...
Do you know how to solve this problem? Should I download "ugly-meta" from somewhere?
Thank you in advance
Hi Daiane,
Sorry for delay in reply.
I finally found a way to getting x264enc enabled in the image as suggested in that link.
I created a blank .bbappend file named gst-plugins-ugly_0.10.19.bbappend
and I just added PACKAGECONFIG +="x264" into that file. After compilation,
x264enc got added in the image.
Now, I tried running x264enc with the following command, but got a crash error. What is the reason for this?
My camera is working properly, so I don't think it is because of that.
root@wandboard-dual:~# gst-launch v4l2src num-buffers=500 ! video/x-raw-yuv ! queue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink location=outputh264.mp4 sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught SIGSEGV accessing address 0x915
#0 0x40502bf4 in ?? ()
#1 0x40502be4 in ?? ()
#2 0x40502be4 in ?? ()
Spinning. Please run 'gdb gst-launch 2392' to continue debugging, Ctrl-C to qui
t, or Ctrl-\ to dump core.
Enable logs (export GST_DEBUG=*:2) and remove this part of the pipeline 'video/x-raw-yuv ! queue ! ffmpegcolorspace ! queue '. These elements are not needed. Post the result.
Leo
Hi Leo,
I did the following:
root@wandboard-dual:/home/video_test# export GST_DEBUG=*:2
root@wandboard-dual:/home/video_test# gst-launch v4l2src num-buffers=500 ! x264enc ! matroskamux ! filesink location=outputh264.mp4 sync=false
Setting pipeline to PAUSED ...
0:00:00.534348423 1732 0x17f460 WARN basesrc /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Could not negotiate format
0:00:00.534646423 1732 0x17f460 WARN basesrc /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Check your filtered caps, if any
0:00:00.534950756 1732 0x17f460 WARN basesrc /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:3039
:gst_base_src_activate_push:<v4l2src0> Failed to start in push mode
0:00:00.535080423 1732 0x17f460 WARN GST_PADS /home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/gst/gstpad.c:737:gst_pad_set_ac
tive:<v4l2src0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
/home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2
src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
root@wandboard-dual:/home/video_test#
Oh I see, sorry you indeed need the color space convertor. so add the FSL element, which is mfw_ipucsc ( v4l2src ! mfw_ipucsc ! x264enc)
Here it is.
root@wandboard-dual:/home/video_test# gst-launch v4l2src ! mfw_ipucsc ! x264enc
! matroskamux ! filesink location=outputh264.mp4 sync=false
IPU_CSC_CORE_LIBRARY_VERSION_INFOR_01.00.
MFW_GST_IPU_CSC_PLUGIN 3.0.8 build on Oct 28 2013 08:29:26.
Setting pipeline to PAUSED ...
0:00:00.519996667 1738 0x182c20 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Could not negotiate format
0:00:00.520294333 1738 0x182c20 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Check your filtered caps, if any
0:00:00.520608667 1738 0x182c20 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:3039
:gst_base_src_activate_push:<v4l2src0> Failed to start in push mode
0:00:00.520733333 1738 0x182c20 WARN GST_PADS /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/gst/gstpad.c:737:gst_pad_set_ac
tive:<v4l2src0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negoti
ate format
Additional debug info:
/home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vf
p-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/g
stbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2
src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
root@wandboard-dual:/home/video_test#
I see. It is a caps negotiation problem..... GStreamer check the pads and its caps to see if elements can be linked, if not then you get that message. For some reason, the v4l2src element is not providing the correct stream for neither the color-space nor the encoder.... Why are you using v4l2src? are you using a web cam? To check the caps being negotiated, just add '-v' to the pipeline.
Leo
Yes, I am using a web-cam. v4l2src works perfectly for all the encoders and containers.
Here it is with -v added to the pipeline.
root@wandboard-dual:/home/video_test# gst-launch v4l2src ! mfw_ipucsc ! x264enc
! matroskamux ! filesink location=outputh264.mp4 sync=false -v
IPU_CSC_CORE_LIBRARY_VERSION_INFOR_01.00.
MFW_GST_IPU_CSC_PLUGIN 3.0.8 build on Oct 28 2013 08:29:26.
Setting pipeline to PAUSED ...
0:00:00.525098238 1810 0x8b240 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Could not negotiate format
0:00:00.525396572 1810 0x8b240 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2830
:gst_base_src_start:<v4l2src0> error: Check your filtered caps, if any
0:00:00.525711572 1810 0x8b240 WARN basesrc /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:3039
:gst_base_src_activate_push:<v4l2src0> Failed to start in push mode
0:00:00.525840238 1810 0x8b240 WARN GST_PADS /home/pshah9/Des
ktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linu
x-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/gst/gstpad.c:737:gst_pad_set_ac
tive:<v4l2src0:src> Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negoti
ate format
Additional debug info:
/home/pshah9/Desktop/yocto-master/fsl-community-bsp/build/tmp/work/cortexa9hf-vf
p-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/g
stbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2
src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...
root@wandboard-dual:/home/video_test#
You need to figure out why caps are not fitting. Inspect the elements and use the -v flag. Also, try to use other video sources (videotestsrc is a good one but it is NOT enable by default :smileysad: )
Initially I wasn't getting caps at all because I didn't use ffmpegcolorspace.
Now I am getting caps but at the end it is giving the same errro.
root@wandboard-dual:/home/video_test# gst-launch v4l2src ! ffmpegcolorspace ! x2
64enc ! matroskamux ! filesink location=outputh264.mp4 sync=false -v
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw-yuv, f
ormat=(fourcc)YUY2, width=(int)640, height=(int)480, interlaced=(boolean)false,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, mpegversion=(int)1,
systemstream=(boolean)false
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:src: caps = video/x-raw-yu
v, mpegversion=(int)1, systemstream=(boolean)false, width=(int)640, height=(int)
480, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, p
ixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstFFMpegCsp:ffmpegcsp0.GstPad:sink: caps = video/x-raw-y
uv, format=(fourcc)YUY2, width=(int)640, height=(int)480, interlaced=(boolean)fa
lse, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, mpegversion=(in
t)1, systemstream=(boolean)false
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, widt
h=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fract
ion)1/1, codec_data=(buffer)0164001effe100186764001eacd940a03db01100000300017735
94000f162d9601000568ebecb22c, stream-format=(string)avc, alignment=(string)au, l
evel=(string)3, profile=(string)high
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw-yuv,
mpegversion=(int)1, systemstream=(boolean)false, width=(int)640, height=(int)480
, framerate=(fraction)30/1, format=(fourcc)I420, interlaced=(boolean)false, pixe
l-aspect-ratio=(fraction)1/1
Caught SIGSEGV accessing address 0x915
#0 0x4046abf4 in ?? ()
#1 0x4046abe4 in ?? ()
#2 0x4046abe4 in ?? ()
Spinning. Please run 'gdb gst-launch 1732' to continue debugging, Ctrl-C to qui
t, or Ctrl-\ to dump core.
did you solve this problem (segmentation fault)?
Hi Leo,
Sorry for a late reply.
No, I haven't been able to solve the error.
I tried searching for that error on google and also on the community
and found some similar errors with camera crashing on community but none of the solutions
worked out.
Could it be something wrong with the source code?
could you execute these instructions:
1. ulimit -c unlimited
2. restart your application and wait for "segment fault", there should be core file
3. gdb core*
4. gdb ./app core.12345
5. bt
I think the one provoking the fault is the encoder, but lets see.
Leo
So I ran the 1) instruction and restarted the application:
root@wandboard-dual:~# ulimit -c unlimited |
root@wandboard-dual:~# gst-launch v4l2src num-buffers=500 ! video/x-raw-yuv ! qu
eue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink location=outpu
th264.mp4 sync=false | |
Setting pipeline to PAUSED ... | |
Pipeline is live and does not need PREROLL ... | |
Setting pipeline to PLAYING ... | |
New clock: GstSystemClock | |
Caught SIGSEGV accessing address 0x915 |
Spinning. Please run 'gdb gst-launch 1904' to continue debugging, Ctrl-C to qu.
^CCaught interrupt -- handling interrupt. | |
Interrupt: Stopping pipeline ... | |
Execution ended after 93874104010 ns. | |
Setting pipeline to PAUSED ... |
Setting pipeline to READY ...
But I can't run 3), 4), 5) instruction since gdb is not generated.
After I stopped my application, as you can see above, it says that run gdb gsst-launch 1904,
but I can't run that too for debugging.
root@wandboard-dual:/home/video_test# gdb core* |
-sh: gdb: not found
Oh I see. You need a image with developing tools.
On the image you baked (fsl-image-gui?) , can you add the following lines and bake again? That image will have the tool. BTW, once you got the tool, run it with
gdb --args gst-launch ..........
then wait for the fault, and type bt (backtrace).
EXTRA_IMAGE_FEATURES += "dbg-pkgs \
dev-pkgs \
tools-sdk \
tools-debug \
tools-profile \
debug-tweaks"
Leo
Hi Leo,
Even after installing image features you asked for it didn't work out.
Here is my local.conf file
MACHINE ??= 'wandboard-dual'
DISTRO ?= 'poky'
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES += "dbg-pkgs \
dev-pkgs \
tools-sdk \
tools-debug \
tools-profile \
debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
CONF_VERSION = "1"
BB_NUMBER_THREADS = '2'
PARALLEL_MAKE = '-j 2'
DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = ""
LICENSE_FLAGS_WHITELIST = "commercial"
PACKAGECONFIG_append_pn-gstreamer0.1-plugins-ugly = " x264"
PACKAGECONFIG_append_pn-gstreamer0.1-plugins-bad = " hls"
And here is the error again:
root@wandboard-dual:/home# gdb --args gst-launch v4l2src num-buffers=500 ! video
/x-raw-yuv ! queue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink
location=outputh264.mp4 sync=false
-sh: gdb: not found
Hi Leo,
Please ignore the last message, I didn't had the image with new features on the board earlier.
After getting the new image, I ran the command as you asked. After running the command, I ran
bt, but gives the error that there is no stack.
root@wandboard-dual:/home# gdb --args gst-launch v4l2src num-buffers=500 ! video
/x-raw-yuv ! queue ! ffmpegcolorspace ! queue ! x264enc ! matroskamux ! filesink
location=outputh264.mp4 sync=false
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-poky-linux-gnueabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/gst-launch...Reading symbols from /usr/bin/.debug/
gst-launch...done.
done.
(gdb) bt
No stack.
(gdb)