Can anyone tell me if its possible to calculate the length of a audio file
before actually converting it. Iwanted to convert from eother wav or m4a to
mp3 and wanted to know the legth of the converted file before acutally
converting it.

Sandeep.

On Thu, Jul 29, 2010 at 5:04 PM, Sandeep Davu <[email protected]>wrote:

> Hi,
>
> I am downgrading the bitrate of mp3 files. Is there a way to find out the
> file size of the converted file before actually converting the audio file.
>
> I wanted to convert a 320 kbps mp3 file to a 64 kbps mp3 file and send it
> over the wire using http.
> For this I need the content-length filed which is the size of the converted
> file.
> I preserved the sampling rate and number of channels of the original file.
>
> Is this formula corrext
> inputFormatContext->duration * outputCodecCtx->birate (given that the
> number of channels are same)
>
> for some files this formula works, but not for all the files.
> Is there a more accurate way to calculate the file size beforehand.
>
> Sandeep.
>
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to