Hi,<br><br><div class="gmail_quote">On Mon, Nov 1, 2010 at 5:56 PM, Rafael Sousa <span dir="ltr">&lt;<a href="mailto:rafael.lmsousa@gmail.com">rafael.lmsousa@gmail.com</a>&gt;</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;">
Marco,<div><br></div><div>The modification that you proposed to use the mp4mux didn&#39;t work. The same error occurred. I&#39;m using the yuv format because after the transimission of the video, I intend to calculate the psnr between the source yuv and the received yuv for academic analysis. But the mp4 format also helps.</div>
</blockquote><div><br>the attached recv.c should do the trick.  I just wonder why at this point you can&#39;t simply use gst-launch...<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>Sorry,for the bothering, but I&#39;ve reseached a lot before appealing to this list.</div><div><br></div><div>thanks for the help,</div><div>best regards,.</div><div><div></div><div class="h5"><div><br>
<br><div class="gmail_quote">On Mon, Nov 1, 2010 at 4:44 AM, Marco Ballesio <span dir="ltr">&lt;<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>&gt;</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,<br><br><div class="gmail_quote"><div>On Mon, Nov 1, 2010 at 2:46 AM, Rafael Sousa <span dir="ltr">&lt;<a href="mailto:rafael.lmsousa@gmail.com" target="_blank">rafael.lmsousa@gmail.com</a>&gt;</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 Marco<div><br></div><div>thank you so much for the help, it worked very well here... But what I want is to store the video at the receiver in the disk. I tried to modify this example that you sent to me, but it didn&#39;t saved the video. I modified the following in the recv.c. I used the foreman_cif.yuv video sample (352x288).</div>





<div><br></div><div><br></div><div><div>#define PIPELINE_FORMAT &quot;\</div><div>gstrtpbin name=rtpbin \</div><div>udpsrc caps=\&quot;application/x-rtp,media=(string)video,clock-rate=90000,encoding-name=(string)H264\&quot; \</div>





<div>port=5000 ! rtpbin.recv_rtp_sink_0 \</div><div>rtpbin. ! rtph264depay ! ffdec_h264 ! <b>\&quot; video/x-raw-yuv, width=352, height=288, format=(fourcc)I420 \&quot; ! filesink location=test_rcv.yuv</b> ! \</div></div>



</blockquote></div><div><br>you don&#39;t need the capsfilter between decoder and filesink.. everything will automagically work ;). <br></div><div><br>Btw, unless you&#39;re in love with raw yuv I suggest using a container format.. in this case you don&#39;t even need to decode and thus you could save some CPU at recording time. Try with this pipeline:<div>


<br>
<br><div>gstrtpbin name=rtpbin \</div><div>udpsrc caps=\&quot;application/x-rtp,media=(string)video,clock-rate=90000,encoding-name=(string)H264\&quot; \</div>

<div>port=5000 ! rtpbin.recv_rtp_sink_0 \</div></div><div>rtpbin. ! rtph264depay ! <b>mp4mux ! filesink location=test_rcv.mp4</b> ! \</div><br>etc. etc.<br><br>NOTE: you&#39;ll need to add a way to send the EOS to the muxer element (SIGHUP signal handler/read the manual ;) ), but setting the mp4mux property &quot;faststart&quot; to true could make the file playable even when manually stopping the pipeline with ctrl+c (discaimer: I&#39;ve not tried it).<br>



<br>Regards<br> </div><div><div></div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div>
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \</div>
<div>rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false&quot;</div></div><div><br></div><div><br></div><div>it returned an error: </div><div><div><br></div><div>Error: internal error in data stream.</div></div>





<div><br></div><div>I&#39;m very gratefull for your help.</div><div><br></div><div>regards</div><div><div></div><div><div><br></div><div><br><br><div class="gmail_quote">On Sun, Oct 31, 2010 at 4:48 PM, Marco Ballesio <span dir="ltr">&lt;<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>&gt;</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;">mmhh.. md5 from: <a href="http://gstreamer-devel.966125.n4.nabble.com/how-to-learn-from-yuv-files-and-encode-with-h-264-td3017365.html#a3017365" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/how-to-learn-from-yuv-files-and-encode-with-h-264-td3017365.html#a3017365</a><br>






