Skip to content

Commit

Permalink
Fix RunAbAv1 found crf match
Browse files Browse the repository at this point in the history
Fix regex statement to work with updated output of abav1
  • Loading branch information
CanOfSocks authored Oct 2, 2024
1 parent f31cbfa commit 4ec292e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/Flow/Video/Video - Devedse - RunAbAv1.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Video - Devedse - InstallAbAv1.js
* Executes the ab-av1 command.
* @author Devedse
* @revision 7
* @revision 8
* @uid 4b2d95ff-0b20-4be2-b945-e6efd8099feb
* @param {string} Preset The preset to use
* @param {string} SvtArguments The --svt arguments to pass to AbAv1. Only use if using SVT-AV1 encoder
Expand Down Expand Up @@ -93,7 +93,7 @@ function Script(Preset,SvtArguments,Encoder,PixFormat,MinVmaf,MaxEncodedPercent,

// Parse the output to find the CRF value
let output = executeAbAv1.output;
let crfValueMatch = output.match(/ab_av1::command::crf_search\] crf (\d+\d) successful/);
let crfValueMatch = output.match(/crf ([0-9]+) VMAF ([0-9.]+) predicted.*\(([0-9.]+%)/i);
Logger.ILog('crf: ' + crfValueMatch);
if (crfValueMatch && crfValueMatch.length > 1) {
let crfValue = crfValueMatch[1];
Expand Down

0 comments on commit 4ec292e

Please sign in to comment.