mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WIP - Attempt to add av1 support
For some reason Chrome doesn't detect the codec despite definitely supporting AV1 decoding. Nothing telling show up in console, chrome://webrtc-internals/, or chrome://media-internals/. Testing via `docker-compose up`.
This commit is contained in:
@ -62,6 +62,17 @@ func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc strin
|
||||
}
|
||||
|
||||
switch rtpCodec.Name {
|
||||
case codec.AV1().Name:
|
||||
if err := gst.CheckPlugins([]string{"ximagesrc", "vpx"}); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
pipelineStr = strings.Join([]string{
|
||||
fmt.Sprintf(videoSrc, display, fps),
|
||||
"svtav1enc",
|
||||
fmt.Sprintf("bitrate=%d", bitrate),
|
||||
pipelineStr,
|
||||
}, " ")
|
||||
case codec.VP8().Name:
|
||||
if hwenc == "VAAPI" {
|
||||
if err := gst.CheckPlugins([]string{"ximagesrc", "vaapi"}); err != nil {
|
||||
@ -105,7 +116,7 @@ func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc strin
|
||||
return "", err
|
||||
}
|
||||
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"vp9enc target-bitrate=%d cpu-used=-5 threads=4 deadline=1 keyframe-max-dist=30 auto-alt-ref=true"+pipelineStr, display, fps, bitrate*1000)
|
||||
pipelineStr = fmt.Sprintf(videoSrc+"vp9enc target-bitrate=%d cpu-used=5 threads=4 deadline=1 keyframe-max-dist=30 auto-alt-ref=true"+pipelineStr, display, fps, bitrate*1000)
|
||||
case codec.H264().Name:
|
||||
if err := gst.CheckPlugins([]string{"ximagesrc"}); err != nil {
|
||||
return "", err
|
||||
|
Reference in New Issue
Block a user