About appsink frames

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

About appsink frames

Wes Miller
Administrator
I have a nicely working gstparsed pipeline that is mostly this:

     gstoarse(  "souphttpsrc timestamp=true ! multipartdemux ! image/jpeg,width=640,height=480 ! matroskamux ! filesink" )

and I wasn't quite happy with this modification:  (see my previous append to this forum).

      gstoarse(  "souphttpsrc timestamp=trye ! multipartdemux ! image/jpeg,width=640,height=480 ! matroskamux ! tee name=fred. ! queue ! filesink  fred. ! queue ! appsink" ).  With some stuf to catch the frames and eos-es

In both cases these are in C/C++ code and I inject an eos to halt the pipeline.  Stuff catches the apsink output.


So I decided to try this:


     gstoarse(  "souphttpsrc timestamp=true ! multipartdemux ! image/jpeg,width=640,height=480 ! matroskamux ! appsink" );  // note appsink replaced filesink.


Now I made a do while not eos loop that catches every frame.

From looking at the timestamp info in the frame I see that I get an occasional bad timestamp (-1, I think)).  Where do these frames fome from?  How Do I interpret them?

Also, if I stream all the frames into a file I get a container full of jpegs with some stuff up front.  The file, however, won't play as a matroska file (matroskademux ! jpegdec ! ppmpegcolorspace ! autovideosink).

So, how does saving the frames out of matroskamux this way differ from filesink?  Is there something I need to know to add or throw away?

Many thanks,

Wes
Reply | Threaded
Open this post in threaded view
|

Re: About appsink frames

Arnout Vandecappelle

On Thursday 29 April 2010 14:12:11, Wes Miller wrote:

> So I decided to try this:
>
>      gstoarse(  "souphttpsrc timestamp=true ! multipartdemux !
> image/jpeg,width=640,height=480 ! matroskamux ! appsink" );  // note
>  appsink replaced filesink.
>
> Now I made a do while not eos loop that catches every frame.
>
> From looking at the timestamp info in the frame I see that I get an
> occasional bad timestamp (-1, I think)).  Where do these frames fome
>  from?  How Do I interpret them?
>
> Also, if I stream all the frames into a file I get a container full of
>  jpegs with some stuff up front.  The file, however, won't play as a
>  matroska file (matroskademux ! jpegdec ! ppmpegcolorspace !
>  autovideosink).
>
> So, how does saving the frames out of matroskamux this way differ from
> filesink?  Is there something I need to know to add or throw away?

 matroskamux does a lot of seeks.  If your appsink ignores them, the
resulting file will have headers and such in the wrong order.

 Regards,
 Arnout
--
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

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

Re: About appsink frames

Wes Miller
Administrator
 Arnout wrote:

?> So, how does saving the frames out of matroskamux this way differ from
>> filesink?  Is there something I need to know to add or throw away?

> matroskamux does a lot of seeks.  If your appsink ignores them, the>
> resulting file will have headers and such in the wrong order.

So, how do i know the proper order of the frames?  Timestamps?  What about the ones with invalid timestamps?

Wes