Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ linters:
- typecheck
- unused
# Additional
- copyloopvar
- dupl
- errname
- misspell
Expand All @@ -54,7 +55,7 @@ linters:
- goimports
- goheader
- gosec
- exportloopref
- ireturn
- prealloc
- reassign
- usestdlibvars
4 changes: 2 additions & 2 deletions bitrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ func run(videoFile, plotFile, ffprobePath string) error {
}

canvases := plot.Align(plots, t, dc)
for j := 0; j < rows; j++ {
for i := 0; i < cols; i++ {
for j := range rows {
for i := range cols {
if plots[j][i] != nil {
plots[j][i].Draw(canvases[j][i])
}
Expand Down
6 changes: 6 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Examples in this direcotry

- [ease_conf_phone_model.json](./ease_conf_phone_model.json) is a sample configuration file to use in case one needs to predirct VMAF scores using "phone model" [1].


[1]: https://github.com/Netflix/vmaf/blob/master/resource/doc/models.md#predict-quality-on-a-cellular-phone-screen
3 changes: 3 additions & 0 deletions example/ease_conf_phone_model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ffmpeg_vmaf_template": "-hide_banner -i {{.CompressedFile}} -i {{.SourceFile}} -lavfi libvmaf=n_subsample=1:log_path={{.ResultFile}}:feature=name=psnr:log_fmt=json:model=version=vmaf_v0.6.1\\\\\\\\:enable_transform=true:n_threads={{.NThreads}} -f null -"
}
6 changes: 1 addition & 5 deletions internal/vqm/vqm.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,7 @@ func NewFfmpegVMAF(cfg *FfmpegVMAFConfig, compressedFile, sourceFile string) (*F

// Too much CPU threads are also bad. This was an issue on 128 threaded AMD
// EPYC, ffmpeg was deadlocking at some point during VMAF calculations.
nThreads := 32

if runtime.NumCPU() < nThreads {
nThreads = runtime.NumCPU()
}
nThreads := min(runtime.NumCPU(), 32)

// Template requires a struct with exported fields.
tplContext := struct {
Expand Down
Loading