From 57d205d5a07daa2fa5e8a33b3e8304229949d955 Mon Sep 17 00:00:00 2001 From: winlin Date: Tue, 3 Jan 2023 22:30:02 +0800 Subject: [PATCH] Test: Use the fatest preset for HEVC blackbox test. --- trunk/3rdparty/srs-bench/blackbox/hevc_test.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/trunk/3rdparty/srs-bench/blackbox/hevc_test.go b/trunk/3rdparty/srs-bench/blackbox/hevc_test.go index 25a28994a..9207557a4 100644 --- a/trunk/3rdparty/srs-bench/blackbox/hevc_test.go +++ b/trunk/3rdparty/srs-bench/blackbox/hevc_test.go @@ -74,7 +74,9 @@ func TestRtmpPublish_RtmpPlay_HEVC_Basic(t *testing.T) { streamURL := fmt.Sprintf("rtmp://localhost:%v/live/%v", svr.RTMPPort(), streamID) ffmpeg := NewFFmpeg(func(v *ffmpegClient) { v.args = []string{ - "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", "-f", "flv", streamURL, + // Use the fastest preset of x265, see https://x265.readthedocs.io/en/master/presets.html + "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", + "-profile:v", "main", "-preset", "ultrafast", "-f", "flv", streamURL, } }) wg.Add(1) @@ -169,7 +171,9 @@ func TestRtmpPublish_HttpFlvPlay_HEVC_Basic(t *testing.T) { streamURL := fmt.Sprintf("rtmp://localhost:%v/live/%v", svr.RTMPPort(), streamID) ffmpeg := NewFFmpeg(func(v *ffmpegClient) { v.args = []string{ - "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", "-f", "flv", streamURL, + // Use the fastest preset of x265, see https://x265.readthedocs.io/en/master/presets.html + "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", + "-profile:v", "main", "-preset", "ultrafast", "-f", "flv", streamURL, } }) wg.Add(1) @@ -263,7 +267,9 @@ func TestRtmpPublish_HttpTsPlay_HEVC_Basic(t *testing.T) { streamURL := fmt.Sprintf("rtmp://localhost:%v/live/%v", svr.RTMPPort(), streamID) ffmpeg := NewFFmpeg(func(v *ffmpegClient) { v.args = []string{ - "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", "-f", "flv", streamURL, + // Use the fastest preset of x265, see https://x265.readthedocs.io/en/master/presets.html + "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", + "-profile:v", "main", "-preset", "ultrafast", "-f", "flv", streamURL, } }) wg.Add(1) @@ -356,7 +362,9 @@ func TestRtmpPublish_HlsPlay_HEVC_Basic(t *testing.T) { streamURL := fmt.Sprintf("rtmp://localhost:%v/live/%v", svr.RTMPPort(), streamID) ffmpeg := NewFFmpeg(func(v *ffmpegClient) { v.args = []string{ - "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", "-f", "flv", streamURL, + // Use the fastest preset of x265, see https://x265.readthedocs.io/en/master/presets.html + "-stream_loop", "-1", "-re", "-i", *srsPublishAvatar, "-acodec", "copy", "-vcodec", "libx265", + "-profile:v", "main", "-preset", "ultrafast", "-f", "flv", streamURL, } }) wg.Add(1)