I used the following code to generate a .mp4 file:
args := []string{"-i", "rtsp://zigong.stream.xl02.cn:557/HongTranSvr?DevId=1b038d27-858c-46a1-b803-a2984af343df&Session=1b038d27-858c-46a1-b803-a2984af343df",
"-vcodec", "copy", "-t", "5", "-y", "output.mp4"}
command := exec.Command("ffmpeg", args...)
bytes, err := command.Output()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(len(bytes)) //result:0
Is there a way to get the []byte format of the output.mp4?