how do I upscale a video to 4k or 2k with ffmpeg? youtube encodes the videos which results in some quality loss of the video. So to make youtube use VP09 encoder on my videos, I have to export the video in 2k or 4k
I record videos at 1080P this way :
ffmpeg \
-f x11grab \
-framerate 60 \
-video_size "1920x1080" \
-i :1 \
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \
-vf setpts=N/FR/TB \
-c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 \
output.mp4 \
My upscale ffmpeg command ( produces laggy videos )
ffmpeg -i output.mp4 -vf scale=-1:2160:flags=lanczos -c:v libx264 -crf 21 -framerate 60 out.mp4
How do I export the video in 2k or 4k without the lag?