Added codec-aware encoding profiles and moved pixel format to per-variant output.
Encoders now receive the codec being used, allowing them to adjust their flags accordingly. For example, the software encoder gates x264-specific parameters behind a codec check so that future encoders like libx265 or libsvtav1 can provide their own flags without conflict. Pixel format is now specified per variant with a stream specifier rather than globally, enabling codecs like AV1 to use 10-bit color for improved compression efficiency while H.264 variants continue using yuv420p.
This commit is contained in:
@@ -23,22 +23,16 @@ func (e *NvencEncoder) GlobalFlags() []string {
|
||||
}
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) PixelFormat() string {
|
||||
return pixelFormatYUV420P
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) Scaler() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) ExtraFilters() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) ExtraArguments() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) ProfileForCodec(codec string) CodecProfile {
|
||||
return CodecProfile{
|
||||
PixelFormat: pixelFormatYUV420P,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *NvencEncoder) VariantFlags(v *HLSVariant) []string {
|
||||
return []string{
|
||||
fmt.Sprintf("-tune:v:%d", v.index), "ll",
|
||||
|
||||
Reference in New Issue
Block a user