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.5k stars 155 forks source link

[Feature Request] Store ENCODER_SETTINGS in output file like aomenc does #663

Open clidx opened 2 years ago

clidx commented 2 years ago

Exclude cq-level for VMAF based encodes. Another idea is to also store AV1AN_SETTINGS or something like that for av1an flags.

outhud commented 2 years ago

Would be great if it was possible to store the aomenc version used also.

(Or even print this to screen at the start of encode? Is this possible? It's not clear to me what version of aomenc is running when I use the docker image, I thought I had removed it from my system :smiley: )

FreezyLemon commented 2 years ago

@outhud aomenc already includes the encoder version in the ENCODER_SETTINGS tag, if you use webm.

Both mkvmerge and ffmpeg can do this pretty easily, i think. We could also set the ENCODER tag (zones can technically use other encoders, but maybe this can just be ignored for the metadata). OR we could set "av1an" in the ENCODER tag

outhud commented 2 years ago

@outhud aomenc already includes the encoder version in the ENCODER_SETTINGS tag, if you use webm.

Thanks. I've made an encode using:

docker run --privileged -v "$(pwd):/videos" --user $(id -u):$(id -g) -it --rm masterofzen/av1an:master -i videoinput.opus.x264.mkv -o videooutput.webm --verbose

(Does this pull the latest aomenc? Or does it look on my system for it?)

I don't see the ENCODER_SETTINGS tag in the output webm using either mediainfo or VLC, should it be readable with these tools?

I do see ENCODER tag in vlc which has "Lavc58.134.100 libopus", but this seems to have been copied over directly from the input H264/opus file.

FreezyLemon commented 2 years ago

I don't see the ENCODER_SETTINGS tag using either mediainfo or VLC, should it be readable with these tools?

mediainfo can definitely read the tag, but av1an does not currently support adding the tag just by changing the output file name to something.webm.

The problem is that only the encoder (for example aomenc) adds the tag at the moment. This means that the encoded chunks (in your temp folder) could have the metadata if they are webm. Av1an currently uses IVF files which don't support this sort of metadata, so this info is never available in the chunks. And forcing aomenc to use webm files instead of IVF isn't really intended at the moment, and causes other problems.

outhud commented 2 years ago

@FreezyLemon thanks for the explanation!