Thanks all for reply. However I have got the H.264 compression using libX264 from <u><b><a href="http://stackoverflow.com/questions/2940671/how-to-encode-series-of-images-into-h264-using-x264-api-c-c">http://stackoverflow.com/questions/2940671/how-to-encode-series-of-images-into-h264-using-x264-api-c-c</a></b></u> and it is working fine for making video. <br>

<br>@<span class="gI"><span class="gD">NITIN GOYAL I have found in each nal frame contain the starting code 0 0 0 1. But still it is not working.<br><br>@</span></span><span class="gI"><span class="gD">Alex Cohn   I have omitted first 4 bytes and reduce the size. But still avcodec_decode_video2() cann't decode the encoded array.<br>

<br>@</span></span><span class="gI"><span class="gD">Kalileo  Sorry I have not try H.264 compression with ffmpeg library and if possible please give me some suggestion how can I do with ffmpeg library. <br>I have use     avcodec_decode_video2( m_pContext, picture, &gotpicture, pkt);<br>

                    where AVCodecContext* m_pContext;<br>                             AVPacket *pkt = new AVPacket();<br>                             av_init_packet(pkt);<br>                             ................<br>

                             ..................<br>                             pkt->data = </span></span>(heders[0].p_payload+4);<br>                             pkt->size = i_frame_size - 4;<br>                             int gotpicture;<br>

                             AVFrame* picture = avcodec_alloc_frame();<br><br>I have fill up the parameters with these values and pass it to avcodec_decode_video2()<br><br><br>Thanks and regards<br>Srikanta Mondal<br><br>

<br><br><div class="gmail_quote">On Tue, Apr 10, 2012 at 12:37 PM, Kalileo <span dir="ltr"><<a href="mailto:kalileo@universalx.net">kalileo@universalx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On Apr 10, 2012, at 13:19 , srikanta mondal wrote:<br>
<br>
> Thank you for reply.<br>
> @kalileo   I have simply got the UDP socket and get the byte array from it.<br>
<br>
</div>you could also use the ffmpeg libraries to do that.<br>
<div class="im"><br>
> Now that byte array is basically the x264_nal_t*(p_payload[0]) from sender side.<br>
<br>
</div>Is it? or is it in a container, such as mpegts? Then you should demux first.<br>
<div class="im"><br>
> That encoded byte array come to client side. Now I want to decode that array with its corresponding parameter values. I think it can be done by using avcodec_decode_video2().<br>
<br>
</div>How are you passing that byte array to avcodec_decode_video2()?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br>