Start a new topic

Problems with BC-H16480A H264 output in linux using gstreamer -- v4l2 compliance?

I'm trying to use gstreamer 1.0 to obtain the H264-compressed stream for

further processing, but I'm experiencing problems and I suspect the card driver not being entirely V4L2 compliant.

Please look at these 3 experiments:

*** 1) I can get some output treating /dev/video[1..16] as a file, using this pipeline:

gst-launch-1.0 filesrc location=/dev/video3 ! typefind ! h264parse ! avdec_h264 ! autovideosink

BUT the output is buggy: Video looks OK for some seconds, then turns light grey for some other seconds, good again, bad...

Also, going this way I have to previously select output size and other

parameters using an external tool (v4l2-ctl, qv4l2...), and this doesn't

always work. For instance, using v4l2-ctl to set the output frame rate

always set a value of 1.666 frames/second, regardless of entered value.

*** 2) Using v4l2 does not work at all:

gst-launch-1.0 -v v4l2src device=/dev/video3 !

'video/x-h264,width=(int)704,height=(int)576' ! typefind ! h264parse !

avdec_h264 ! autovideosink

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.

Additional debug info:

gstbasesrc.c(2791): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:

streaming task paused, reason not-negotiated (-4)

ERROR: pipeline doesn't want to preroll.

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

It's worth noting that I've NO problem capturing the (uncompressed)

output of /dev/video0 using gstreamer. This is a working pipeline (it's a

gstreamer-0.10 one, I couldn't get it to work with gstreamer 1.0,

probably a gstreamer fault...)

gst-launch v4l2src device=/dev/video0 ! video/x-raw-rgb,width=704,height=576 ! ffmpegcolorspace ! xvimagesink

*** 3) Finally, I can make all it work doing the following:

3a) Creating a unix "pipe" file with a "mkv" extension to trick

the test program that comes with bluecherry (mkfifo pipe.mkv)

3b) Executing the bluecherry test program and redirecting its

output to the pipe created above (> bluecherrycardTest /dev/video3


3c) running my gstreamer pipeline

As I told, this works but have other problems: it's not neat, it's

fragile (sometimes either the "emitter" or the "receiver" part gets

disconnected), and the framerate achieved is low.


So, taking all this into account, can you enlighten me a bit about what I've to do to read the compressed ouputs with gstreamer?

Thanks in advance.

Login or Signup to post a comment