[Libav-user] Best way to provide avcodec_decode_video2 with h264 data?

Tony Glover T.Glover at nottingham.ac.uk
Wed Oct 24 11:46:56 CEST 2012

Hi Tim,
	I've also been using intra-refresh to stream h264 video. The encoder expects NAL units and, after encoding, the data is streamed in packets. Your frame may or may not fit your encoded frame into a single packet, depending on its size. At the receiving end, you should wait until you receive all the data corresponding to a frame which you can then send to your decoder.

I use x264 to do the encoding, live555 to do the streaming and ffmpeg to do the decoding. There are a lot of examples in the live555 codebase so you shouldn't have a problem in seeing an example of what you are intending to do. 

Hope this helps,


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

More information about the Libav-user mailing list