How to force video encoder to generate first frame as I-frame

vineeth nvineeth at
Sat Jul 9 23:05:09 PDT 2011

On Sun, Jul 10, 2011 at 12:44 AM, Umakant Goyal <umakantgoyal1 at>wrote:

> Hi All,
> I have written a application where i am receiving the data from network
> (over RTP), transcoding it and dumping the data into file. Application is
> working fine as such means i am not able to receive the data, transcode it
> and dump it into the file. But It has one serious issue. Issue is that most
> of the time first video frame is not coming as I-Frame. There are chances
> that my application is getting P-Frame as first video frame  (because there
> is possibility that peer end has started sending data before i got ready to
> receive it. I also can not force peer end to start sending data whenever my
> app is ready to receive). So in that case file that is being recorded by my
> application contains green screen at the start. This gives bad impression.
> Can some one share how i can i force the transcoder to generate first Frame
> as I-Frame even if it is getting P-Frame as first frame?

I dont think its possible to generate a I Frame from a P/B frame, since the
P/B frame is not independently decodable; Best option would be to wait till
you get the IFrame and then start transcoding from that point. If its H.264,
you will also need access to SPS / PPS data to initialize the decode-encode
chain of transcoders.

> Thanks in Advance
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list