ultravideo / uvg266

An open-source VVC encoder based on Kvazaar
BSD 3-Clause "New" or "Revised" License
223 stars 16 forks source link

How to batch convert multiple videos by using ffmpeg pipe uvg266? #25

Open jiangzemin-xudamin opened 1 week ago

jiangzemin-xudamin commented 1 week ago

I was originally using vvenc and I just came across the uvg266 today and I am not familiar with the use of this encoder. When using uvg266, if I choose to convert the original video file to YUV first, it means I have to enter the resolution every time; but if I convert to Y4M first, uvg266 skips frame headers by default, which will cause all the video to incorrectly play at 25 frames per second! .\ffmpeg -i 1.y4m -f yuv4mpegpipe -strict -2 - | .\uvg266 -i - --input-file-format y4m --qp 51 --preset faster -o output.266 When using vvenc, I can batch convert videos with the following batch command:

md temp

for %%a in (*.y4m *.mp4 *.webm *.mov *.avi *.rm *.rmvb *.flv *.3gp) do ( 
.\ffmpeg -i "%%~sa" -an -c:v libvvenc -preset 4 -b:v 0 -qp 26 ".\temp\%%~na.vvc"
)

pause

However, when I try to replace it with the uvg266, I get a flashback, what's wrong?

md temp

for %%a in (*.y4m *.mp4 *.webm *.mov *.avi *.rm *.rmvb *.flv *.3gp) do ( 
.\ffmpeg -i "%%~sa" -an -f yuv4mpegpipe -strict -2 - | .\uvg266 -i - --input-file-format y4m --qp 51 --preset faster ".\temp\%%~na.vvc"
)

pause