Get instant bitrate from H.264 encoder ?

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

Get instant bitrate from H.264 encoder ?

Jean-Michel Hautbois
Hi all,

I am wondering if it is possible to get a message from the encoders in
gstreamer, more precisely, from the H.264 encoder, which would give
the instant bitrate.
What I call instant bitrate is the bitrate for each frame after
encoding this frame.
This would be useful in order to implement some algorithms like scene
detection change in a robust way.

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

Re: Get instant bitrate from H.264 encoder ?

michael smith-6-3
You can use a buffer probe for this. Look at the size (in bytes) of
each buffer coming out of the encoder. You know the duration of the
frame (from the framerate, even if the buffer itself doesn't have a
duration set), so you can trivially calculate what you call the
"instant bitrate" from this.

Mike


On Fri, Jan 6, 2012 at 3:54 AM, Jean-Michel Hautbois
<[hidden email]> wrote:

> Hi all,
>
> I am wondering if it is possible to get a message from the encoders in
> gstreamer, more precisely, from the H.264 encoder, which would give
> the instant bitrate.
> What I call instant bitrate is the bitrate for each frame after
> encoding this frame.
> This would be useful in order to implement some algorithms like scene
> detection change in a robust way.
>
> Thanks in advance for answering,
> Regards,
> JM
> _______________________________________________
> 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: Get instant bitrate from H.264 encoder ?

Jean-Michel Hautbois
2012/1/6 Michael Smith <[hidden email]>:
> You can use a buffer probe for this. Look at the size (in bytes) of
> each buffer coming out of the encoder. You know the duration of the
> frame (from the framerate, even if the buffer itself doesn't have a
> duration set), so you can trivially calculate what you call the
> "instant bitrate" from this.

Thanks for this idea :).
But it won't be frame accurate, because I can't AFAIK know the frame
related to an output buffer.
How can I know the accuracy of this measure ?

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

Re: Get instant bitrate from H.264 encoder ?

safa
Hi,
I am looking for instant bitrate too. did you find the answer?
please let me know too
thanks
safa
Reply | Threaded
Open this post in threaded view
|

Re: Get instant bitrate from H.264 encoder ?

Jean-Michel Hautbois
Hi,

Yes, using a pad probe solved this question.

JM

2012/2/10 safa <[hidden email]>:

> Hi,
> I am looking for instant bitrate too. did you find the answer?
> please let me know too
> thanks
> safa
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Get-instant-bitrate-from-H-264-encoder-tp4269104p4375055.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> 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