Bitrate of a media file

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

Bitrate of a media file

Carlo 1-9-8-7 xxx
Hi everybody!
I have to calculate the bitrate of a video/audio file, not by reading metatag.
My idea is to see how many bytes have been read by gstreamer in a due amount of time (for example Δt=100ms)... in this way I can calculate "istantaneous" bitrate as Δbytes/Δt
Well, the question is, gstreamer has got the query_position for the position in seconds, is there any function that returns the position in bytes?


Hotmail: Powerful Free email with security by Microsoft. Get it now.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bitrate of a media file

Sandeep Prakash
Hi,

Carlo 1-9-8-7 xxx wrote
Well, the question is, gstreamer has got the query_position for the position in seconds, is there any function that returns the position in bytes?
You can try "gst_element_query_position" with the second argument as GST_FORMAT_BYTES.


Regards,
Sandeep Prakash
http://sandeepprakash.homeip.net
Reply | Threaded
Open this post in threaded view
|

Re: Bitrate of a media file

Carlo 1-9-8-7 xxx


> Date: Tue, 27 Jul 2010 06:36:27 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [gst-devel] Bitrate of a media file
>
>
> Hi,
>
>
> Carlo 1-9-8-7 xxx wrote:
> >
> > Well, the question is, gstreamer has got the query_position for the
> > position in seconds, is there any function that returns the position in
> > bytes?
> >
> You can try "gst_element_query_position" with the second argument as
> GST_FORMAT_BYTES.
>

Thanks for the answer,
that's what I thought, but gst_element_query_position with GST_FORMAT_BYTES returns incorrect values. In particular I think that these values are in some way related with the duration in seconds... in fact, for example, for 2 different files (with different bitrates) if I call "gst_element_query_position" with GST_FORMAT_BYTES at the same time (eg. after 10 seconds from the start of playing), I get the same values for both the files... any other ideas? :)

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bitrate of a media file

Sudarshan Bisht
Hi ,

You can give a try to gst_element_query_convert() .



On Wed, Jul 28, 2010 at 11:03 AM, Carlo 1-9-8-7 . <[hidden email]> wrote:


> Date: Tue, 27 Jul 2010 06:36:27 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [gst-devel] Bitrate of a media file

>
>
> Hi,
>
>
> Carlo 1-9-8-7 xxx wrote:
> >
> > Well, the question is, gstreamer has got the query_position for the
> > position in seconds, is there any function that returns the position in
> > bytes?
> >
> You can try "gst_element_query_position" with the second argument as
> GST_FORMAT_BYTES.
>

Thanks for the answer,
that's what I thought, but gst_element_query_position with GST_FORMAT_BYTES returns incorrect values. In particular I think that these values are in some way related with the duration in seconds... in fact, for example, for 2 different files (with different bitrates) if I call "gst_element_query_position" with GST_FORMAT_BYTES at the same time (eg. after 10 seconds from the start of playing), I get the same values for both the files... any other ideas? :)

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bitrate of a media file

Sudarshan Bisht
One question I have , on which element you fire gst_element_query_position with GST_FORMAT_BYTES option?

On Wed, Jul 28, 2010 at 11:53 AM, sudarshan bisht <[hidden email]> wrote:
Hi ,

You can give a try to gst_element_query_convert() .



On Wed, Jul 28, 2010 at 11:03 AM, Carlo 1-9-8-7 . <[hidden email]> wrote:


> Date: Tue, 27 Jul 2010 06:36:27 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [gst-devel] Bitrate of a media file

>
>
> Hi,
>
>
> Carlo 1-9-8-7 xxx wrote:
> >
> > Well, the question is, gstreamer has got the query_position for the
> > position in seconds, is there any function that returns the position in
> > bytes?
> >
> You can try "gst_element_query_position" with the second argument as
> GST_FORMAT_BYTES.
>

Thanks for the answer,
that's what I thought, but gst_element_query_position with GST_FORMAT_BYTES returns incorrect values. In particular I think that these values are in some way related with the duration in seconds... in fact, for example, for 2 different files (with different bitrates) if I call "gst_element_query_position" with GST_FORMAT_BYTES at the same time (eg. after 10 seconds from the start of playing), I get the same values for both the files... any other ideas? :)

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list



--
Regards,

Sudarshan Bisht



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Bitrate of a media file

Carlo 1-9-8-7 xxx
On GstElement *pipeline. The values with GST_FORMAT_TIME are correct.... I'll try to take a look at gst_element_query_convert()


Date: Wed, 28 Jul 2010 12:00:54 +0300
From: [hidden email]
To: [hidden email]
Subject: Re: [gst-devel] Bitrate of a media file

One question I have , on which element you fire gst_element_query_position with GST_FORMAT_BYTES option?

On Wed, Jul 28, 2010 at 11:53 AM, sudarshan bisht <[hidden email]> wrote:
Hi ,

You can give a try to gst_element_query_convert() .



On Wed, Jul 28, 2010 at 11:03 AM, Carlo 1-9-8-7 . <[hidden email]> wrote:


> Date: Tue, 27 Jul 2010 06:36:27 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [gst-devel] Bitrate of a media file

>
>
> Hi,
>
>
> Carlo 1-9-8-7 xxx wrote:
> >
> > Well, the question is, gstreamer has got the query_position for the
> > position in seconds, is there any function that returns the position in
> > bytes?
> >
> You can try "gst_element_query_position" with the second argument as
> GST_FORMAT_BYTES.
>

Thanks for the answer,
that's what I thought, but gst_element_query_position with GST_FORMAT_BYTES returns incorrect values. In particular I think that these values are in some way related with the duration in seconds... in fact, for example, for 2 different files (with different bitrates) if I call "gst_element_query_position" with GST_FORMAT_BYTES at the same time (eg. after 10 seconds from the start of playing), I get the same values for both the files... any other ideas? :)

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list



--
Regards,

Sudarshan Bisht



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel