Pushing images into a gstreamer pipeline

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

Pushing images into a gstreamer pipeline

Rodrigo Benenson
Hello gst developers !

After playing around with some toy applications, exploring the
documentation and googling around (including this mailing list
archives) I am still puzzled for what I would think is a rather common
use case.

I have an existing code that generates images (in memory) and I would
like to push these images into a gstreamer pipeline (to create a flv
video at the end).

I could not find an "obvious way to do it". My best guess will be to
dig in the source code of GstMultiFileSrc and its parent GstPushSrc,
to figure it out.

Could any of you point me out to the "obvious way" of doing this ?
Is it there any related piece of documentation/tutorial/example on this ?

Once I have the input right, the rest is a piece of cake, thanks to
Gstreamer awesomeness !
(something like "my magic input ->  ffmpegcolorspace ! ffenc_flv !
flvmux ! filesink location=desktop.flv" )

Thanks for your answers.
regards,
rodrigob.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pushing images into a gstreamer pipeline

Thiago Sousa Santos
On Tue, 2011-03-15 at 17:05 +0100, Rodrigo Benenson wrote:

> Hello gst developers !
>
> After playing around with some toy applications, exploring the
> documentation and googling around (including this mailing list
> archives) I am still puzzled for what I would think is a rather common
> use case.
>
> I have an existing code that generates images (in memory) and I would
> like to push these images into a gstreamer pipeline (to create a flv
> video at the end).
>
> I could not find an "obvious way to do it". My best guess will be to
> dig in the source code of GstMultiFileSrc and its parent GstPushSrc,
> to figure it out.
>
> Could any of you point me out to the "obvious way" of doing this ?
> Is it there any related piece of documentation/tutorial/example on this ?

You want to use 'appsrc':
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html

There should be examples in the source of gst-plugins-base, under
tests/examples/app/

>
> Once I have the input right, the rest is a piece of cake, thanks to
> Gstreamer awesomeness !
> (something like "my magic input ->  ffmpegcolorspace ! ffenc_flv !
> flvmux ! filesink location=desktop.flv" )
>
> Thanks for your answers.
> regards,
> rodrigob.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

--
Thiago Santos


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

Re: Pushing images into a gstreamer pipeline

Tim-Philipp Müller-2
In reply to this post by Rodrigo Benenson
On Tue, 2011-03-15 at 17:05 +0100, Rodrigo Benenson wrote:

Hi Rodrigo,

> After playing around with some toy applications, exploring the
> documentation and googling around (including this mailing list
> archives) I am still puzzled for what I would think is a rather common
> use case.
>
> I have an existing code that generates images (in memory) and I would
> like to push these images into a gstreamer pipeline (to create a flv
> video at the end).
>
> I could not find an "obvious way to do it". My best guess will be to
> dig in the source code of GstMultiFileSrc and its parent GstPushSrc,
> to figure it out.
>
> Could any of you point me out to the "obvious way" of doing this ?
> Is it there any related piece of documentation/tutorial/example on this ?


Check out appsrc:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html

Cheers
 -Tim

> Once I have the input right, the rest is a piece of cake, thanks to
> Gstreamer awesomeness !
> (something like "my magic input ->  ffmpegcolorspace ! ffenc_flv !
> flvmux ! filesink location=desktop.flv" )
>
> Thanks for your answers.
> regards,
> rodrigob.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


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

Re: Pushing images into a gstreamer pipeline

Rodrigo Benenson
Thanks Thiago and Tim ! That was exactly what I was looking for.

I wonder how this did not pop out on my searches...
Regards,
rodrigob.

On Tue, Mar 15, 2011 at 5:18 PM, Tim-Philipp Müller <[hidden email]> wrote:

> On Tue, 2011-03-15 at 17:05 +0100, Rodrigo Benenson wrote:
>
> Hi Rodrigo,
>
>> After playing around with some toy applications, exploring the
>> documentation and googling around (including this mailing list
>> archives) I am still puzzled for what I would think is a rather common
>> use case.
>>
>> I have an existing code that generates images (in memory) and I would
>> like to push these images into a gstreamer pipeline (to create a flv
>> video at the end).
>>
>> I could not find an "obvious way to do it". My best guess will be to
>> dig in the source code of GstMultiFileSrc and its parent GstPushSrc,
>> to figure it out.
>>
>> Could any of you point me out to the "obvious way" of doing this ?
>> Is it there any related piece of documentation/tutorial/example on this ?
>
>
> Check out appsrc:
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html
>
> Cheers
>  -Tim
>
>> Once I have the input right, the rest is a piece of cake, thanks to
>> Gstreamer awesomeness !
>> (something like "my magic input ->  ffmpegcolorspace ! ffenc_flv !
>> flvmux ! filesink location=desktop.flv" )
>>
>> Thanks for your answers.
>> regards,
>> rodrigob.
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pushing images into a gstreamer pipeline

wally_bkg
In reply to this post by Rodrigo Benenson

From: Thiago Sousa Santos <[hidden email]>
To: [hidden email]
Date: Tue, 15 Mar 2011 13:14:25 -0300
Subject: Re: Pushing images into a gstreamer pipeline
On Tue, 2011-03-15 at 17:05 +0100, Rodrigo Benenson wrote:
> Hello gst developers !
>
> After playing around with some toy applications, exploring the
> documentation and googling around (including this mailing list
> archives) I am still puzzled for what I would think is a rather common
> use case.
>
> I have an existing code that generates images (in memory) and I would
> like to push these images into a gstreamer pipeline (to create a flv
> video at the end).
>
> I could not find an "obvious way to do it". My best guess will be to
> dig in the source code of GstMultiFileSrc and its parent GstPushSrc,
> to figure it out.
>
> Could any of you point me out to the "obvious way" of doing this ?
> Is it there any related piece of documentation/tutorial/example on this ?

You want to use 'appsrc':
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html

There should be examples in the source of gst-plugins-base, under
tests/examples/app/

Using appsrc would indeed work.  IMHO the stumbling block will be figuring out how to put your image data into the proper format of a GstBuffer with a "caps" that ffmpegcolorspace can accept.

At this point, poking around the source for the videoscale element is the best I've found :(

Are there any elements to draw lines, circles, etc. into a GstBuffer to overlay onto a video frame?


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

Re: Pushing images into a gstreamer pipeline

Olivier Aubert-2
On Tue, 2011-03-15 at 17:42 -0500, wally bkg wrote:
> Are there any elements to draw lines, circles, etc. into a GstBuffer
> to overlay onto a video frame?
The rsvgoverlay element (in recent versions of gst-plugins-bad) can do
this.

Olivier


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

Re: Pushing images into a gstreamer pipeline

wally_bkg
In reply to this post by Rodrigo Benenson

You realize that bleeding edge will become stable and until you help
tracking down whats causing the regression for you, the behavior might
stay as it is in the current PPA releases. Have you filed a bug for the
issue already? 
---------- Forwarded message ----------
From: Stefan Kost <[hidden email]>
To: Discussion of the development of and with GStreamer <[hidden email]>
Date: Mon, 21 Mar 2011 17:26:57 +0200
Subject: Re: Pushing images into a gstreamer pipeline (Olivier Aubert)
On 16.03.2011 23:50, wally bkg wrote:
>
>     Subject: Re: Pushing images into a gstreamer pipeline
>     On Tue, 2011-03-15 at 17:42 -0500, wally bkg wrote:
>     > Are there any elements to draw lines, circles, etc. into a GstBuffer
>     > to overlay onto a video frame?
>     The rsvgoverlay element (in recent versions of gst-plugins-bad) can do
>     this.
>
>     Olivier
>
>
> Don't see any documentation for it in:
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/ch01.html
>
> gst-inspect doesn't show it my 10.04 system which has plugins-bad 0.10.18
>
> My attempt at using the Ubuntu 10.04 ppa "current" gstreamer was a
> quick disaster breaking my most important starting point:
>
> gst-launch v4l2src ! xvimagesink
>
> Without this working gstreamer is totally useless to me.  Recovery was
> not pretty :(  So excuse me if I'm a bit gun shy about the bleeding edge.
>


I tried filing a bug report at the PPA website, but the launchpad "reset password" Email never came.
I plan to try again later today or tomorrow.

I'm also looking for a place to upload an ~84MB VOB file from a DVD recorder device that plays with decodebin2 but not a mpegdec pipeline as used by things like Totem and PiTiVi.  The PiTiVi folks pushed it to gstreamer and I'm sure an example file would be helpful.  In a nutshell, the issue here is a VOB file from an "authored DVD" (unencrypted) plays but a "closed" disk from a commercial DVD Recorder (Toshiba DR420) acts like its only a few seconds long.  I had planed to do it this weekend from home (since most free upload/download sites are blocked here) but other life things prevented me from even checking Email over the weekend.

But to be frank, I'd have a lot more time to help with debugging if I didn't have to waste so much time stumbling around the gstreamer source code to try and figure things out for lack of documentation and examples.   IMHO decent example code is the best documentation.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel