[FFmpeg-devel] frame type identification question
Victor lyamtsev
vlyamtsev
Mon Oct 15 22:59:42 CEST 2007
Thank you,
Can you, please, clarify the term "key" frame? 'I-' frame ?Reference frame?
What I am looking for actually, is capability to drop some frames from H264
stream , as response to lower bandwidth without actual re- encoding of
frames with lower bitrate.
I would appreciate better idea, though.
Thanks again,
-v
On 10/14/07, Stefano Sabatini <stefano.sabatini-lala at poste.it> wrote:
>
> On date Sunday 2007-10-14 09:12:30 -0400, Victor lyamtsev encoded:
> > Hello,
> > I am trying to write utility to remove certain frames from H264 file (
> all
> > B- frames, for example ) .
> > E.g. it should copy original into new H264 file, excluding B-frames.
> > I wonder how I can find frame type identifier after reading of frame...
> > av_read_frame( pFormatContext, &packet)
> > I assume it's somewhere within AVPacket struct... How to retreive it?
> > Thank you,
>
> Hi,
> I'm not sure you can detect the type of frame without to actually
> *decode* it (but you can still check if the frame is a key frame by
> reading the flags in the AVPacket).
>
> For example:
>
> /* decode the data from the packet and put the resulting picture in
> picture)
> ret = avcodec_decode_video(ist->st->codec, &picture, &got_frame,
> pkt_data_ptr, pkt_data_len);
> if (ret < 0)
> break;
> if (got_picture && picture.pict_type == B_TYPE) {
> ...
> } else {
> ...
> }
>
> By the way: this is a question more for ffmpeg-user than for ffmpeg-devel.
>
> Regards.
> --
> Stefano Sabatini
> Linux user number 337176 (see http://counter.li.org)
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list