mirror of https://bitbucket.org/ausocean/av.git
main: updated logging in h264 file to mpegts file driver for revid
This commit is contained in:
parent
547e24da7d
commit
043ff7779a
|
@ -28,10 +28,10 @@ LICENSE
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"bitbucket.org/ausocean/av/revid"
|
||||
"bitbucket.org/ausocean/utils/smartlogger"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -39,6 +39,7 @@ const (
|
|||
outputFile = "output.ts"
|
||||
frameRate = "25"
|
||||
runDuration = 120 * time.Second
|
||||
logPath = "/var/log"
|
||||
)
|
||||
|
||||
// Test h264 inputfile to flv format into rtmp using librtmp c wrapper
|
||||
|
@ -51,10 +52,11 @@ func main() {
|
|||
Output: revid.File,
|
||||
OutputFileName: outputFile,
|
||||
Packetization: revid.Mpegts,
|
||||
Logger: smartlogger.New(smartlogger.Info, logPath),
|
||||
}
|
||||
revidInst, err := revid.New(config, nil)
|
||||
if err != nil {
|
||||
log.Printf("Should not of have got an error!: %v\n", err.Error())
|
||||
config.Logger.Log(smartlogger.Error, "Should not have got an error!:", err.Error())
|
||||
return
|
||||
}
|
||||
revidInst.Start()
|
||||
|
|
Loading…
Reference in New Issue