revid/revid.go: in execution of ffmpeg, the device path is replaced by r.config.InputFileName

This commit is contained in:
saxon 2019-01-16 17:29:56 +10:30
parent a0d7681d5f
commit 582f12d157
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ func (r *Revid) startRaspivid() error {
func (r *Revid) startWebcam() error { func (r *Revid) startWebcam() error {
r.config.Logger.Log(logger.Info, pkg+"starting webcam") r.config.Logger.Log(logger.Info, pkg+"starting webcam")
r.cmd = exec.Command("ffmpeg", "-i", "/dev/video0", "-r", "25", "-f", "h264", "-") r.cmd = exec.Command("ffmpeg", "-i", r.config.InputFileName, "-r", "25", "-f", "h264", "-")
delay := time.Second / time.Duration(r.config.FrameRate) delay := time.Second / time.Duration(r.config.FrameRate)
stdout, err := r.cmd.StdoutPipe() stdout, err := r.cmd.StdoutPipe()