Trying to encode a captured frame as a Bitmap (.bmp)

Jack D jackstuff3 at gmail.com
Thu Dec 21 20:33:24 UTC 2017


I get the same result doing gst-inspect-1.0 with those parameters.

VIDEO:/home/user % gst-inspect-1.0 | grep bitmap
libav:  avdec_bmp: libav BMP (Windows and OS/2 bitmap) decoder
libav:  avenc_bmp: libav BMP (Windows and OS/2 bitmap) encoder
VIDEO:/home/user % gst-inspect-1.0 avenc_bmp | grep image
      image/bmp

 The only difference I see is my search has avdec_bmp listed first.
Has anyone ever successfully saved a bitmap file from inside a program
using gst_video_convert_sample?
If I cannot come up with an elegant solution from within gstreamer, I will
be forced to either A: create a command line using gst-launch and save with
a filesink,
or B: Figure out how to take a raw image write a bitmap file myself.

Best Regards,
Jack

On Thu, Dec 21, 2017 at 1:27 AM, Antonio Ospite <ao2 at ao2.it> wrote:

> On Wed, 20 Dec 2017 15:53:27 -0700 (MST)
> jackson80 <jackstuff3 at gmail.com> wrote:
>
> > Okay, I may have had a few eyes glaze over when I said my code looks like
> > some code where I included a link.
> >
> > Well, here is actual working code. My problem in in the save_images_cb
> > routine. I can set the caps to "image/png" and the code will extract and
> > save a png coded image file. When I try to save a bitmap with caps
> defined
> > as "image/bitmap", I get an error from gst_video_convert sample and it
> > prints "Failed converting frame. Error: Cannot find any image encoder for
> > caps image/bitmap".
> >
>
> $ gst-inspect-1.0 | grep bitmap
> libav:  avenc_bmp: libav BMP (Windows and OS/2 bitmap) encoder
> libav:  avdec_bmp: libav BMP (Windows and OS/2 bitmap) decoder
>
> $ gst-inspect-1.0 avenc_bmp | grep image
>       image/bmp
>
> It looks like "image/bmp" is the correct capability to pass to
> gst_video_convert_sample().
>
> Ciao,
>    Antonio
>
> --
> Antonio Ospite
> https://ao2.it
> https://twitter.com/ao2it
>
> A: Because it messes up the order in which people normally read text.
>    See http://en.wikipedia.org/wiki/Posting_style
> Q: Why is top-posting such a bad thing?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171221/cfff2ff0/attachment.html>


More information about the gstreamer-devel mailing list