liuxiaolong
2019-07-10 d227d2593af911fcf89989e88f4b988d1570b444
service/CamraUpdatesnashot.go
@@ -103,13 +103,16 @@
   if err != nil {
      return "", nil
   }
   piclocal := fmt.Sprintf("%s%s.jpg", *storelocal, time.Now().String())
   cmd := exec.Command("ffmpeg", "-i", caminfo.Rtsp, "-y", "-f", "image2", "-t", "0.001", "-vf", "select='eq(pict_type\\,I)',setpts='N/(25*TB)'", "-s", "1920*1080", piclocal)
   //piclocal := fmt.Sprintf("%s%s.jpg", *storelocal, time.Now().String())
   piclocal := fmt.Sprintf("%s%s.jpg", *storelocal, time.Now().Format("2006-01-02_15_04_05.000000000"))
   cmd := exec.Command("ffmpeg", "-i", caminfo.Rtsp,
      //"-y", "-f", "image2", "-t", "0.001",
      //"-vf", "select='eq(pict_type\\,I)',setpts='N/(25*TB)'",
      "-s", "1920*1080", piclocal)
   err = cmd.Run()
   if err != nil {
      return "", err
      //return "", err //ignore error
   }
   return piclocal, nil
}