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

Tim Pitman tapitman11 at gmail.com
Thu Oct 25 00:14:53 CEST 2012


Yeah I finally got the decoder working on a frame to frame basis and
got rid of the constant errors, at least as long as the stream is
good.

I'm confused what you mean by "The encoder expects NAL units". I'm
piping raw video data (via ffmpeg using yuv4mpegpipe format) into x264
which seems to work.


Two questions for you?

1) Is live555 suitable for lossy physical layer transmissions or only
for situations with a working UDP or TCP network?

2) Sometimes the video gets so corrupted over the wireless channel
that the decoder seems to get stuck printing a constant series of
errors and doesn't recover, even if the channel improves. Do you know
of a way to restart or flush the decoder some way, or another way to
get around this?

Thanks,
Tim

On Wed, Oct 24, 2012 at 2:46 AM, Tony Glover <T.Glover at nottingham.ac.uk> wrote:
> 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,
>
> Tony.
>
> 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.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user


More information about the Libav-user mailing list