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.4k stars 147 forks source link

av1an outputs wrong aspect ratio and fails to mux sometimes #750

Open Bubblemint864 opened 1 year ago

Bubblemint864 commented 1 year ago

This occurs a lot when the source is anamorphic or when the source contains things that are not supported by the output container. I believe this is because of the default muxing command used by av1an. Is there a way to change the command used?

mr44er commented 1 year ago

Not an exact answer, but maybe this as workaround:

ffmpeg -i sourcefile.mkv -map_metadata -1 -map_chapters -1 -bsf:v filter_units=remove_types=6 -vcodec copy -an -sn -dn outvideoonly.mkv

It strips out metadata, chapters, closed captions, audio, subtitles and any other data streams. Then you could try again with this file.

Bubblemint864 commented 1 year ago

I guess this works, however that's an extra step that would eventually add up over time. Ideally a solution within av1an would be great. This also doesn't exactly solve the anamorphic video problem either as I have to manually fix the aspect ratio myself after the encode has finished.

piotrvass commented 1 year ago

Try using --concat mkvmerge argument to av1an, this should use mkvmerge and merge all extras properly

Bubblemint864 commented 1 year ago

Not really sure if that's a good idea either, sure it works - but then I've got items that are technically unsupported by webm inside the container which may cause compatibility issues. Also the aspect ratio of the video is still ignored.