FORUMS: list search recent posts

Calculate Transcoded files size

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Venkatesh Guptha
Calculate Transcoded files size
on Mar 3, 2011 at 8:57:33 am

Hi,

I my application, we are using 3ivx for transcoding the video into MPEG-2 TS format. I want to calculate the transcoded file length before transcode starts. Is there any way to find this?

Thanks in Advance
Venkatesh. K


Return to posts index

Michael Rampe
Re: Calculate Transcoded files size
on Mar 3, 2011 at 10:04:40 pm

[Venkatesh Guptha] " I want to calculate the transcoded file length before transcode starts."

ffmpeg -i [inputfile]

This will give you the duration of the input.

Also have a look at FFprobe.

Michael


Return to posts index

Venkatesh Guptha
Re: Calculate Transcoded files size
on Mar 4, 2011 at 6:50:53 am

Hi,

i dont want duration, instead i need size of the output file (trancoded file) before transcode starts. Is there any formula to calculate it?

Thanks in advance,
Venkatesh. K


Return to posts index


Michael Rampe
Re: Calculate Transcoded files size
on Mar 4, 2011 at 8:42:57 pm

[Venkatesh Guptha] "
i dont want duration, instead i need size of the output file (trancoded file) before transcode starts."


I interpreted "file length" as time. "file size" would have been clearer.

[Venkatesh Guptha] "Is there any formula to calculate it?"

Fairly straightforward.

bitrate/8*length(seconds)=size (in Bytes). Divide by 1024 for KB. Divide by 1024 again for MB. etc.

Of course, with most codecs, this will be approximate. Don't forget to include the audio bitrate in your calculations, a common mistake.

Michael


Return to posts index

Venkatesh Guptha
Re: Calculate Transcoded files size
on Mar 6, 2011 at 7:25:48 am

Hi,

I tried this formula also, but i didn't get the exact output file size.

For your reference, i am providing the file details,
Input File Details:
File Size: 212,536
File Extension: WMV
Audio Bitrate: 238
Video Bitrate: 180
Duration: 5Secs
Audio Codec: WMA
Video Codec: WMV
Video Height: 240
Video Width: 320
Sample Frquency:32000
Audio Channel: 2

Output File Details:
File Extension: TS
Audio Bitrate: 192000
Video Bitrate: 1024000
Duration: 5Secs
Audio Codec: A52
Video Codec: mpgv
Video Height: 240
Video Width: 320
Audio Channel: 2
after transcode completes output file size is 1,047,912 Bytes

As per your formula,

((192000 + 1024000) / 8) * 5 = 760000 Bytes

Here 760,000 is not equal to 1,047,912 rite. So i need to find exact transcoded file size before transcode starts.

Thanks in advance
Venkatesh. K


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]