@@ -26,6 +26,7 @@ import (
26
26
"encoding/json"
27
27
"flag"
28
28
"fmt"
29
+ "log"
29
30
"github.com/ossrs/go-oryx-lib/errors"
30
31
ohttp "github.com/ossrs/go-oryx-lib/http"
31
32
"github.com/ossrs/go-oryx-lib/logger"
@@ -64,11 +65,11 @@ func prepareTest() (err error) {
64
65
srsLog = flag .Bool ("srs-log" , false , "Whether enable the detail log" )
65
66
srsStdout = flag .Bool ("srs-stdout" , false , "Whether enable the SRS stdout log" )
66
67
srsFFmpegStderr = flag .Bool ("srs-ffmpeg-stderr" , false , "Whether enable the FFmpeg stderr log" )
67
- srsDVRStderr = flag .Bool ("srs-dvr-stderr" , false , "Whether enable the DVR stderr log" )
68
+ srsDVRStderr = flag .Bool ("srs-dvr-stderr" , true , "Whether enable the DVR stderr log" )
68
69
srsFFprobeStdout = flag .Bool ("srs-ffprobe-stdout" , false , "Whether enable the FFprobe stdout log" )
69
70
srsTimeout = flag .Int ("srs-timeout" , 64000 , "For each case, the timeout in ms" )
70
71
srsFFprobeDuration = flag .Int ("srs-ffprobe-duration" , 16000 , "For each case, the duration for ffprobe in ms" )
71
- srsFFprobeTimeout = flag .Int ("srs-ffprobe-timeout" , 21000 , "For each case, the timeout for ffprobe in ms" )
72
+ srsFFprobeTimeout = flag .Int ("srs-ffprobe-timeout" , 30000 , "For each case, the timeout for ffprobe in ms" )
72
73
srsBinary = flag .String ("srs-binary" , "../../objs/srs" , "The binary to start SRS server" )
73
74
srsFFmpeg = flag .String ("srs-ffmpeg" , "ffmpeg" , "The FFmpeg tool" )
74
75
srsFFprobe = flag .String ("srs-ffprobe" , "ffprobe" , "The FFprobe tool" )
@@ -845,7 +846,7 @@ func (v *ffprobeClient) doDVR(ctx context.Context) error {
845
846
process .name = * srsFFmpeg
846
847
process .args = []string {
847
848
"-t" , fmt .Sprintf ("%v" , int64 (v .duration / time .Second )),
848
- "-i" , v .streamURL , "-c" , "copy" , "-y" , v .dvrFile ,
849
+ "-re" , "- i" , v .streamURL , "-c" , "copy" , "-y" , v .dvrFile ,
849
850
}
850
851
process .env = os .Environ ()
851
852
@@ -860,6 +861,7 @@ func (v *ffprobeClient) doDVR(ctx context.Context) error {
860
861
logger .Tf (ctx , "DVR process pid=%v exit, r0=%v, stdout=%v" , bs .pid , r0 , stdout .String ())
861
862
if * srsDVRStderr && stderr .Len () > 0 {
862
863
logger .Tf (ctx , "DVR process pid=%v, stderr is \n %v" , bs .pid , stderr .String ())
864
+ log .Printf ("DVR process pid=%v, stderr is \n %v" , bs .pid , stderr .String ())
863
865
}
864
866
return nil
865
867
}
0 commit comments