Tool/software: Linux
Hi, TI.
I have some problem in using gstreamer in capturing video from web cameras.
The camera supports the following formats:
root@liqi-Lenovo-V480:~# v4l2-ctl -d /dev/video1 --list-formats
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Index : 1
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
In my PC, I use the following command to capture the video from the camera, and it's successful.
gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw,format=YV12,framerate=30/1,width=960,height=720 ! xvimagesink
However. in my target board (am5728), I use the following command, but it failed. I tried another format, it failed, too.
root@liqi-Lenovo-V480:~# gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
> format=(string)YUY2, width=(int)960, height=(int)720' ! vpe num-input-buffers=8 ! queue ! waylandsink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.432522695 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.432590039 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.432849818 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.432878284 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.433079503 1357 0x147600 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:00.433122284 1357 0x147600 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068317235 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068[ 2706.894051] contiguous chunk is too small 8192/1382400 b
398080 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068662413 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068696085 1357 0x147260 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068923981 1357 0x147600 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.068957816 1357 0x147600 WARN waylandsink wlvideoformat.c:102:gst_wl_shm_format_to_video_format: gst video format not found
0:00:01.069150413 1357 0x147260 WARN vpe gstvpebufferpool.c:466:gst_vpe_buffer_pool_import: Allocating a new input buffer index: 0/128, 0
0:00:01.090575891 1357 0x147260 ERROR vpe gstvpebufferpool.c:380:gst_vpe_buffer_pool_queue: vpebufferpool: QBUF failed: Bad address, index = 31
0:00:01.090705048 1357 0x147980 WARN bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
0:00:01.090796304 1357 0x147260 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
0:00:01.090831440 1357 0x147260 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
../../../../gstreamer-1.8.3/libs/gst/base/gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
Execution ended after 0:00:00.894897326
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@liqi-Lenovo-V480:~# gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video1 num-buffers=1000 io-mode=4 ! 'video/x-raw, \
> format=(string)YV12, width=(int)960, height=(int)720' ! vpe num-input-buffers=8 ! queue ! waylandsink
0:00:00.194933714 1363 0x14c4a0 ERROR GST_PIPELINE grammar.y:642:gst_parse_perform_link: could not link v4l2src0 to vpe0
WARNING: erroneous pipeline: could not link v4l2src0 to vpe0
Thanks.
Li Qi