[gst-devel] How to know width,hight

Robin Gareus robin at gareus.org
Thu Feb 22 11:45:59 CET 2007

Hash: SHA1

� wrote:
> Hi all,
>   I'm developing a video application, I receive a transport stream
> with to videos inside (mpeg2) . I need to know some information of the
> videos before make the pads (like width, height), but really i have no
> idea how extract this information. I have to develop a plugin to
> extract this information?.

i have done similar code and stubled over that:

  gst_structure_get_fraction (s, "framerate", &video_fps_n, &video_fps_d);
  gst_structure_get_int (s, "width", &video_width);
  gst_structure_get_int (s, "height", &video_height);

check out xjadeo's gstreamer branch (few emails ago).
BTW. I am also stuck in determining the duration of (or total number of
frames in)  a video-file. any hints on that?  - It must be somewhere
in the totem source, but I have not yet located  it there ;-)

> I use flutsdemux, mpeg2dec and videoscale. I'm sure that in those
> plugins there is this information but really I don't know how to
> interact with them.

are you building a pipeline or are you writing source code?
Version: GnuPG v1.4.6 (GNU/Linux)


More information about the gstreamer-devel mailing list