master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.42k stars 149 forks source link

[feature request] Process many files in one run #220

Open lastrosade opened 3 years ago

lastrosade commented 3 years ago

Say we have a directory with 100+ videos that could be split in 2 to 4 parts and we have 32 workers.

It would be neat if av1an could just scan them all one after the other and slowly add new chunks to the worker queue.

This would allow a major speedup.

lastrosade commented 2 years ago

In order to select settings per video, we could provide scripts to av1an. For example For example "-ff script.ps1" with:

#!/bin/pwsh
param($path)

if ([int](mediainfo --Output="Video;%Height%" "$path") -ge [int](mediainfo --Output="Video;%Width%" "$path")) {
    echo = "-vf 'scale=min(1080\,ih):-1:flags=sinc'"
} else {
    echo = "-vf 'scale=-1:min(1080\,iw):flags=sinc'"
}

Here, av1an would run the script on every videos in the directory to get the desired settings.

Could this work around the issues we discussed before?

lastrosade commented 1 year ago

I missed this issue's second birthday :(