[Libav-user] H.264 nal decode

srikanta mondal srkntmondal at gmail.com
Mon Apr 9 14:02:22 CEST 2012


Thank you for your reply.
@kalileo  I am doing the H.264 compression by opening a file with binary
mode and write each encoded x264_nal_t* (p_payload[0]) frame into the file.
And another thread is continuing to show the images of the file. Both
thread are continuing separately. But basically I want to make a live video
application. So, I want to decoded just that encoded x264_nal_t*
(p_payload[0]). That's why I told I don't want to use file.

@Alex  I have used also the following
             sizeDelay = x264_encoder_delayed_frames(encoder);
But all are in vein.

Thanks all of You
Srikanta Mondal

On Mon, Apr 9, 2012 at 5:09 PM, Alex Cohn <alexcohn at netvision.net.il> wrote:

> On Mon, Apr 9, 2012 at 13:56, srikanta mondal <srkntmondal at gmail.com>
> wrote:
> > Dear all, Thank you for reply. I have used x264 library. And I have the
> > following code ....
> [..]
> > void decoding(uint8_t *data, int size)
> > {
> >     AVPacket *pkt;
> >     pkt = new AVPacket();
> >     int gotpicture;
> >
> >     av_init_packet(pkt);
> >     avcodec_get_frame_defaults(picture);
> >
> >     pkt->data = data;
> >     pkt->size = size;
> >     int outSize = avcodec_decode_video2(m_pContext, picture, &gotpicture,
> > pkt);
> > }
> >
> > This is my brief code sniff.Please guide me how could I able to decode
> > directly without using file.
> >
> > Thanks and regards
> > Srikanta Mondal
>
> h264 decoder produces output after some delay. Minimum delay for
> simple Profile is one frame, but if you allow B frames, the delay is
> even longer. So, it's OK if you see that the first call to decoding()
> function above does not generate a picture.
>
> BR,
> Alex
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120409/782ec074/attachment.html>


More information about the Libav-user mailing list