<br>is different. Attaching the sources directly.<br><br>Regards<div><div></div><div><br><br><div class="gmail_quote">On Sun, Oct 31, 2010 at 10:33 PM, Marco Ballesio <span dir="ltr">&lt;<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>&gt;</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,<br><br>it appears the app you sent is actually more complex than what you need.. btw, some functions are not accessible from the code snippet you sent.<br>






<br>I found some soare time to write a minimalistic send/receive couple of applications, the first one reading from a yuv file generated with:<br>
<br>gst-launch -v videotestsrc num-buffers=2000 ! &quot;video/x-raw-yuv, width=320, height=240, format=(fourcc)I420&quot; ! filesink location=test.yuv<br><br>and streaming to an address specified from command line. The second app opens a connection and renders all the h264 frames it receives from it. Hopefully it will give you an idea about how to get your app working.<br>







<br>P.S. added back the gst-devel mailing list to the loop.<br>P.P.S hopefully the attachment will make its way through the moderation.<br><br>Regards<div><div></div><div><br><br><div class="gmail_quote">On Fri, Oct 29, 2010 at 4:57 PM, Rafael Sousa <span dir="ltr">&lt;<a href="mailto:rafael.lmsousa@gmail.com" target="_blank">rafael.lmsousa@gmail.com</a>&gt;</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 Gibro,<div><br></div><div>As I said, I&#39;m a newbie in this list, and I don&#39;t know exactly how to fix the issues in my code, so, I&#39;ll send to you my whole code to you. If you may take a look I&#39;d be be very gratefull for your help.</div>









<div><br></div><div>regards<div><div></div><div><br><div><br><div class="gmail_quote">On Fri, Oct 29, 2010 at 2:05 AM, Gibro Vacco <span dir="ltr">&lt;<a href="mailto:gibrovacco@gmail.com" target="_blank">gibrovacco@gmail.com</a>&gt;</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;">



    
    
    
<div>
<p>Hi,
<br>
<br>it appears the sources you attached to the message did not go through the moderation.. btw a few comments below.
<br>
<br>..snip..
<br>
<br>&gt; *//Possible problem*
<br></p><div>&gt; * **size = 352*288*(3/2);*
<br></div>&gt; * **buffer = gst_buffer_try_new_and_alloc (size);*
<br>
<br>is there a particular reason for allocating this from the application? The pipeline is usually handling buffer allocation/release automagically.
<br>
<br>&gt; * **if (buffer==NULL){*
<br><div>&gt; * **   g_printerr(&quot;failed to allocate memory\n&quot;);*
<br>&gt; * **}*
<br>&gt; *//Possible problem *
<br>&gt; * **gst_buffer_set_caps (buffer,caps);*
<br>&gt;   *//Set up the video encoding parameters*
<br>&gt; * **caps = gst_caps_new_simple (&quot;video/x-raw-yuv&quot;,*
<br>&gt; * **&quot;format&quot;, GST_TYPE_FOURCC, GST_MAKE_FOURCC (&#39;I&#39;, &#39;4&#39;, &#39;2&#39;, &#39;0&#39;),*
<br>&gt; * **&quot;width&quot;,   G_TYPE_INT, 352,*
<br>&gt; * **&quot;height&quot;, G_TYPE_INT, 288,*
<br>&gt; * **&quot;framerate&quot;, GST_TYPE_FRACTION, 25, 1, NULL);*
<br>&gt; * **if ( !caps ) {*
<br>&gt; * **g_printerr(&quot;Failed to create caps\n&quot;);*
<br>&gt; * **return 0;*
<br>&gt; * **}*
<br>&gt;   err = gst_element_link_filtered(filesrc, time, caps);
<br>
<br></div>what is the time element? It&#39;s possible caps are not propagated to the encoder if not directly connected to the filesrc.
<br>
<br>Moreover, I didn&#39;t catch where you&#39;re setting the blocksize property in your filesrc to &quot;size&quot;.
<br>
<br>..Snip..
<br><div>
<br>&gt; There is something wrong or missing in this function? How can I make
<br>&gt; what I want to work?
<br>
<br></div>See my comments above ;)
<br>
<br>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.
<br>
<br>Regards
<br><div>
<br>
<br>&gt;
<br>&gt; Please, I need help.
<br>&gt;
<br>&gt; thanks for the previous answers and thanks in advance
<br><br></div><p></p>
</div>

</blockquote></div><br></div></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br>