Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video quality suffers when input is a Vapoursynth script and not mkv file #810

Open
KosakaIsMe opened this issue Feb 12, 2024 · 4 comments

Comments

@KosakaIsMe
Copy link

While testing with Vapoursynth I noticed that if I were to use a vapoursynth script as the input in Av1an the bitrate would be lower and visually worse than if I were to use an mkv file as the input. I don't know why this is an issue as the vapoursynth script is the bare minimum of

import vapoursynth as vs
from vapoursynth import core
core.max_cache_size=1024

file = "input.mkv"

video = core.bs.VideoSource(file)

video.set_output()

The mkv also contains no audio or fonts of any kind. I would be glad if someone could help as I'm lost as to why this is happening.

@master-of-zen
Copy link
Owner

What are your encoding setting?

@KosakaIsMe
Copy link
Author

What are your encoding setting?

For testing I used

av1an \
-e svt-av1 \
--concat mkvmerge \
--resume \
-x 240 \
--verbose \
--split-method av-scenechange \
--sc-method standard \
--sc-downscale-height 540 \
--chunk-method bestsource \
--pix-format yuv420p10le \
--sc-pix-format yuv420p \
--workers 5 \
-v " --input-depth 10 --lp 2 --preset 10 --crf 29 --keyint 0 --aq-mode 2 --irefresh-type 1 --enable-overlays 1 --scd 0 --tune 2 --chroma-u-dc-qindex-offset -1 --chroma-u-ac-qindex-offset -1 --chroma-v-dc-qindex-offset -1 --chroma-v-ac-qindex-offset -1 --enable-tf 0 --enable-qm 1 --qm-min 5 --qm-max 9 " \
-a " -an " \
-i "input.mkv" \
-o "regular-mkv-input.mkv"

@master-of-zen
Copy link
Owner

Try lowering your preset and crf, my guess that quality is bad because of them

@KosakaIsMe
Copy link
Author

Try lowering your preset and crf, my guess that quality is bad because of them

My issue isn't the encode settings (I chose preset 10 so my testing would be quick) But rather that when I use a vapoursynth script as the input the result isn't the same as if I were to use an mkv file. Looking at the scenes.json file there's a large difference between the two vs-scenes.json and mkv-scenes.json. The regular mkv one seems to have more scenes in it compared to the vapoursynth one. also the resulting video file(s) are visually different from each other as shown here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants