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:
@@ -20,22 +20,18 @@ func (e *QuicksyncEncoder) GlobalFlags() []string {
|
||||
}
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) PixelFormat() string {
|
||||
return "qsv"
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) Scaler() string {
|
||||
return "scale_qsv"
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) ExtraFilters() string {
|
||||
return "hwupload=extra_hw_frames=64,format=qsv"
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) ExtraArguments() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) ProfileForCodec(codec string) CodecProfile {
|
||||
return CodecProfile{
|
||||
PixelFormat: "qsv",
|
||||
Scaler: "scale_qsv",
|
||||
ExtraFilters: "hwupload=extra_hw_frames=64,format=qsv",
|
||||
}
|
||||
}
|
||||
|
||||
func (e *QuicksyncEncoder) VariantFlags(v *HLSVariant) []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user