mirror of
https://github.com/owncast/owncast.git
synced 2024-11-29 03:29:03 +03:00
5214d81264
* Query for installed codecs * Start modeling out codecs * Can now specify a codec and get the correct settings returned from the model * Return codecs in admin/serverconfig * Start handling transcoding errors and return messages to user * filter available codecs against a whitelist * Fix merge * Codecs are working * Switching between codecs work * Add apis for setting a custom video codec * Cleanup the logging of transcoder errors * Add v4l codec * Add fetching v4l * Add support for per-codec presets * Use updated nvenc encoding parameters * Update log message * Some more codec WIP * Turn off v4l. It is a mess. * Try to make the lowest latency level a bit more playable * Use a human redable display name in console messages * Turn on transcoder persistent connections * Add more codec-related user-facing error messages * Give the initial offline state transcoder an id * Force a minimum segment count of 3 * Disable qsv for now. set x264 specific params in VariantFlags * Close body in case * Ignore vbv underflow message, it is not actionable * Determine a dynamic gop value based on the length of segments * Add codec-specific tests * Cleanup * Ignore goconst lint warnings in codec file * Troubleshoot omx * Add more codec tests * Remove no longer accurate comment * Bundle admin from codec branch * Revert back to old setting * Cleanup list of codecs a bit * Remove old references to the encoder preset * Commit updated API documentation * Update admin bundle * Commit updated API documentation * Add codec setting to api spec * Commit updated API documentation Co-authored-by: Owncast <owncast@owncast.online>
61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
package config
|
|
|
|
import "github.com/owncast/owncast/models"
|
|
|
|
// Defaults will hold default configuration values.
|
|
type Defaults struct {
|
|
Name string
|
|
Title string
|
|
Summary string
|
|
ServerWelcomeMessage string
|
|
Logo string
|
|
Tags []string
|
|
PageBodyContent string
|
|
|
|
DatabaseFilePath string
|
|
WebServerPort int
|
|
RTMPServerPort int
|
|
StreamKey string
|
|
|
|
YPEnabled bool
|
|
YPServer string
|
|
|
|
SegmentLengthSeconds int
|
|
SegmentsInPlaylist int
|
|
StreamVariants []models.StreamOutputVariant
|
|
}
|
|
|
|
// GetDefaults will return default configuration values.
|
|
func GetDefaults() Defaults {
|
|
return Defaults{
|
|
Name: "Owncast",
|
|
Title: "My Owncast Server",
|
|
Summary: "This is brief summary of whom you are or what your stream is. You can edit this description in the admin.",
|
|
ServerWelcomeMessage: "",
|
|
Logo: "logo.svg",
|
|
Tags: []string{
|
|
"owncast",
|
|
"streaming",
|
|
},
|
|
|
|
PageBodyContent: "# This is your page content that can be edited from the admin.",
|
|
|
|
DatabaseFilePath: "data/owncast.db",
|
|
|
|
YPEnabled: false,
|
|
YPServer: "https://directory.owncast.online",
|
|
|
|
WebServerPort: 8080,
|
|
RTMPServerPort: 1935,
|
|
StreamKey: "abc123",
|
|
|
|
StreamVariants: []models.StreamOutputVariant{
|
|
{
|
|
IsAudioPassthrough: true,
|
|
VideoBitrate: 1200,
|
|
Framerate: 24,
|
|
CPUUsageLevel: 2,
|
|
},
|
|
},
|
|
}
|
|
}
|