mirror of https://bitbucket.org/ausocean/av.git
Baby steps: starting by output rtmp to youtube via ffmpeg
This commit is contained in:
parent
edb4ffd826
commit
c8c9c3f0d2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue