I am encoding raw video to h264 using nvh264enc.
The raw video is produced using dxgiscreencapsrc which has the following capabilities
video/x-raw:
format: BGRA
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
So it produces raw video in the BGRA format.
NVH264ENC does support this format for compression but also supports multiple other formats
The list of formats it supports is NV12, YV12, I420, BGRA, RGBA, Y444, VUYA.
Now I am confused as to which format is best for compressing to H264.
Should I keep it as BGRA, or should I convert the BGRA to a different format such as I420 (using gstreamer video convert) and then compressing to h264 that way.
What are the upsides/downsides of each of these raw video formats, will converting make the h264 worse better etc
question from:
https://stackoverflow.com/questions/65944970/encoding-raw-video-into-h264-using-gstreamer 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…