Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitrate might be off by a factor of 8 #1

Open
fanuch opened this issue Sep 23, 2021 · 0 comments
Open

Bitrate might be off by a factor of 8 #1

fanuch opened this issue Sep 23, 2021 · 0 comments

Comments

@fanuch
Copy link

fanuch commented Sep 23, 2021

Love the readme.

Have been testing your code to see my own results and I noticed my file sizes export to about 1.35 MB.

I am not an expert in ffmpeg but I believe your bitrate needs to be multiplied by 8 to approximate what is actually intended.

e.g.

name original size (MB) bitrate kbit/s final size (MB) bitrate * 8 kbit/s final size (MB)
file 1 90.1 497 1.35 3976 8.1
file 2 92.2 529 1.41 4232 8.5

Proposed solution

bitrate=$(( $(echo "scale=0; $targetSizeKilobytes/ $durationSeconds" | bc) * 8 ))

hopefully this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant