[gst-devel] how to learn from .yuv files and encode with h.264?

Gibro Vacco gibrovacco at gmail.com
Fri Oct 29 08:05:30 CEST 2010


Hi,

it appears the sources you attached to the message did not go through the moderation.. btw a few comments below.

..snip..

> *//Possible problem*
> * **size = 352*288*(3/2);*
> * **buffer = gst_buffer_try_new_and_alloc (size);*

is there a particular reason for allocating this from the application? The pipeline is usually handling buffer allocation/release automagically.

> * **if (buffer==NULL){*
> * **   g_printerr("failed to allocate memory\n");*
> * **}*
> *//Possible problem *
> * **gst_buffer_set_caps (buffer,caps);*
>   *//Set up the video encoding parameters*
> * **caps = gst_caps_new_simple ("video/x-raw-yuv",*
> * **"format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('I', '4', '2', '0'),*
> * **"width",   G_TYPE_INT, 352,*
> * **"height", G_TYPE_INT, 288,*
> * **"framerate", GST_TYPE_FRACTION, 25, 1, NULL);*
> * **if ( !caps ) {*
> * **g_printerr("Failed to create caps\n");*
> * **return 0;*
> * **}*
>   err = gst_element_link_filtered(filesrc, time, caps);

what is the time element? It's possible caps are not propagated to the encoder if not directly connected to the filesrc.

Moreover, I didn't catch where you're setting the blocksize property in your filesrc to "size".

..Snip..

> There is something wrong or missing in this function? How can I make
> what I want to work?

See my comments above ;)

P.S. Maybe you could attach (or better copy to pastebin) the output when setting GST-DEBUG to 2 from the shell prior executing your binary.

Regards


>
> Please, I need help.
>
> thanks for the previous answers and thanks in advance

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20101029/5a5c9f44/attachment.htm>


More information about the gstreamer-devel mailing list