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

Change video bitrate from 10m to 10M #337

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Change video bitrate from 10m to 10M #337

merged 1 commit into from
Mar 9, 2023

Conversation

hunterhogan
Copy link
Contributor

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

Per https://www.ffmpeg.org/ffmpeg-all.html#Expression-Evaluation
"m" = 10^-3, but 
"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 because it is buried 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.
@WyattBlue
Copy link
Owner

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

@WyattBlue WyattBlue merged commit deb9dea into WyattBlue:master Mar 9, 2023
@hunterhogan hunterhogan deleted the hunterhogan-patch-video-bitrate branch March 9, 2023 05:47
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

Successfully merging this pull request may close these issues.

2 participants