Hi,<br><br>sorry for the late reply, I hope this will help<br><br><div class="gmail_quote">On Mon, Oct 18, 2010 at 11:45 PM, Rafael Sousa <span dir="ltr"><<a href="mailto:rafaelsousa007@gmail.com">rafaelsousa007@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi all,<div><br></div><div>I'm new in this list and I need to encode a YUV file using H.264 encoder for streaming the video in a wireless network. a set up the video source using </div>
<div><br></div><div>GstElement *filesrc</div>
<div>filesrc = gst_element_factory_make("filesrc", "my_filesource");</div><div>g_object_set (G_OBJECT (filesrc), "location", "foreman_cif.yuv", NULL);<br clear="all"></div></blockquote>
<div><br>I suggest you to use, if possible, a container format to wrap your yuv frames with, btw when dealing with raw data, you need to give it some context, usually through a parser element. In case of uncompressed video, you don't even need that, but just some basilar algebra..<br>
<br>Basically, once you know the source resolution, you should compute the frame size with something like w x h x bpp (3/2 for yuv420, 2 for yuv422 and similar), then use caps of the like of the following between source and encoder:<br>
<br>"video/x-raw-yuv, width=w, height=h, framerate=(fraction)n/d"<br><br>d and n are denomiator and numerator for the target frame rate (e.g. 1/30). And don't forget to set the buffer-size of your filesrc to the value you computed above for the frame size ;)!<br>
<br>Regards<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><br></div><div>
The execution of the complete code works, except for the error to encoder.</div><div><br></div><div>Error: Encode x264 frame failed.</div><div><br></div><div>Can someone help me with some example on how I can make this work? the complete code is in annex. </div>
<div><br></div><div>thanks a lot</div><div><br></div><font color="#888888"><div>-- <br>Rafael Leite Moraes de Sousa<br>Programa de Pós-graduação em Informática - UFAM<br>
</div>
</font><br>------------------------------------------------------------------------------<br>
Download new Adobe(R) Flash(R) Builder(TM) 4<br>
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly<br>
Flex(R) Builder(TM)) enable the development of rich applications that run<br>
across multiple browsers and platforms. Download your free trials today!<br>
<a href="http://p.sf.net/sfu/adobe-dev2dev" target="_blank">http://p.sf.net/sfu/adobe-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>