[FFmpeg-user] HEVC decoding from multicast

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Feb 5 18:27:49 CET 2014

Andrey Utkin <andrey.krieger.utkin <at> gmail.com> writes:

> >> needed video stream, with AVPacket.flags & AV_PKT_FLAG_KEY
> >
> > Are you sure that for all valid hevc streams this flag will
> > ever be set?
> I am not sure in anything, i've just said about what i would 
> try first.
> > (This is not true for h264 where valid streams do not
> > necessarily contain an I-frame.)
> Interesting, didn't know. Is there a special name for such 
> mode?

I don't know but since you may not know it:
H264 frames after an I-frame are allowed to reference older 
frames from before that I-frame.
(So the usefulness of AV_PKT_FLAG_KEY is extremely limited 
for H.264, as said, the decoder by default takes care about 
this and starts decoding from a recovery point unless told 
I absolutely don't know if this is also true for hevc but 
I wouldn't be surprised.

> >> As a hint you could check AVPacket.flags for
> >
> > Does this flag really have any relevance?
> > (I don't mean for hevc streams but in the general case:
> > When is it useful?)
> mpegts demuxer sets this when PES packet is not percepted 
> totally correctly. AVFormatContext can be configured to 
> discard them silently, but by default they are returned 
> from av_read_frame() amongst others.

Ok, understood.
My question is now: In which situation would you like to 
discard those frames? Error concealment historically was 
a strength of FFmpeg (there was a paper comparing it to 
commercial decoders), completely dropping a frame instead 
of decoding as much as possible must have catastrophic 
visual effects on any real-life content or do I miss 

Carl Eugen

More information about the ffmpeg-user mailing list