Error in bayer2rgb pipeline

classic Classic list List threaded Threaded
6 messages Options
JPM
Reply | Threaded
Open this post in threaded view
|

Error in bayer2rgb pipeline

JPM
Hi,

I am trying to convert a bayer frame to RGB frame with this pipeline but an error appears :

C:\Windows\System32>gst-launch-1.0 -v filesrc location=E:/bayersample.bayer blocksize=307200 ! video/x-bayer,format=bggr,width=640,height=480,framerate=1/1 ! bayer2rgb ! filesink location=E:/bayersample.rgb
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format
Additional debug info:
gstcapsfilter.c(348): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
Output caps are unfixed: video/x-bayer, format=(string){ bggr, grbg, gbrg, rggb }, width=(int)640, height=(int)480, framerate=(fraction)1/1
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

The file bayersample.bayer has 307200 bytes (640x480x1 byte).

Any help ?. Thanks and regards
Reply | Threaded
Open this post in threaded view
|

Re: Error in bayer2rgb pipeline

Nicolas Dufresne-5


Le 16 juin 2016 4:06 PM, "JPM" <[hidden email]> a écrit :
>
> Hi,
>
> I am trying to convert a bayer frame to RGB frame with this pipeline but an
> error appears :
>
> C:\Windows\System32>gst-launch-1.0 -v filesrc location=E:/bayersample.bayer
> blocksize=307200 !
> video/x-bayer,format=bggr,width=640,height=480,framerate=1/1 ! bayer2rgb !
> filesink location=E:/bayersample.rgb
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter
> caps do not completely specify the output format

> Additional debug info:
> gstcapsfilter.c(348): gst_capsfilter_prepare_buf ():
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
> Output caps are unfixed: video/x-bayer, format=(string){ bggr, grbg, gbrg,
> rggb }, width=(int)640, height=(int)480, framerate=(fraction)1/1
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...

Looks like a bug in the bayer2rgb caps transform function. Would it be possible to file a bug on bug.gnome.org, and make your sample image available?

>
> The file bayersample.bayer has 307200 bytes (640x480x1 byte).
>
> Any help ?. Thanks and regards
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Error-in-bayer2rgb-pipeline-tp4678094.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
JPM
Reply | Threaded
Open this post in threaded view
|

Re: Error in bayer2rgb pipeline

JPM
Hi Nicolas,

I am using a naked file (raw bayer data without any headers) with all bytes to 0x00 in order to test the pipeline.

Maybe this is the problem. Have I to convert it to a standard file like TIFF, BMP ?.

Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Error in bayer2rgb pipeline

Sebastian Dröge-3
On Do, 2016-06-16 at 22:29 -0700, JPM wrote:
> Hi Nicolas,
>
> I am using a naked file (raw bayer data without any headers) with all
> bytes
> to 0x00 in order to test the pipeline.
>
> Maybe this is the problem. Have I to convert it to a standard file
> like TIFF, BMP ?.

You need a parser element like videoparse for bayer, which would then
chunk the data into one frame per buffer. Or alternatively on filesrc
you would set the block size property to exactly the size of one frame
and additionally provide the correct caps, but that's less clean.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
JPM
Reply | Threaded
Open this post in threaded view
|

Re: Error in bayer2rgb pipeline

JPM
Hi Sebastian,

I already use the block size property in filesrc --> filesrc location=E:/bayersample.bayer blocksize=307200

Anyway I have tested videoparse and there is not error but the sink file size is 0 bytes. The pipeline is :

C:\Windows\System32>gst-launch-1.0 -v filesrc location=E:/bayersample.bayer ! videoparse width=640 height=480 framerate=1/1 ! video/x-bayer,format=bggr,width=640,height=480,framerate=1/1 ! bayer2rgb ! filesink location=E:/bayersample.rgb
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoParse:videoparse0.GstPad:src: caps = video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)1/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.001416552
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
 
Regards.
Reply | Threaded
Open this post in threaded view
|

Re: Error in bayer2rgb pipeline

Sebastian Dröge-3
On Fr, 2016-06-17 at 03:12 -0700, JPM wrote:
> Hi Sebastian,
>
> I already use the block size property in filesrc --> filesrc
> location=E:/bayersample.bayer blocksize=307200
>
> Anyway I have tested videoparse and there is not error but the sink
> file size is 0 bytes. The pipeline is :


This should fail negotiation as videoparse has no bayer support, as
said in the previous mail.

So problem seems to be rather that a) there is no "bayerparse" element
and b) the caps transformation in bayer2rgb is incomplete or you don't
provide enough caps yourself.

Please report a bug about all this.

--

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment