Skip to content

Commit

Permalink
fix: choose correct bitrate file for pairing
Browse files Browse the repository at this point in the history
  • Loading branch information
oshinongit committed Aug 15, 2024
1 parent 0d5ea1e commit f7c18cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pairVmaf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export async function pairVmafWithResolutionAndBitrate(

const width = parseInt(widthStr);
const height = parseInt(heightStr);
const bitrate = bitrates ? bitrates[filename] : parseInt(bitrateStr);
const bitrate = bitrates
? bitrates[filename.replace('_metadata.json', '.json')]
: parseInt(bitrateStr);
const cpuTime = cpuTimes ? cpuTimes[filename] : undefined;

if (filterFunction(bitrate, { width, height }, vmaf)) {
Expand Down

0 comments on commit f7c18cc

Please sign in to comment.