Open bczhc opened 7 months ago
Try converting to yuv420p lossless with ffmpeg, or use vapoursynth script that use your video as input and converts to yuv420p, and set that script as input
Actually what does "yuv420p lossless" mean please? If I first convert it to yuv420p (or yuv420p10le) using ffmpeg, and then set it as the input of av1an, it will work.
For screenrecords I prefer rgb instead of yuv, and ffmpeg can do this. That's, these two ffmpeg commands will work:
# gbrp
ffmpeg -i 1.mp4 -c:v libaom-av1 -row-mt 1 -tile-rows 2 -tile-columns 2 -tune psnr -cpu-used 5 -crf 50 -threads 16 -pix_fmt yuv420p a.mkv
# yuv420p
ffmpeg -i 1.mp4 -c:v libaom-av1 -row-mt 1 -tile-rows 2 -tile-columns 2 -tune psnr -cpu-used 5 -crf 50 -threads 16 -pix_fmt yuv420p b.mkv
I used to hear of, that aomenc cannot output rgb videos, and this is a limitation of aomenc the CLI but not libaom-av1 the library which ffmpeg uses? May be related to aomenc?
Actually what does "yuv420p lossless" mean please?
It means convert video with something like ffmpeg x264 yuv420p for compatible color space, and using crf 0 for lossless encoding, so there is no quality loss.
ffmpeg -i input -c:a copy -c:v libx264 -crf 0 -pix_fmt yuv420p input_for_av1an.mkv
will suffice
In case when ffmpeg gets RGB as input, it does the conversion internally
Yes, I tried and this worked.
ffmpeg -i 1.mp4 -c:a copy -c:v libx264 -crf 0 -pix_fmt yuv420p input_for_av1an.mkv
<ffmpeg outputs>
/mnt/nvme/av1/3 ❯ ~/av1an -i input_for_av1an.mkv 19:46:30
INFO [av1an_core::context] Input: 2560x1440 @ 30.000 fps, YUV420P, SDR
Scene detection
INFO [av1an_core::context] scenecut: found 1 scene(s) [with extra_splits (300 frames): 1 scene(s)]
00:00:02 ▕█████████████████████████████████████████▏ 100% 300/300 (133.32 fps, eta 0s)Queue 1 Workers 1 Passes 2
Params: --threads=8 --cpu-used=6 --end-usage=q --cq-level=30 --tile-columns=1 --tile-rows=0
/mnt/nvme/av1/3 ❯
Seems the error encounters only with RGB inputs.
Maybe a follow-up of #395. Demonstration file (audio muted).
Hello. I use ffmpeg x11grab to record lossless rgb videos like this:
But when using av1an, it gives "End of file" error during scene scanning.
Also, if hevc gbrp (Rext profile) is used, e.g.:
Then for 2.mp4, av1an gives the same error.
av1an --version
: