Support setting complexity for Opus, reduce ogg muxing delay
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
eb9da3bc9f
commit
a8298a755f
|
@ -101,6 +101,7 @@ private=false
|
|||
#
|
||||
# Additionally further options can be set on some codecs.
|
||||
# - FLAC supports bitdepth (int) default 16, compression_level (int) default 8, block_size (int) default 0 = auto
|
||||
# - Opus supports complexity (int) default 10
|
||||
# - AAC supports VBR bitrate (vbr1 - vbr5), mode (lc, he, hev2) and afterburner (bool)
|
||||
# - MP3 supports VBR bitrate (v0 - v9)
|
||||
# - All but Opus support setting samplerate (int)
|
||||
|
|
4
go.mod
4
go.mod
|
@ -3,7 +3,7 @@ module git.gammaspectra.live/S.O.N.G/MeteorLight
|
|||
go 1.18
|
||||
|
||||
require (
|
||||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220719151756-674b19a2bcc9
|
||||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220720101005-f28e82b5aa0f
|
||||
github.com/BurntSushi/toml v1.1.0
|
||||
github.com/dhowden/tag v0.0.0-20220618230019-adf36e896086
|
||||
github.com/enriquebris/goconcurrentqueue v0.6.3
|
||||
|
@ -13,7 +13,7 @@ require (
|
|||
git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421115623-d0b3bfe57e0f // indirect
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255 // indirect
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220515171305-ffb0aafe2a61 // indirect
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba // indirect
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220720100458-4421c708d144 // indirect
|
||||
git.gammaspectra.live/S.O.N.G/go-tta v0.2.1-0.20220226150007-096de1072bd6 // indirect
|
||||
git.gammaspectra.live/S.O.N.G/goflac v0.0.0-20220515172202-6e490998d2a0 // indirect
|
||||
github.com/dh1tw/gosamplerate v0.1.2 // indirect
|
||||
|
|
8
go.sum
8
go.sum
|
@ -1,13 +1,13 @@
|
|||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220719151756-674b19a2bcc9 h1:DQqURP3MFbMTqWl/rGyvJh7k6+3HTTxpqT2KvkZ009E=
|
||||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220719151756-674b19a2bcc9/go.mod h1:HrYZb1M5dv2hOfpUhLOYkK4qQqBu+7hg7p14R19ebvs=
|
||||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220720101005-f28e82b5aa0f h1:z378eR1Woio7/afTsajVv2lddKQ3s7r7cQ4GV5M43kk=
|
||||
git.gammaspectra.live/S.O.N.G/Kirika v0.0.0-20220720101005-f28e82b5aa0f/go.mod h1:3ynFb8HPk7TexR66NA5qUWNLiJaGKodh3cVkLJ27aPc=
|
||||
git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421115623-d0b3bfe57e0f h1:CxN7zlk5FdAieyRKQSbwBGBsvQ2cDF8JVCODZpzcRkA=
|
||||
git.gammaspectra.live/S.O.N.G/go-alac v0.0.0-20220421115623-d0b3bfe57e0f/go.mod h1:f1+h7KOnuM9zcEQp7ri4UaVvgX4m1NFFIXgReIyjGMA=
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255 h1:BWRx2ZFyhp5+rsXhdDZtk5Gld+L44lxlN9ASqB9Oj0M=
|
||||
git.gammaspectra.live/S.O.N.G/go-ebur128 v0.0.0-20220418202343-73a167e76255/go.mod h1:5H4eVW9uknpn8REFr+C3ejhvXdncgm/pbGqKGC43gFY=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220515171305-ffb0aafe2a61 h1:YufhSTCS59H5CStqokGMb60RnSsqrp+GoZvzmC29wm4=
|
||||
git.gammaspectra.live/S.O.N.G/go-fdkaac v0.0.0-20220515171305-ffb0aafe2a61/go.mod h1:pkWt//S9hLVEQaJDPu/cHHPk8vPpo/0+zHy0me4LIP4=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba h1:JEaxCVgdr3XXAuDCPAx7ttLFZaaHzTEzG+oRnVUtUKU=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220227175608-6cc027f24dba/go.mod h1:vkoHSHVM9p6vAUmXAik0gvaLcIfiQYrD6bQqVpOulUk=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220720100458-4421c708d144 h1:mLKRevX5BbHTtBXXBEKlMOYwL9puZVPlG3+VsLb2IXk=
|
||||
git.gammaspectra.live/S.O.N.G/go-pus v0.0.0-20220720100458-4421c708d144/go.mod h1:vkoHSHVM9p6vAUmXAik0gvaLcIfiQYrD6bQqVpOulUk=
|
||||
git.gammaspectra.live/S.O.N.G/go-tta v0.2.1-0.20220226150007-096de1072bd6 h1:ITVVisbHPnUclp3PBkCbXFeBhOCBcOjPdgjJ9wRH3TI=
|
||||
git.gammaspectra.live/S.O.N.G/go-tta v0.2.1-0.20220226150007-096de1072bd6/go.mod h1:cobkT8u8vq/+ngLy+feKS2M2ZT2HoCec5riA/0Cex3Q=
|
||||
git.gammaspectra.live/S.O.N.G/goflac v0.0.0-20220515172202-6e490998d2a0 h1:imcnwHUqaAJzws41B8sCSp/sUmVranNjAX205Jr4Jc0=
|
||||
|
|
7
mount.go
7
mount.go
|
@ -69,6 +69,9 @@ func NewStreamMount(source audio.Source, config *StreamConfig) *StreamMount {
|
|||
if bitrate != nil {
|
||||
options["bitrate"] = bitrate
|
||||
}
|
||||
options["complexity"] = config.GetIntOption("complexity", 10)
|
||||
//Lower delay than just one packet per second default
|
||||
options["delay"] = 300
|
||||
sampleRate = opus.FixedSampleRate
|
||||
mimeType = "audio/ogg;codecs=opus"
|
||||
packetizerEntry = packetizer.NewOggPacketizer(reader)
|
||||
|
@ -117,6 +120,10 @@ func NewStreamMount(source audio.Source, config *StreamConfig) *StreamMount {
|
|||
if bitrate != nil {
|
||||
options["bitrate"] = bitrate
|
||||
}
|
||||
|
||||
options["complexity"] = config.GetIntOption("complexity", 10)
|
||||
//Lower delay than just one packet per second default
|
||||
options["delay"] = 300
|
||||
sampleRate = opus.FixedSampleRate
|
||||
mimeType = "audio/ogg;codecs=opus"
|
||||
packetizerEntry = packetizer.NewOggPacketizer(reader)
|
||||
|
|
Loading…
Reference in New Issue