mirror of https://bitbucket.org/ausocean/av.git
30 lines
601 B
Go
30 lines
601 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
"fmt"
|
||
|
"bitbucket.org/ausocean/av/revid"
|
||
|
)
|
||
|
|
||
|
func main(){
|
||
|
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()
|
||
|
}
|