gst-launch-1.0 v4l2src not generating output IMX8M

cancel
Showing results for 
Search instead for 
Did you mean: 

gst-launch-1.0 v4l2src not generating output IMX8M

1,592 Views
richard_bouck
Contributor I

I am using an ELP usb500w05g webcam with an IMX8M processor and Debian 9.5 Stretch with Weston.  When attempting to use gst-launch-1.0 to process video, v4l2src does not produce any output.  Any assistance in resolving this issue would be appreciated.

*** DOES NOT WORK ***

When I run the following gstreamer command, there is no video output generated:

$ gst-launch-1.0 -v v4l2src device=/dev/video2 '!' video/x-raw,format=YUY2,width=640,height=480 '!' queue max-size-time=0 '!' waylandsink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive

*** DOES WORK ***

But, I can get the video out of the webcam and display the video with guvcview and gstreamer playbin

### guvcview

# guvcview -d /dev/video2
# start video collection
# stop video collection
# exit

$ guvcview -d /dev/video2
V4L2_CORE: Unable to find parent usb device.V4L2_CORE: Unable to find parent usb device.GUVCVIEW: version 2.0.4
GUVCVIEW: couldn't open /home/debian/.config/guvcview2/video2 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for 4294967295, skipping unlock
RENDER: (SDL2) Couldn't open window: failed to create a window surface
RENDER: Couldn't init the SDL2 rendering engine

** (guvcview:12567): [1;33mWARNING [0m **: Could not open X display

** (guvcview:12567): [1;33mWARNING [0m **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
GUVCVIEW: (status) saving video to /home/debian/my_video-1.mkv
ENCODER: add stream 0 to stream list
ENCODER: add stream 1 to stream list
ENCODER: (matroska) add seekhead entry 0 (max 10)
ENCODER: (matroska) add seekhead entry 1 (max 10)
AUDIO: (portaudio) Aborting audio stream
AUDIO: Closing audio stream...
ENCODER: (matroska) closing context
ENCODER: (matroska) closing cluster
ENCODER: (matroska)writing cues
ENCODER: (matroska)add seekhead
ENCODER: (matroska) add seekhead entry 2 (max 10)
ENCODER: (matroska)write seekhead
ENCODER: (matroska) end duration = 8685 (8685.000000)

### gstreamer playbin

$ gst-launch-1.0 playbin uri=file:///home/debian/my_video-1.mkv video-sink=autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

====== AIUR: 4.4.2 build on Sep 27 2018 16:48:23. ======
Core: MKVPARSER_01.07.02 build on Mar 1 2018 09:00:10
file: /usr/lib/aarch64-linux-gnu/imx-mm/parser/lib_mkv_parser_arm_elinux.so.3.1
------------------------
Track 00 [video_0] Enabled
Duration: 0:00:08.685000000
Language: eng
Mime:
video/mpeg, systemstream=(boolean)false, parsed=(boolean)true, mpegversion=(int)4, width=(int)640, height=(int)480, framerate=(fraction)30/1
------------------------
====== VPUDEC: 4.4.2 build on Sep 27 2018 16:49:15. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Sep 27 2018 15:37:24)
vpulib: 1.1.1
firmware: 1.1.1.65535
------------------------
Track 01 [audio_0] Enabled
Duration: 0:00:08.685000000
Language: eng
Mime:
audio/mpeg, mpegversion=(int)1, channels=(int)2, rate=(int)44100, bitrate=(int)0
------------------------

====== BEEP: 4.4.2 build on Sep 27 2018 16:48:45. ======
Core: MP3 decoder Wrapper build on Jan 11 2018 10:20:25
file: /usr/lib/aarch64-linux-gnu/imx-mm/audio-codec/wrap/lib_mp3d_wrap_arm_elinux.so.3

*** Question ***

What is needed to get gst-launch-1.0 v4l2src to generate video output for the webcam?

Thanks,

Richard

0 Kudos
5 Replies

526 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Richard

one can try (Camera playback)

gst-launch-1.0 v4l2src ! video/x-raw,format=YUY2,width=1920,height=1080 ! queue max-size-time=0 ! waylandsink enable-tile=true sync=false

Also may be useful to check Linux Guide included in linux documentation on

i.MX Software | NXP 


Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

526 Views
richard_bouck
Contributor I

Hi Igor,

I had tried that previously too.  But, the version of gst-launch-1.0 which I have (version 1.14.0) does not have the enable-tile property for the waylandsink element.

$ gst-launch-1.0 v4l2src '!' video/x-raw,format=YUY2,width=1920,height=1080 '!' queue max-size-time=0 '!' waylandsink enable-tile=true sync=false
WARNING: erroneous pipeline: no property "enable-tile" in element "waylandsink0"

Will look at the documentation link you provided to see if there are any helpful solutions in there.

Thanks,

Richard

0 Kudos

526 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Richard

nxp supports only own gst versions

imx-gst1.0-plugin - i.MX Gstreamer 1.0 Plugin 

for others one can try extended support with NXP Professional Services | NXP 

Best regards
igor

0 Kudos

526 Views
richard_bouck
Contributor I

Hi Igor,

Due to legacy constraints, I am trying to use a Debian flavor of Linux (not Yocto). 

The latest version of imx-gst1.0-plugin is already installed.  It is included in the Debian 9.5 Stretch with kernel 4.9.x downloaded from here: https://boundarydevices.com/debian-stretch-9-5-for-nitrogen8m-board-october-2018-kernel-4-9-x/

$ sudo apt install imx-gst1.0-plugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
imx-gst1.0-plugin is already the newest version (4.4.2-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

It is interesting that the imx-gst1.0-plugin package has an "ubuntu" version.  The package should be compatible with Debian; but, is there a better imx-gst1.0-plugin package targeted exclusively for Debian?

Thanks,

Richard

0 Kudos

526 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Richard

some other examples

DART-MX8M CSI - Variscite Wiki 

Yocto release for i.MX 8MQ - Boundary Devices 


Best regards
igor

0 Kudos