[FFmpeg-user] Alter YUV values of AVFrames

killkenny64 kennethjjgibson at gmail.com
Wed Feb 1 22:43:24 CET 2012

Carl Eugen Hoyos wrote
> Sounds as if the codec the original video was encoded with used a gop-size 
> of 30.
> Try rawvideo or an intra-only codec (or try forcing a gop-size of 1).

Thanks for the help, this make a lot of sense. The original video has a GOP
size of 12, and that was what it was being re-encoded as.

I tried changing to AVCodecContext->gop_size to 0 which, according to the
documentation, is for intra_only. (I tried setting it to 1 also as you

This hasn't worked, although there may be other things contributing to the

However, I am a little skeptical that setting the gop_size to 0 is doing
what I thought it would. Shouldn't this make all the frames I-frames, with
no B or P frames?

I ask because I encoded 3 videos of different gop_sizes and the sizes of the
resulting videos were:

gop_size = 30                 video size = 4.3mb
gop_size = 15                 video size = 4.4mb
gop_size = 0                   video size = 4.6mb

I would have imaged that the size of the video with gop_size=0 would be a
lot bigger, but this might have something to do with the fact that the video
was only very short.

So my questions are: Is there another setting that is required to make all
the frames I-frames? Is this possible? Is there any way of seeing what type
of frames (I, P, B) an encoded video has?


View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Alter-YUV-values-of-AVFrames-tp4346567p4349568.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list