Skip to content

Instantly share code, notes, and snippets.

@kylophone
kylophone / parse_vmaf_log.py
Last active December 14, 2020 22:13
Example Python3 script showing the parsing of libvmaf JSON format output logs. All AOM CTC metrics are included.
import json
import sys
for vmaf_log in sys.argv[1:]:
with open(vmaf_log) as f:
data = json.load(f)
per_frame_metrics = {}
per_frame_metrics["psnr_y"] = \
@kylophone
kylophone / loudness.rb
Last active October 14, 2023 03:40
FFmpeg loudnorm filter - dual pass loudness normalization example - http://k.ylo.ph/2016/04/04/loudnorm.html
#!/usr/bin/env ruby
require 'open3'
require 'json'
ffmpeg_bin = '/usr/local/bin/ffmpeg'
target_il = -24.0
target_lra = +11.0
target_tp = -2.0
samplerate = '48k'