qmax is the highest number you are willing to encode for, where the higher the number, the worse the peak quality
qmin is the lowest number, which will max out good quality level at.
So, if you want somewhere between 15 and 22 cq, you would use -qmin 15 -qmax 26
Think of min and max as that, the numbers, not “min = minimum quality” and “max = maximum quality”. It's just numbers.
For constant quality, set them at the same value: -qmin 18 -qmax 18. Not recommended, because that would make sense for streaming, where you need a predictable source.
hevc_nvenc is always bigger, and slower to encode.
CUDA is slower by 30 seconds than just base h264_nvenc with the exact same parameters.
ffmpeg -f dvdvideo -title 1 -i /media/steve/CAD/1.157.0917.TRANS.iso -map v -map i:0x80 -vcodec h264_nvenc -acodec libfdk_aac -metadata:s language=eng -tune hq -preset p7 -rc constqp -pix_fmt yuv420p -profile high -vbr 5 -vf bwdif=deint=interlaced,fps=59.94 -rc vbr -cq 20 -qmin 20 -qmax 20 -b:v 0 -rc-lookahead 32 -y round2-software-h264-cq-20-1.157.0917.12514.TRANS.mkv
0:52.95
ffmpeg -f dvdvideo -title 1 -hwaccel cuda -hwaccel_output_format cuda -i /media/steve/CAD/1.157.0917.TRANS.iso -init_hw_device cuda -map v -map i:0x80 -vcodec h264_nvenc -acodec libfdk_aac -metadata:s language=eng -tune hq -preset p7 -rc constqp -vf bwdif_cuda=deint=interlaced,fps=fps=59.94 -profile high -vbr 5 -rc vbr -cq 20 -qmin 20 -qmax 20 -b:v 0 -rc-lookahead 32 -y round2-software-h264-cq-20-1.157.0917.12514.TRANS.mkv
1:19.14
modprobe.d/nvidia.conf: disable fbdev
# options nvidia-drm fbdev=0
Make sure native nvidia-drivers is not installed first.
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb dpkg -i cuda-keyring_1.1-1_all.deb apt-get update apt-get -y install cuda-toolkit-13-0 cuda-drivers
/etc/rc.conf
Hit I to do interactive boot.
rc_interactive="YES"
SMPTE170M is a color space standard primarily used for standard definition video, while YUV420P is a pixel format that describes how color information is stored in a video file, specifically using a 4:2:0 chroma subsampling method. Essentially, SMPTE170M defines the color characteristics, whereas YUV420P defines the arrangement of those colors in the video data.
Understanding qmin, qmax, and Constant Quality (CQ) in FFmpeg What are qmin and qmax?
Purpose of Using qmin and qmax with CQ
Practical Implications
Conclusion
Using qmin and qmax with CQ in FFmpeg provides a way to control the quality and bitrate of video encoding more precisely. This combination can help achieve desired outcomes in various encoding scenarios, balancing quality and file size effectively.
ConstQP in FFmpeg refers to “Constant Quantization Parameter,” a rate control mode used during video encoding that maintains a fixed quantization level across frames. This can lead to consistent quality but may result in larger file sizes compared to other methods like Variable Bit Rate (VBR) or Constant Rate Factor (CRF) which adapt the quantization based on the content.
Overview of FFmpeg Constant QP (constqp)
Constant QP (constqp) is a rate control mode used in FFmpeg when encoding video with NVIDIA's NVENC. It stands for Constant Quantization Parameter, which means that the encoder uses a fixed quantization level for all frames. This results in a consistent quality level throughout the video.
Key Features of constqp
Recommendations
While constqp can provide good quality, it is often recommended to use Variable Bitrate (VBR) with a Constant Quality (CQ) setting instead. This approach can achieve similar quality while being more efficient with disk space. For true constant quality, set the rate control to VBR and specify the target quality level using the -cq option.
Me: What's the difference between “specific quality level” and “true constant quality”? Remember that “CQ” literally means “constant quality.”
Generally, see the comments
List listening ports
netstat -ltup
Disable IPv6 in NetworkManager
nmcli connection show nmcli connection modify 'Wired connection 1' ipv6.method disabled nmcli connection up 'Wired connection 1'