We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29f3943 commit dc86feeCopy full SHA for dc86fee
core/video_options.hpp
@@ -144,6 +144,14 @@ struct VideoOptions : public Options
144
if ((split || segment) && output.find('%') == std::string::npos)
145
LOG_ERROR("WARNING: expected % directive in output filename");
146
147
+ // From https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels
148
+ double mbps = ((width + 15) >> 4) * ((height + 15) >> 4) * framerate.value_or(DEFAULT_FRAMERATE);
149
+ if ((codec == "h264" || codec == "libav") && mbps > 245760.0)
150
+ {
151
+ LOG(1, "Overriding H.264 level 4.2");
152
+ level = "4.2";
153
+ }
154
+
155
return true;
156
}
157
virtual void Print() const override
0 commit comments