Skip to content

Commit

Permalink
Merge pull request #54 from zedstate/patch-1
Browse files Browse the repository at this point in the history
Update Video - Devedse - RunAbAv1.js; fix regex to pickup final CRF value
  • Loading branch information
revenz authored Sep 12, 2024
2 parents 984f714 + e32ad65 commit 613bf74
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 6
* @revision 7
* @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(/crf (\d+\.?\d*) VMAF.*predicted video stream size/);
let crfValueMatch = output.match(/ab_av1::command::crf_search\] crf (\d+\d) successful/);
Logger.ILog('crf: ' + crfValueMatch);
if (crfValueMatch && crfValueMatch.length > 1) {
let crfValue = crfValueMatch[1];
Expand Down

0 comments on commit 613bf74

Please sign in to comment.