Baby steps: starting by output rtmp to youtube via ffmpeg

This commit is contained in:
Saxon Milton 2018-02-08 12:23:44 +10:30
parent edb4ffd826
commit c8c9c3f0d2
1 changed files with 12 additions and 0 deletions

View File

@ -81,6 +81,8 @@ type Config struct {
Input uint8
InputCodec uint8
Output uint8
RtmpEncodingMethod uint8
RtmpURL string
Bitrate string
OutputFileName string
InputFileName string
@ -108,6 +110,8 @@ const (
None = 8
Mpegts = 9
Rtmp = 10
Ffmpeg = 11
Revid = 12
)
// Default config settings
@ -245,6 +249,14 @@ func (r *revidInst) ChangeState(config Config) error {
switch config.Output {
case HttpOut:
case File:
case Rtmp:
switch config.RtmpEncodingMethod {
case Revid:
case Ffmpeg:
case NothingDefine:
r.Log(Warning, "No RTMP encoding method defined, defautling to ffmpeg!")
config.RtmpEncodingMethod = Ffmpeg
}
case NothingDefined:
r.Log(Warning, "No output defined, defaulting to httpOut!")
config.Output = HttpOut