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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

qwerty-1
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?

Thanks in Advance   

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

Vineeth-2

On Sun, Jul 10, 2011 at 12:44 AM, Umakant Goyal <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

qwerty-1
Any further suggestion??

On Sun, Jul 10, 2011 at 11:35 AM, vineeth <[hidden email]> wrote:

On Sun, Jul 10, 2011 at 12:44 AM, Umakant Goyal <[hidden email]> 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
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel