gst-dsp problems on BB xM with Ubuntu 11.10

Hi,

I've installed Ubuntu Oneiric 11.10 on my BB xM as described here:
http://elinux.org/BeagleBoardUbuntu (using NetIinstall method if it is
matter). In addition, I've installed gst-dsp also as described on the
same page. Everything seams to work fine:
$ uname -a
Linux t3 3.2.3-x4 #1 SMP Sat Feb 4 10:33:25 UTC 2012 armv7l armv7l
armv7l GNU/Linux
$ sudo dsp-test
copied 1000 times successfully

However, attempt to use dsph264enc leads to the following problems:

GST_DEBUG=2 gst-launch v4l2src !
video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace
! video/x-raw-yuv,format=\(fourcc\)UYVY ! dsph264enc ! avimux !
filesink location="ttt.avi"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
create_node: dsp node allocate failed
0:00:01.412139893 1671 0x115fb8 ERROR dsp
gstdspvenc.c:142:create_node:<dsph264enc0> dsp node allocate failed
sink_setcaps: dsp node creation failed
0:00:01.414367676 1671 0x115fb8 ERROR dsp
gstdspvenc.c:399:sink_setcaps:<dsph264enc0> dsp node creation failed
0:00:01.415283203 1671 0x115fb8 WARN basesrc
gstbasesrc.c:2582:gst_base_src_loop:<v4l2src0> error: Internal data
flow error.
0:00:01.416625977 1671 0x115fb8 WARN basesrc
gstbasesrc.c:2582:gst_base_src_loop:<v4l2src0> error: streaming task
paused, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Internal data flow error.
Additional debug info:
gstbasesrc.c(2582): gst_base_src_loop ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 420501710 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Looking at dmesg, I can see the following relevant messages:
[ 4955.190002] cod_open: error status 0xfffffff7, sz_coff_path:
/lib/dsp/h264venc_sn.dll64P flags: 0x0
[ 4955.302520] procwrap_detach: deprecated dspbridge ioctl

and there is no h264venc_sn.dll64P in /lib/dsp/. Only
h264vdec_sn.dll64P. Could it be the reason for the failure? If yes, I
would appreciate if someone can suggest the proper way to fix it.

I did not want to give up after the first problem :slight_smile: and decide to
try dspmp4venc instead of dsph264enc. Unfortunately it also does not
work. The pipeline runs for several seconds producing correct video
file, but then just stopped on it's own. The following is the complete
output:

GST_DEBUG=2 gst-launch v4l2src do-timestamp=true always-copy=FALSE !
video/x-raw-yuv,width=320,height=240,framerate=25/1 ! ffmpegcolorspace
! video/x-raw-yuv,format=\(fourcc\)UYVY ! dspmp4venc ! avimux !
filesink location="ttt.avi"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:01.380645752 1693 0x1285d50 WARN bin
gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really
configure latency of 0:00:00.000000000
dsp_thread: failed waiting for events: 5
0:00:08.119049071 1693 0x1267ba8 ERROR dsp
gstdspbase.c:645:dsp_thread:<dspmp4venc0> failed waiting for events: 5
gstdsp_got_error: unable to get event
0:00:08.121093749 1693 0x1267ba8 ERROR dsp
gstdspbase.c:614:gstdsp_got_error:<dspmp4venc0> unable to get event
ERROR: from element /GstPipeline:pipeline0/GstDspMp4VEnc:dspmp4venc0:
unable to get event
Execution ended after 7152709961 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

In the dmesg I can see the following:
[ 5298.419525] omap-dsp omap-dsp: bridge_deh_notify: DSP_MMUFAULT,
addr=0x21f3e000
[ 5298.486724] omap-dsp omap-dsp: ERR: clock id 2 already disabled
[ 5298.602966] proc_load: Processor Loaded /lib/dsp/baseimage.dof
[ 5298.615417] proc_start: dsp in running state

So here again I would kindly appreciate any hints how to fix or debug
the problem. I would prefer to use h264 for my project, but can also
leave with mp4 and will appreciate any help.

Thank you,
Andrey.

Answering one of my question myself :slight_smile:

Looking at dmesg, I can see the following relevant messages:
[ 4955.190002] cod_open: error status 0xfffffff7, sz_coff_path:
/lib/dsp/h264venc_sn.dll64P flags: 0x0
[ 4955.302520] procwrap_detach: deprecated dspbridge ioctl

and there is no h264venc_sn.dll64P in /lib/dsp/. Only
h264vdec_sn.dll64P. Could it be the reason for the failure? If yes, I
would appreciate if someone can suggest the proper way to fix it.

After doing some search, I've found that in fact, h264 encoder is not
available (supposedly because of licensing reasons). It seams to me
like the decision not to distribute the encoder is made and nothing is
going to change. All the answers are either old or there is no answers
at all to the requests about the encoder.

I think it is worth to mention it here
BeagleBoardUbuntu - eLinux.org because it could save
quite some time for the people who were trying to install everything
expecting that h264 encoder will work. It wont'.

I did not want to give up after the first problem :slight_smile: and decide to
try dspmp4venc instead of dsph264enc. Unfortunately it also does not
work. The pipeline runs for several seconds producing correct video
file, but then just stopped on it's own. The following is the complete
output:

Since mp4 encoder also does not work properly for me, the question
remains. I will try to ask this question on gst-dsp mail list also.

Andrey.

Looking at dmesg, I can see the following relevant messages:
[ 4955.190002] cod_open: error status 0xfffffff7, sz_coff_path:
/lib/dsp/h264venc_sn.dll64P flags: 0x0
[ 4955.302520] procwrap_detach: deprecated dspbridge ioctl

and there is no h264venc_sn.dll64P in /lib/dsp/. Only
h264vdec_sn.dll64P. Could it be the reason for the failure? If yes, I
would appreciate if someone can suggest the proper way to fix it.

I think you already figured this one out.

...

In the dmesg I can see the following:
[ 5298.419525] omap-dsp omap-dsp: bridge_deh_notify: DSP_MMUFAULT,
addr=0x21f3e000
[ 5298.486724] omap-dsp omap-dsp: ERR: clock id 2 already disabled
[ 5298.602966] proc_load: Processor Loaded /lib/dsp/baseimage.dof
[ 5298.615417] proc_start: dsp in running state

So here again I would kindly appreciate any hints how to fix or debug
the problem. I would prefer to use h264 for my project, but can also
leave with mp4 and will appreciate any help.

This seems to be an issue with the codec, usually a mmu fault means
that the dsp tried to read something that wasn't mapped into its
address space.

Let me investigate a bit more using your gst command, it might take a
few days for me to have a chance to try it though.

Regards,

Omar

[...]

In the dmesg I can see the following:
[ 5298.419525] omap-dsp omap-dsp: bridge_deh_notify: DSP_MMUFAULT,
addr=0x21f3e000
[ 5298.486724] omap-dsp omap-dsp: ERR: clock id 2 already disabled
[ 5298.602966] proc_load: Processor Loaded /lib/dsp/baseimage.dof
[ 5298.615417] proc_start: dsp in running state

So here again I would kindly appreciate any hints how to fix or debug
the problem. I would prefer to use h264 for my project, but can also
leave with mp4 and will appreciate any help.

This seems to be an issue with the codec, usually a mmu fault means
that the dsp tried to read something that wasn't mapped into its
address space.

Let me investigate a bit more using your gst command, it might take a
few days for me to have a chance to try it though.

Also I suggest you to look at the gst-dsp mailing list:

https://groups.google.com/group/gst-dsp

vmjl

Will do, thanks for the link.

Regards,

Omar