I use ffmpeg to convert home videos to DVD format and want to calculate the size of the output file before performing the conversion.
My input file has a transfer speed of 7700 kbps and is 114 seconds. The audio bitrate is 256 kbps (per second?). The input file is 77 MB. To get this information, I ran:
mplayer -vo null -ao null -frames 0 -identify input.MOD
So, theoretically, the input file should have a (approximately) file size:
((7700/8) * 114) / 1024
That is (7700/8) is kilobytes per second, multiplied by 114 seconds, and then converted to megabytes. This gives me 107 MB, which is beyond the scope of my 77. Thus, I am skeptical about his formula.
However, after converting the video:
ffmpeg -i input.MOD -y -target ntsc-dvd -sameq -aspect 4:3 output.mpg
The numbers seem to make more sense. The bitrate is 9000 kbps, and using the above formula, I get 125 MB, and my actual output file size is 126 MB.
So, two questions:
How to include audio bitrate in this calculation? Is it additive (video file size + audio file size)?
Does DVD always have a speed of 9000 kilobits / s? Is this a DVD definition? Or can this vary depending on the video quality of my input video? What guarantees "-target ntsc-dvd" about my video?
Why is my input file not matching the request, but the output file? Is there some other variable that I don't take into account?
What is the correct way to calculate file size?
source share