You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Invalid SetMaxSize Logic and Invalid CRF q settings in FFmpegWriter (#198)
* Limit max size of preview to the timeline size (this renders very small profiles correctly) * Fixing CRF quality setting to allow "low" quality without breaking
This commit is contained in:
@@ -995,6 +995,16 @@ AVStream* FFmpegWriter::add_video_stream()
|
||||
/* Init video encoder options */
|
||||
if (info.video_bit_rate >= 1000) {
|
||||
c->bit_rate = info.video_bit_rate;
|
||||
if (info.video_bit_rate >= 1500000) {
|
||||
c->qmin = 2;
|
||||
c->qmax = 30;
|
||||
}
|
||||
// Here should be the setting for low fixed bitrate
|
||||
// Defaults are used because mpeg2 otherwise had problems
|
||||
}
|
||||
else {
|
||||
c->qmin = 0;
|
||||
c->qmax = 63;
|
||||
}
|
||||
|
||||
//TODO: Implement variable bitrate feature (which actually works). This implementation throws
|
||||
@@ -1004,8 +1014,6 @@ AVStream* FFmpegWriter::add_video_stream()
|
||||
//c->rc_buffer_size = FFMAX(c->rc_max_rate, 15000000) * 112L / 15000000 * 16384;
|
||||
//if ( !c->rc_initial_buffer_occupancy )
|
||||
// c->rc_initial_buffer_occupancy = c->rc_buffer_size * 3/4;
|
||||
c->qmin = 2;
|
||||
c->qmax = 30;
|
||||
|
||||
/* resolution must be a multiple of two */
|
||||
// TODO: require /2 height and width
|
||||
|
||||
Reference in New Issue
Block a user