Bitrate might be off by a factor of 8 #1

Open
opened 2021-09-23 19:47:50 +00:00 by fanuch · 0 comments
fanuch commented 2021-09-23 19:47:50 +00:00 (Migrated from github.com)

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 :)

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 in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: geusebio/8mb#1
No description provided.