Webcam Streaming on Beagle Board Xm using Gstreamer/ DSP

It seems xvimagesink giving a different error too.

root@arm:# gst-launch -e v4l2src device=/dev/video6 ! xvimagesink
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1443): gst_xvimagesink_get_xv_support (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
No port available
Setting pipeline to NULL …
Freeing pipeline …

root@arm:# gst-launch -e v4l2src device=/dev/video6 !
video/xraw-yuv,format=\(fourcc\)YU12 ! ffmpegcolorspace !
filesink location=./test.data WARNING: erroneous pipeline:
could not link v4l2src0 to ffmpegcsp0

Are you sure that your camera (and v4l driver) support YU12? I would
suggest to run v4l2ctl and see what formats are supported. Also, did
you try to run the same pipeline but without caps filter, i.e.
gst-launch -e v4l2src device=/dev/video6 ! ffmpegcolorspace ! filesink
location=./test.data ?

Hi again,

I’d like to summarize my findings so far.

Work Environment:
Kernel: 3.7.10-x13 → git://github.com/RobertCNelson/stable-kernel.git
Ubuntu: 12.10 (with minimal lxde desktop) → http://rcn-ee.net/deb/rootfs/quantal/ubuntu-12.10-console-armhf-2013-06-14.tar.xz
Webcam: LI5M03 (mt9p031) enabled in uEnv.txt by adding the following line: camera=li5m03

At first I tried the camera with mplayer and I confirm that the camera video is on my monitor screen connected to BB-xM via HDMI.

The configuration used:
sudo media-ctl -r -l ‘“mt9p031 2-0048”:0->“OMAP3 ISP CCDC”:0[1]’
sudo media-ctl -l ‘“OMAP3 ISP CCDC”:2->“OMAP3 ISP preview”:0[1]’
sudo media-ctl -l ‘“OMAP3 ISP preview”:1->“OMAP3 ISP resizer”:0[1]’
sudo media-ctl -l ‘“OMAP3 ISP resizer”:1->“OMAP3 ISP resizer output”:0[1]’
sudo media-ctl -V ‘“mt9p031 2-0048”:0 [SGRBG10 640x480]’
sudo media-ctl -V ‘“OMAP3 ISP CCDC”:2 [SGRBG10 640x480]’
sudo media-ctl -V ‘“OMAP3 ISP preview”:1 [UYVY 640x480]’
sudo media-ctl -V ‘“OMAP3 ISP resizer”:1 [UYVY 640x480]’

The command Iine:
#sudo mplayer tv:// -tv driver=v4l2:device=/dev/video6:outfmt=uyvy:width=640:height=480

Then I started trying to use GStreamer and faced with the following issues.

#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! filesink location=./test.data
#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! fbdevsink
#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! autovideosink
#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! ximagesink
These command lines give the following error:
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device ‘/dev/video6’ cannot capture in the specified format
Additional debug info:
gstv4l2object.c(2218): gst_v4l2_object_set_format (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture in YU12, but device returned format UYVY

#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! cacasink
#sudo gst-launch v4l2src device=/dev/video6 ! ffmpegcolorspace ! dfbvideosink
These command lines give the following error:
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device ‘/dev/video6’ cannot capture in the specified format
Additional debug info:
gstv4l2object.c(2218): gst_v4l2_object_set_format (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture in RGB3, but device returned format UYVY

Then I tried to run the command line:
#sudo gst-launch v4l2src device=/dev/video6 ! video/x-raw-yuv,format=(fourcc)UYVY ! ffmpegcolorspace ! fbdevsink
#sudo GST_DEBUG=3 gst-launch v4l2src device=/dev/video6 ! video/x-raw-yuv,format=(fourcc)UYVY ! ffmpegcolorspace ! fbdevsink
I got the following:
v4l2 gstv4l2object.c:1105:gst_v4l2_object_fill_format_list: got 4 format(s):
v4l2 gstv4l2object.c:1111:gst_v4l2_object_fill_format_list: YU12 (emulated)
v4l2 gstv4l2object.c:1111:gst_v4l2_object_fill_format_list: YV12 (emulated)
v4l2 gstv4l2object.c:1111:gst_v4l2_object_fill_format_list: BGR3 (emulated)
v4l2 gstv4l2object.c:1111:gst_v4l2_object_fill_format_list: RGB3 (emulated)
basesrc gstbasesrc.c:2830:gst_base_src_start: error: Could not negotiate format
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format

LI5M03 (mt9p031) supports UYVY / YUYV outputs only and it seems gst-v4l2 is expecting a source in one of the followings: YU12, YV12, BGR3 or RGB3. Surprisingly I read that TI DSP supports only UYVY input which is exactly what LI5M03 generates as an output. So, I need your comment/idea/opinion to proceed in order to get the issues resolved.

Any help? Your reply will be greatly appreciated.

In addition, mplayer seems working with LI5M03 but also some warnings seen while running the command. I have copied them below.

Regards,
Ozkan.

#sudo mplayer tv:// -tv driver=v4l2:device=/dev/video6:outfmt=uyvy:width=640:height=480
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski olschewski@zpr.uni-koeln.de
comment: first try, more to come :wink:
v4l2: ioctl get standard failed: Invalid argument
Selected device: OMAP3 ISP resizer output
Capabilities: video capture streaming
supported norms:
inputs: 0 = camera;
Current input: 0
Current format: unknown (0x0)
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn’t got a tuner!
v4l2: ioctl set mute failed: Inappropriate ioctl for device
v4l2: ioctl query control failed: Inappropriate ioctl for device
v4l2: ioctl query control failed: Inappropriate ioctl for device
v4l2: ioctl query control failed: Inappropriate ioctl for device
v4l2: ioctl query control failed: Inappropriate ioctl for device
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run ‘xvinfo’ to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See ‘mplayer -vo help’ for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.

Can not really suggest something more reasonable, but if you did not
try it yet, maybe more detailed caps filter can improve the situation:
video/x-raw-yuv,format=(fourcc)YUY2,width=640,height=480,framerate=30/1
Since you were specifying the frame size for mplayer, I thought that
providing similar information to gstreamer might help (or not :slight_smile: ).

The following file contains some pipeline examples (including
TIVidenc1 DSP encoder) which were working for our project:
https://github.com/veter-team/vehicle/blob/master/misc/video-sensor.config#L36
Maybe they can trigger some ideas for you to make yours running.

HTH,
Andrey.

Just for your information I have started writing a V4L2 application to perform the required color conversion on captured frames. The initial version seems working fine although the frame rate is a little bit low, I’ll highlight this issue in another topic.

Regards,
Ozkan.

Hi, Dhut:
I got the bbxm rev c two months ago. I want to use it to achieve the goal of tracking peopl. And owing to wanting to make most use of bbxm, i want to use the dsp core in dm3730. According to materials i read, i want to use the gstreamer, dmai and codec engine to develop my application. However, i have not done davinci development before or even arm. so this job is so hard for me, i think. so could you give me some practical suggestion for me? if you have qq number, could you give it to me through gmail? thank you!!!

在 2012年1月17日星期二UTC+8上午5时40分12秒,Dhut C写道: