WyattBlue / auto-editor

Auto-Editor: Efficient media analysis and rendering
https://auto-editor.com
The Unlicense
2.92k stars 423 forks source link

Change video bitrate from 10m to 10M #337

Closed hunterhogan closed 1 year ago

hunterhogan commented 1 year ago

Per ffmpeg Documentation

"m" = 10^-3 "M" = 10^6

Implicitly corresponding to micro and Mega, respectively.

Using FFmpeg's debug report, when the video bitrate is 10m (-b:v 10m), the report includes the following

iTargetBitrate= 2000000;iMaxBitrate= 0; .iSpatialBitrate= 2000000; .iMaxSpatialBitrate= 0; Info:Current MaxSpatialBitrate is invalid

When the video bitrate is 10M (-b:v 10M), the report includes the following

iTargetBitrate= 10000000;iMaxBitrate= 10000000; .iSpatialBitrate= 10000000; .iMaxSpatialBitrate= 10000000; Info:Setting MaxSpatialBitrate (10000000) the same at SpatialBitrate (10000000) will make the actual bit rate lower than SpatialBitrate

Testing on the same file and only changing 10m to 10M in types.py confirms that the bitrate is always much higher with 10M.

This is one of the only parts of FF* that is case-sensitive, and I greatly dislike it. Plus, it is poorly documented: it is buried in the docs and all of the examples in the documentation use k/K, which is the only suffix with the same meaning whether upper or lower case.

aeinfo_test_ALTERED_10M.txt aeinfo_test_ALTERED_normal.txt auto-editor_debug_10M.txt auto-editor_debug_normal.txt ffmpeg_report_10M_truncated.log ffmpeg_report_normal_truncated.log

WyattBlue commented 1 year ago

Thanks for this incredible catch. We should definitely warn about this in docs as well.