Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

ffmpeg - How to set H264 NVENC encoding parameters to output high-quality video stream?

  • I use NVENC (nvEncodeAPI) interface hardware encoding H264, and then RTMP to stream out, when using ffplay to pull the stream to watch, I found that the picture is obviously distorted: the green lines become sharper? the text color becomes lighter and blurred, it is not improved even if I increase the video bitrate to 3Mbps(720P). I also know that H264 encoding is lossy, and some information will be discarded.
  • Then I try to adjust the NV_ENC_CONFIG_H264_VUI_PARAMETERS parameter: when set color-space to "pc, bt709", there are some minor improvements. Maybe the color-space setting has more potential for improvement? For NVENC encoding, is there a higher video clarity setting scheme? I don't know how much space for technical improvement is here? enter image description here based on the code: https://github.com/obsproject/obs-studio/blob/master/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c
question from:https://stackoverflow.com/questions/65897494/how-to-set-h264-nvenc-encoding-parameters-to-output-high-quality-video-stream

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  • .ffmpeg.exe -probesize 32768 -i "{rtmp_url}" -acodec copy -vcodec copy -f flv {local_file_path}
  • Save the live stream as a local file and then play, the picture effect is in line with expectations, which means that the picture may be blurred due to the player's own factors.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...