[Libav-user] Adjust fps

Leandro Raffo ljraffo at gmail.com
Fri Sep 9 19:53:57 EEST 2016


2016-09-09 12:53 GMT-03:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
> 2016-09-09 13:57 GMT+02:00 Leandro Raffo <ljraffo at gmail.com>:
>> 2016-09-09 6:55 GMT-03:00 Carl Eugen Hoyos <ceffmpeg at gmail.com>:
>
>>>>>> I see, but I wanted to avoid doing a decode/encode stage.
>>>>>> Guess its not possible then.
>>>>>
>>>>> It generally is possible, depends only on the codec.
>>>>
>>>> I'm trying to apply it to H264 and HEVC codecs.
>>>
>>> It may be possible if the (output) streams only contain I-frames,
>>> I am not sure if there are timestamp-related issues.
>>> (It is not possible to randomly drop and keep non-I-frames.)
>>
>> I see there is the Keyframe flag in AVPacket, so sending
>> keyframes to av_write_interleaved_frame (Is
>> av_write_frame equivalent in this case?) would be as you say.
>> But isn't there a way to see if I'm getting B or P-frames in case
>> I don't get enough I-frames?
>
> AVFrame->pict_type tells you the type of frames.
>
> Please test with -skip_frame nointra if this is usable for you
> before investing more time.
> When doing this, you can also test -skip_frame noref
> which may be an alternative: Drop those (h264) frames
> that will not be needed to decode future frames. I am
> not sure if this information is available outside libavcodec,
> you may have to do some additional programing.
>
> Carl Eugen

The thing is I dont actually have AVFrames, I have AVPakets, I want to
avoid the decode/encode pipeline since it takes too much CPU and I'm
already getting stuff encoded in the codec I already want (h264).


More information about the Libav-user mailing list