mirror of https://bitbucket.org/ausocean/av.git
31 lines
629 B
Go
31 lines
629 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
"fmt"
|
|
"bitbucket.org/ausocean/av/revid"
|
|
)
|
|
|
|
func main(){
|
|
time.Sleep(30*time.Second)
|
|
config := revid.Config{
|
|
Input: revid.Raspivid,
|
|
Output: revid.Rtmp,
|
|
RtmpMethod: revid.LibRtmp,
|
|
QuantizationMode: revid.QuantizationOff,
|
|
RtmpUrl: "rtmp://a.rtmp.youtube.com/live2/w44c-mkuu-aezg-ceb1",
|
|
Bitrate: "500000",
|
|
FramesPerClip: 1,
|
|
Packetization: revid.Flv,
|
|
FrameRate: "25",
|
|
}
|
|
revidInst, err := revid.NewRevidInstance(config)
|
|
if err != nil {
|
|
fmt.Println("Should not have got error!")
|
|
return
|
|
}
|
|
revidInst.Start()
|
|
time.Sleep(2*43200*time.Second)
|
|
revidInst.Stop()
|
|
}
|