@@ -171,7 +171,7 @@ EncodeDock::~EncodeDock()
171
171
172
172
void EncodeDock::loadPresetFromProperties (Mlt::Properties &preset)
173
173
{
174
- int audioQuality = -1 ;
174
+ double audioQuality = -1.0 ;
175
175
int videoQuality = -1 ;
176
176
QStringList other;
177
177
QChar decimalPoint = MLT.decimalPoint ();
@@ -316,10 +316,10 @@ void EncodeDock::loadPresetFromProperties(Mlt::Properties &preset)
316
316
ui->dualPassCheckbox ->setChecked (preset.get_int (" v2pass" ));
317
317
} else if (name == " aq" ) {
318
318
ui->audioRateControlCombo ->setCurrentIndex (RateControlQuality);
319
- audioQuality = preset.get_int (" aq" );
319
+ audioQuality = preset.get_double (" aq" );
320
320
} else if (name == " compression_level" ) {
321
321
ui->audioRateControlCombo ->setCurrentIndex (RateControlQuality);
322
- audioQuality = preset.get_int (" compression_level" );
322
+ audioQuality = preset.get_double (" compression_level" );
323
323
} else if (name == " vbr" ) {
324
324
// libopus rate mode
325
325
if (value == " off" )
@@ -397,15 +397,17 @@ void EncodeDock::loadPresetFromProperties(Mlt::Properties &preset)
397
397
398
398
// normalize the quality settings
399
399
// quality depends on codec
400
- if (ui->audioRateControlCombo ->currentIndex () == RateControlQuality && audioQuality > -1 ) {
400
+ if (ui->audioRateControlCombo ->currentIndex () == RateControlQuality && audioQuality > -1.0 ) {
401
401
const QString &acodec = ui->audioCodecCombo ->currentText ();
402
402
if (acodec == " libmp3lame" ) // 0 (best) - 9 (worst)
403
403
ui->audioQualitySpinner ->setValue (TO_RELATIVE (9 , 0 , audioQuality));
404
404
if (acodec == " libvorbis" || acodec == " vorbis"
405
405
|| acodec == " libopus" ) // 0 (worst) - 10 (best)
406
406
ui->audioQualitySpinner ->setValue (TO_RELATIVE (0 , 10 , audioQuality));
407
+ else if (acodec == " aac" )
408
+ ui->audioQualitySpinner ->setValue (TO_RELATIVE (0.1 , 2.0 , audioQuality));
407
409
else
408
- // aac: 0 (worst) - 500 (best)
410
+ // 0 (worst) - 500 (best)
409
411
ui->audioQualitySpinner ->setValue (TO_RELATIVE (0 , 500 , audioQuality));
410
412
}
411
413
if (acodec == " vorbis" || acodec == " libvorbis" )
0 commit comments